Python package implementing server-side of the SPICE usbredir protocol aimed at faking USB devices to virtual guests in qemu.
Potential uses include mock devices for automated driver/application testing or exploit development.
Note: I mostly hacked this together over two afternoons, consider the code work in progress.
The Python package can be installed using
$ pip3 install https://github.com/atx/fakeusb/archive/master.zip
An example emulating a generic CDC-ACM serial port device can be found in
examples/cdc.py
. A script for running
qemu with the necessary options to enable usb redirection is provided in examples/run_qemu.sh
.