[usbproxy] Re: Modify Descriptors
- From: Dominic Spill <dominicgs@xxxxxxxxx>
- To: usbproxy@xxxxxxxxxxxxx
- Date: Tue, 27 Oct 2015 16:30:31 +0000
On 27 October 2015 at 15:30, Rikkert ten Klooster
I’ve managed to write some simple filter plugins, which is working great.
That's great. I'm glad it's working for you.
However, I’d like to be able to work with the USB Device descriptors. I would
like to modify the fields of the descriptors, such as idVendor, idProduct,
Issue #2 on github describes that requests aren’t filtered, is there maybe a
workaround to do so? For now I’d just like to change it for a PoC (even if
it’s just quick and dirty). Anyone who can point me in the right direction,
as in which file or class I could work with to do so?
You're right, this has been on my list of things to solve for a while
now. I think we can address it temporarily by making the changes in
the constructors of the various levels of the descriptor hierarchy.
If you look in src/lib/ you will see C++ source files named for the
various levels of the descriptors: Device.cpp, Configuration.cpp,
Interface.cpp, etc. If you hard code changes in there, it will
achieve what you want.
In the future we should definitely filter those packets, which
probably means having one of the proxies build the model rather than
the manager and passing the packets through the filters. There are a
few questions here, which proxy should build the model? Do we want the
model to represent the real device? Or the modified one?
Other related posts: