usb-sniffify
所属分类:嵌入式Linux
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2022-04-26 17:56:48
上 传 者:
sh-1993
说明: 树莓Pi 4 USB转发器,嗅探器,注射器,
(Raspberry Pi 4 USB Forwarder, Sniffer, Injector,)
文件列表:
CMakeLists.txt (955, 2022-04-26)
LICENSE (18092, 2022-04-26)
include/ (0, 2022-04-26)
include/ds4.h (21366, 2022-04-26)
include/dualsense.h (14859, 2022-04-26)
include/magicPro.h (5802, 2022-04-26)
include/magicpro_generated.h (14751, 2022-04-26)
include/ps4_generated.h (56703, 2022-04-26)
include/ps5_generated.h (30522, 2022-04-26)
include/raw-gadget.hpp (2876, 2022-04-26)
include/raw-helper.h (7389, 2022-04-26)
src/ (0, 2022-04-26)
src/hid.c (20725, 2022-04-26)
src/libusbhax.c (12569, 2022-04-26)
src/passthrough.c (33072, 2022-04-26)
src/passthrough.cpp (4092, 2022-04-26)
src/raw-gadget-passthrough.cpp (32856, 2022-04-26)
src/raw-gadget.cpp (24087, 2022-04-26)
src/raw-helper.c (13083, 2022-04-26)
src/raw-helper.cpp (13303, 2022-04-26)
# usb-sniffify
Raspberry Pi 4 USB Forwarder, Sniffer, Injector
This is example code that can be used to open USB device and duplicate messages one the USB peripheral/power port on a Raspebrry Pi 4. This framework lets a host device recognize the Raspberry Pi as the client device connected to the Raspberry Pi. Doing so allows an arbitrary host send and recieve all protocols while allowing usb-sniffiy to read the transmitted messages. A few small tweaks to the code can also let you block transmissions or inject new messages. Sniffiy is derived from Sniff + Modify.
- Gadget Handling: raw-gadget
- Device Handling: libusb-1.0
The original motivation of this project is to decode USB protcol from a Dualsense controller connected to a PS5 over USB, as well as modify the inputs being sent to the console for projects like chaos%.
There exist some generated headers based on HID report descriptors using the following tool:
- hidrdd
The passthrough.c is the latest program that can pass a device from the PCB-closest USB 2.0 port. This requires running the insmod.sh to have been priorly run from raw-gadget.
$ cd src
$ make
$ ls /sys/class/udc
fe980000.usb
$ sudo ./passthrough fe980000.usb fe980000.usb
This project is very new so expect frequent updates. Though the intent is to pass through all USB funcitonality certain limitations in raw_gadget or libusb may make perfect transparency impossible.
Status:
- passthrough.c works with dualsense and DS4 controllers, audio can be passed to the controller
- Audio cannot be passed to the host (mic audio -> console)
TODO:
- bulk trasnfer endpoint threads
- isochronous device -> host thread
- Turn into a library with better interfaces
近期下载者:
相关文件:
收藏者: