Skip to content

Type Error #32

@paulsonmathew21

Description

@paulsonmathew21

Continuous Type error exceptions are occurred whilst executing the tool as shown below.

[INFO ] [Interface] Calling get_descriptor (stage: "interface_descriptor")
[ERROR ] Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/umap2/fuzz/helpers.py", line 76, in wrapper
response = func(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_interface.py", line 130, in get_descriptor
d += e.get_descriptor(usb_type, valid)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_cs_interface.py", line 63, in get_descriptor
response = struct.pack('BB', length & 0xff, descriptor_type) + self.cs_config
TypeError: can't concat str to bytes

[ERROR ] File "/usr/local/bin/umap2scan", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/umap2/apps/scan.py", line 80, in main
app.run()
File "/usr/local/lib/python3.9/dist-packages/umap2/apps/scan.py", line 50, in run
device.run()
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_device.py", line 144, in run
self.phy.run()
File "/usr/local/lib/python3.9/dist-packages/umap2/phy/facedancer/max342x_phy.py", line 194, in run
self.service_irqs()
File "/usr/local/lib/python3.9/dist-packages/umap2/phy/facedancer/max342x_phy.py", line 217, in service_irqs
self.connected_device.handle_request(b)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_device.py", line 250, in handle_request
handler(req)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_device.py", line 322, in handle_get_descriptor_request
response = response(dindex)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_device.py", line 337, in get_configuration_descriptor
return self.configurations[num].get_descriptor()
File "/usr/local/lib/python3.9/dist-packages/umap2/fuzz/helpers.py", line 76, in wrapper
response = func(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_configuration.py", line 97, in get_descriptor
interface_descriptors += i.get_descriptor(usb_type, valid)
File "/usr/local/lib/python3.9/dist-packages/umap2/fuzz/helpers.py", line 76, in wrapper
response = func(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/umap2/dev/audio.py", line 173, in get_descriptor
return super(USBAudioControlInterface, self).get_descriptor(usb_type, valid)
File "/usr/local/lib/python3.9/dist-packages/umap2/fuzz/helpers.py", line 79, in wrapper
self.logger.error(''.join(traceback.format_stack()))

[ERROR ] Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/umap2/fuzz/helpers.py", line 76, in wrapper
response = func(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/umap2/dev/audio.py", line 173, in get_descriptor
return super(USBAudioControlInterface, self).get_descriptor(usb_type, valid)
File "/usr/local/lib/python3.9/dist-packages/umap2/fuzz/helpers.py", line 80, in wrapper
raise e
File "/usr/local/lib/python3.9/dist-packages/umap2/fuzz/helpers.py", line 76, in wrapper
response = func(self, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_interface.py", line 130, in get_descriptor
d += e.get_descriptor(usb_type, valid)
File "/usr/local/lib/python3.9/dist-packages/umap2/core/usb_cs_interface.py", line 63, in get_descriptor
response = struct.pack('BB', length & 0xff, descriptor_type) + self.cs_config
TypeError: can't concat str to bytes

[ERROR ] File "/usr/local/bin/umap2scan", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/umap2/apps/scan.py", line 80, in main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions