Remove dead comments

This commit is contained in:
jpk 2023-05-10 11:02:02 +02:00
parent ece994bf3b
commit bc3e1dfd6f
3 changed files with 10 additions and 12 deletions

2
.gitignore vendored
View File

@ -158,5 +158,3 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/

View File

@ -62,7 +62,7 @@ repos:
rev: 23.3.0 rev: 23.3.0
hooks: hooks:
- id: black - id: black
language_version: python3.10 language_version: python3.11
- repo: https://github.com/PyCQA/bandit - repo: https://github.com/PyCQA/bandit
rev: 1.7.5 rev: 1.7.5
hooks: hooks:

View File

@ -1,15 +1,19 @@
import asyncio import asyncio
from bleak import BleakClient, BleakGATTCharacteristic
import bleak.exc import bleak.exc
from bleak import BleakClient, BleakGATTCharacteristic
from hexdump import hexdump from hexdump import hexdump
from icecream import ic from icecream import ic
address = "C8:05:E1:A1:93:00" address = "C8:05:E1:A1:93:00"
services = {
services = {"read": [], "notify": [], "write": [], "write-without-response": [], "indicate": []} "read": [],
"notify": [],
"write": [],
"write-without-response": [],
"indicate": [],
}
async def notification_handler(sender: BleakGATTCharacteristic, data: bytearray): async def notification_handler(sender: BleakGATTCharacteristic, data: bytearray):
@ -41,7 +45,7 @@ async def main(address):
services[prop].append(char) services[prop].append(char)
ic(char.handle) ic(char.handle)
ic("" * 79) ic("" * 79)
line ="[+] {}".format("="*70) line = "[+] {}".format("=" * 70)
ic(line) ic(line)
for service in services["notify"]: for service in services["notify"]:
@ -49,10 +53,6 @@ async def main(address):
for service in services["notify"]: for service in services["notify"]:
try: try:
# await client.start_notify("00002ad2-0000-1000-8000-00805f9b34fb", notification_handler)
# await client.start_notify("00002ada-0000-1000-8000-00805f9b34fb", notification_handler)
# await client.start_notify("00002ad3-0000-1000-8000-00805f9b34fb", notification_handler)
ic(f"[+] start_notify {service}") ic(f"[+] start_notify {service}")
await client.start_notify(service.uuid, notification_handler) await client.start_notify(service.uuid, notification_handler)
ic(f"[+] handler registered for {service.uuid}") ic(f"[+] handler registered for {service.uuid}")