RCayre / mirage

Mirage is a powerful and modular framework dedicated to the security analysis of wireless communications.
https://homepages.laas.fr/rcayre/mirage-documentation
MIT License
261 stars 48 forks source link

name 'CtrlPDU' is not defined #19

Closed jarv-git closed 3 years ago

jarv-git commented 3 years ago

Hi,

After installing Mirage using setup.py, when running mirage I got the following error:

_[...]mirage/mirage/libs/ble_utils/scapy_link_layers.py", line 28, in split_layers(BTLEDATA, CtrlPDU) NameError: name 'CtrlPDU' is not defined

I've checked the dependencies and all seem properly installed.

Do you know where the problem is? Could it be some trouble with Scapy (mine v2.4.4)?

Thanks!

RCayre commented 3 years ago

Hi, thank you for opening this issue. Have you installed scapy from pip or directly from the official repository ? They have added support for new Link Layer PDUs recently and the CtrlPDU packet has been replaced by BTLE_CTRL. I was able to reproduce the issue with the latest version from github.

Can you tell me if the following fix solves the problem ? You can just replace mirage/libs/ble_utils/scapy_link_layers.py by the following file: scapy_link_layers.py.txt

I'll write a better fix for the next release.

jarv-git commented 3 years ago

Hi!

Yes, I've installed it directly from the official repo.

Great, the fix solves the problem. I had also tried CtrlPDU directly from Scapy and I was getting also an error. The point was I was not able to identify the replacement.

Thank you. Nice tool BTW.