-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Labels
Description
Packetry shows the following device tree for an FT600 device:
Here's the binary for the "Getting configuration descriptor #0 for device 1, reading 63 bytes":
b'\t\x02?\x00\x02\x01\x00\xe00\x08\x0b\x00\x02\xff\xff\xff\x00\t\x04\x00\x00\x02\xff\xff\xff\x00\x07\x05\x01\x02\x00\x02\x00\x07\x05\x81\x03@\x00\t\t\x04\x01\x00\x02\xff\xff\xff\x00\x07\x05\x02\x02\x00\x02\x00\x07\x05\x82\x02\x00\x02\x00'
And calling USBConfiguration.from_binary_descriptor()
results in an error:
File "/Users/mblsha/.pyenv/versions/3.12.5/envs/ft600/lib/python3.12/site-packages/facedancer/configuration.py", line 95, in from_binary_descriptor
if len(last_interface.endpoints) == 0:
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endpoints'
configuration.py expects there to be either an interface or an endpoint before a USBDescriptor, but in this case USBDescriptor is the first thing that gets parsed in that loop.
In packetry this seems to be parsed as a Function with a InterfaceAssociationDescriptor, but there seem to be no such thing in facedancer.
Also not sure if it's important, but the configuration description is getting transferred twice, and the second one seems to be a superset of the first: