The core Ubertooth C libraries and tools are much more robust (and faster), but the pure python implementation provided the following:
- Quick deployment with no need for compiling.
- Rapid prototyping of new and custom Ubertooth tools in python.
- Quick and easy way to hook up an Ubertooth to mobile phones and other ARM devices.
- Ubertooth data integration into my favorite python analytic libraries
- An excuse for me to better understand the baseband layer and pyusb
- you will need the pure python pyusb library installed to use pyubertooth
- download the pyubertooth source code via git
- the cli pyubertooth.py is in the pyubertooth/pyubertooth directory
git clone https://github.com/hackgnar/pyubertooth.git
For usage help:
python ubertooth.py --help
python ubertooth.py --outfile=dump_filename.dump
python ubertooth.py --outfile=dump_filename.dump --channel 60
python ubertooth.py --outfile=dump_filename.dump -t 30
python ubertooth.py --outfile=dump_filename.dump -n 300
python ubertooth.py --infile=dump_filename.dump
python ubertooth.py --infile=dump_filename.dump --btbb
python ubertooth.py --btbb
import ubertooth ut = Ubertooth()
import ubertooth ut = Ubertooth() for data in ut.rx_stream(count=5): print data ut.close()
import ubertooth ut = Ubertooth() for data in ut.rx_stream(secs=30): print data ut.close()
import ubertooth ut = Ubertooth() try: for data in ut.rx_stream(): print data except KeyboardInterrupt: pass ut.close()
import ubertooth ut = Ubertooth() f = open("dump_filename.dump", 'wb') for data in ut.rx_stream(secs=60): f.write(data) f.close() ut.close()
import ubertooth ut = Ubertooth() ut.set_channel(66)
The libraries for this project only provide a fraction of Ubertooth's capabilities, and the baseband parser only provide LAP address and address parsing on baseband data. As time goes on, I will try to expand the functionality and speed of the library. I have also considered creating a python ctypes variant of the library to take advantage of the core Ubertooth C libaries. A ctypes variant would be much faster while still providing a python API for interacting with the Ubertooth and its data.
The pure python libraries can be found in this github repo, but be warned, the code is ugly and needs some serious refactoring.