登录 www.usb7.cn ,点击"我的设备"并访问tinySniffer
sniff命令
sniff@tinySniffer:~$ sniff -h
Usage: sniff [-h] [-i] [-u UPLOAD_FILENAME] [-s] [-r] [-R] [-F [FILTERS]]
tinySniffer starts usb capture when:
1) tinySniffer (with usb peripheral plugged) is connected to usb host (this powers on tinySniffer) (save to new file)
2) usb peripheral is unplugged and re-plugged to tinySniffer (save to new file)
3) run "sniffer.py -r" to restart usb capture and save to new file
4) run "sniffer.py -R" to emulate usb peripheral unplug / replug, restarts usb capture and save to new file
optional arguments:
-h, --help show this help message and exit
-i, --info show usb capture info
-u UPLOAD_FILENAME, --upload UPLOAD_FILENAME
stop usb capture and upload captured file
-s, --stop stop usb capture
-r, --restart restart usb capture and save to new file
-R, --RESTART emulate usb peripheral unplug / replug, restart usb capture and save to new file
-F [FILTERS], --FILTERS [FILTERS]
set capture filter, support multiple filters, separated by ","
must use together with -r or -R argument to restart usb capture
supported capture filters are:
URB_ISO_OUT, URB_ISO_IN, URB_BULK_OUT, URB_BULK_IN
examples:
sniff -F URB_ISO_OUT,URB_ISO_IN -r
sniff -F URB_BULK_OUT -R
sniff -F URB_ISO_OUT,URB_ISO_IN,URB_BULK_OUT,URB_BULK_IN -R
sniff -F -R # this is to clear capture filters
sniff@tinySniffer:~$ lsusb
Bus 003 Device 002: ID 0c76:1676 JMTek, LLC.
sniff@tinySniffer:~$ sniff -i
capturing device:
3-1
capturing file:
/home/sniff/tinySniffer.pcap
capturing filters:
sniff@tinySniffer:~$ sniff -R
sniff@tinySniffer:~$ ls -l
total 1692
-rw-r--r-- 1 sniff sniff 978932 May 5 09:04 tinySniffer-1.pcap
-rw-r--r-- 1 sniff sniff 12288 May 5 09:04 tinySniffer-2.pcap
-rw-r--r-- 1 sniff sniff 741376 Mar 8 11:01 tinySniffer.pcap
sniff@tinySniffer:~$ sniff -u tinySniffer-1.pcap
Info: success bring down existing capture process
tinySniffer-1.pcap 100.00% 24.00 bytes/24.00 bytes
usb.urb_type == URB_COMPLETE
sniff@tinySniffer:~$ sniff -i
capturing device:
1-1
capturing file:
/home/sniff/tinySniffer-6.pcap
capturing filters:
URB_BULK_IN
endpoints mapping:
our usb packets capturing is software technology, below endpoint mapping is used:
usb host tinySniffer usb peripheral
EP1IN <- EP1IN
EP2IN <- EP5IN
EP2OUT -> EP2OUT
EP3OUT -> EP3OUT
EP4OUT -> EP4OUT