shark-asmx/CTF-Usb_Keyboard_Parser ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python tool that can read a pcap or pcapng file and decode USB keyboard HID traffic into the actual keystrokes someone typed.
I want it to handle the common USB capture formats shown in the README, especially the Linux memory mapped USB captures and regular USB pcap captures. It should have a newer script that parses the USB data directly and prints output based on device ID, and an older fallback script that can use tshark to pull the HID payload before decoding it.
Make it easy to run from the command line like python3 main.py <file> and python3 Usb_Keyboard_Parser.py <file>, and include clear output so I can see what was typed from the capture. If you need to check current packet parsing details or USB HID formats, look up the docs online. Also keep it simple enough to use for CTF style USB keyboard dumps, and make sure it works on both pcap and pcapng files.
Are you gonna build this?
make sure you review the code using arcumet