bettercap / bettercap

The Swiss Army knife for 802.11, BLE, HID, CAN-bus, IPv4 and IPv6 networks reconnaissance and MITM attacks.
https://www.bettercap.org/
Other
16.79k stars 1.48k forks source link

ble.enum and ble.write only works one time per execution #771

Open lkmidas opened 4 years ago

lkmidas commented 4 years ago

Description of the bug or feature request

When I use the latest precompiled binary of bettercap 2.28 (https://github.com/bettercap/bettercap/releases/download/v2.28/bettercap_linux_amd64_v2.28.zip), I can only perform ble.enum or ble.write without problems once per execution of bettercap. Further calls to these commands will always hang the program (and may require hciconfig up/down to make it works again).

Environment

Steps to Reproduce

$sudo  bettercap
>> net.recon off
>> ble.recon on
>> ble.show # get an address
>> ble.enum MAC

Expected behavior: ble.enum or ble.write can be executed indefinitely per launch.

Actual behavior:

ble.enum or ble.write can only be executed once per launch.

obihann commented 4 years ago

Exact same experience for me.

evilsocket commented 3 years ago

unfortunately this is a known bug of the gatt library ( http://github.com/bettercap/gatt ) that i forked and tried to fix a bit, but it's still very unstable ... when i started working on the BLE module there was nothing better that supported both linux and mac ... then we lost support with newer macs, so in theory we could just find another library but that'd take some major reworking of the module

pironc commented 2 years ago

unfortunately this is a known bug of the gatt library ( http://github.com/bettercap/gatt ) that i forked and tried to fix a bit, but it's still very unstable ... when i started working on the BLE module there was nothing better that supported both linux and mac ... then we lost support with newer macs, so in theory we could just find another library but that'd take some major reworking of the module

any idea if this is the same issue (not working once then not at all like some people mention), Ubuntu 20.04.3 LTS focal, ran make with "sudo apt-get install libusb-1.0-0-dev" in order to succeed the installation (otherwise couldn't make & start bettcap)

recon works fine, show too but I can't get enum to work. hciconfig is UP RUNNING.

Hope this helps.