{"id":13826553,"url":"https://github.com/adafruit/adafruit_blesniffer_python","last_synced_at":"2025-05-09T00:09:36.513Z","repository":{"id":23893157,"uuid":"27272688","full_name":"adafruit/Adafruit_BLESniffer_Python","owner":"adafruit","description":"Python API for Adafruit's Bluefruit LE Sniffer","archived":false,"fork":false,"pushed_at":"2024-07-15T15:22:07.000Z","size":538,"stargazers_count":103,"open_issues_count":7,"forks_count":52,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-09T00:09:30.748Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adafruit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-28T15:39:02.000Z","updated_at":"2025-04-26T14:48:00.000Z","dependencies_parsed_at":"2024-09-28T09:40:26.214Z","dependency_job_id":"75e3fd5d-e8c8-490c-8922-00870dcd2128","html_url":"https://github.com/adafruit/Adafruit_BLESniffer_Python","commit_stats":{"total_commits":20,"total_committers":7,"mean_commits":2.857142857142857,"dds":0.75,"last_synced_commit":"36a0ac3eb9f287af524575bfedd3dab0be018741"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_BLESniffer_Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_BLESniffer_Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_BLESniffer_Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_BLESniffer_Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adafruit","download_url":"https://codeload.github.com/adafruit/Adafruit_BLESniffer_Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166521,"owners_count":21864482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T09:01:40.160Z","updated_at":"2025-05-09T00:09:36.485Z","avatar_url":"https://github.com/adafruit.png","language":"C","funding_links":[],"categories":["\u003ca id=\"7bf0f5839fb2827fdc1b93ae6ac7f53d\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"32739127f0c38d61b14448c66a797098\"\u003e\u003c/a\u003e嗅探\u0026\u0026Sniff"],"readme":"# Python API for Bluefruit LE Sniffer \n\nThis repository contains the Python API for Adafruit's Bluefruit LE Sniffer, and our easy to use API wrapper.\n\nIt has been tested on the following platforms using Python 2.7:\n\n- OSX 10.10\n- Windows 7 x64\n- Ubuntu 14.04\n\n## Related Links\n\nBluefruit LE Sniffer product page: https://www.adafruit.com/product/2269\nBluefruit LE Sniffer Learning Guide: https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-sniffer/introduction\n\n# Sniffer Python Wrapper\n\nRunning sniffer.py in this folder on the Bluefruit LE Friend Sniffer Edition board will cause the device to scan for Bluetooth LE devices in range, and log any data from the selected device to a libpcap file (in `logs/capture.pcap`) that can be opened in Wireshark.\n\nThe current example does not enable live streaming of data directly into Wireshark via named pipes since this would require a pre-compiled utility for each platform, but it should be possible to implement this on your platform if required.\n\n\n## Using sniffer.py\n\nTo use sniffer.py, simply specify the serial port where the sniffer can be found (ex. `COM14` on Windows, `/dev/tty.usbmodem1412311` on OS X, `/dev/ttyACM0` or Linux, etc.):\n\n```\npython sniffer.py /dev/tty.usbmodem1412311\n```\n\n**Note:** You will need to run python with `sudo` on Linux to allow the log file to be created, so `sudo python sniffer.py /dev/ttyACM0`, etc..\n\nThis will create a new log file and start scanning for BLE devices, which should result in the following menu:\n\n```\n$ python sniffer.py /dev/tty.usbmodem1412311\nLogging data to logs/capture.pcap\nConnecting to sniffer on /dev/tty.usbmodem1412311\nScanning for BLE devices (5s) ...\nFound 2 BLE devices:\n\n  [1] \"\" (14:99:E2:05:29:CF, RSSI = -85)\n  [2] \"\" (E7:0C:E1:BE:87:66, RSSI = -49)\n\nSelect a device to sniff, or '0' to scan again\n\u003e \n```\n\nSimply select the device you wish to sniff, and it will start logging traffic from the specified device.\n\nType **CTRL+C** to stop sniffing and quit the application, closing the libpcap log file.\n\n**NOTE:** You may need to remove the sniffer and re-insert it before starting a new session if you see any unusual error messages running sniffer.py.\n\n## Requirements\n\nThis Python script was written and tested on **Python 2.7.6**, and will require that both Python 2.7 and **pySerial** are installed on your system.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fadafruit_blesniffer_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadafruit%2Fadafruit_blesniffer_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fadafruit_blesniffer_python/lists"}