Created
August 5, 2022 13:07
-
-
Save 0x77dev/92790b52bd4ada9920365e812209d70c to your computer and use it in GitHub Desktop.
GoPro Max get wifi credentials using BLE via python bleak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from bleak import BleakScanner, BleakClient | |
async def main(): | |
devices = await BleakScanner.discover(service_uuids=["FEA6"]) | |
print(devices) | |
device = devices[0] | |
if not device: | |
print("No device found") | |
exit(-1) | |
print("Connecting to {}".format(device.name)) | |
async with BleakClient(device) as client: | |
wifi_ssid = str(await client.read_gatt_char("b5f90002-aa8d-11e3-9046-0002a5d5c51b")) | |
wifi_password = str(await client.read_gatt_char("b5f90003-aa8d-11e3-9046-0002a5d5c51b")) | |
print(wifi_ssid, wifi_password) | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment