- Java 47.1%
- Python 36.2%
- Shell 14.8%
- Makefile 1.9%
| java_parser | Add two files I forgot before | |
| lib | Initial commit | |
| .gitignore | Update and improve parser | |
| bootstrap.sh | Update for newer version of GB | |
| copy.sh | Update for newer version of GB | |
| Makefile | Cleanup and split packet handlers | |
| parse.py | Do not filter packets by 5a heading | |
| parse_rfcomm.py | Update and improve parser | |
| parse_rfcomm_pyshark.py | Update and improve parser | |
| README.md | Update for newer version of GB | |
| requirements.txt | Update requirements and readme | |
| rfcomm.py | Add RFCOMM support | |
Java parser
This uses the packet parsing code we implemented in Gadgerbridge to parse bluetooth pcaps.
Last tested on commit c4ca8d6b3b2eba227a1b76ec1c54ea9d044a8eb9 from the master branch of Gadgetbridge.
There are a couple of steps to using this:
-
Install the requirements for python
pip install -r requirements.txt(I recommend using a virtual environment) -
Get the files from GB
./copy.sh [path to GB] ./bootstrapAlso run these commands after cloning the repo.
-
Pipe the output from
parse.py(with the right arguments) to the Java application:./parse.py [bluetooth.pcapng] [mac:address] | make runor
./parse_rfcomm_pyshark.py -i [bt.pcapng] -m [mac] -c [channel] | make run ./parse_rfcomm.py -i [bt.pcapng] -m [mac] -c [channel] | make runif the band uses RFCOMM
Also nice: pipe that to a file for easier reading (for example append | tee [file] on Linux).
Note on file format
The file format of the bluetooth.pcapng has to be supported by Scapy.
Most notably, the btsnoop format is not supported.
If encountered, it can easily be converted using Wireshark.