riverloopsec / killerbee

IEEE 802.15.4/ZigBee Security Research Toolkit
http://www.riverloopsecurity.com
Other
756 stars 215 forks source link

'device' passed as string not USB device object #276

Open s1e3p3r opened 1 year ago

s1e3p3r commented 1 year ago

If 'device' and 'hardware' are both specified on the command line, eg: device="1:7" hardware="cc2531", 'killerbee/init,py' will pass the 'device' variable to the hardware class constructor: 'killerbee/dev_cc253x.py' class 'CC253Zx.init()' as a string, not as a usb device object as expected. This will raise an exception when device.set_configuration() is called. This appears to be an issue for all non-serial usb devices.

If neither 'device' or 'hardware' are specified it 'killerbee/init.py' will autodetect the usb device and passes the device object to the hardware class constructor correctly.