mirror of
https://github.com/tuya-cloudcutter/tuya-cloudcutter.git
synced 2026-02-19 21:51:18 +01:00
Send post-exploit WiFi config payload a few times over a 1.5sec period, may improve reliability
This commit is contained in:
@@ -192,10 +192,12 @@ def __configure_wifi(args):
|
||||
payload = {"ssid": SSID, "passwd": password, "token": "AAAAAAAA"}
|
||||
payload = json.dumps(payload)
|
||||
|
||||
print(f"{payload=}")
|
||||
|
||||
datagram = build_network_config_packet(payload.encode('ascii'))
|
||||
send_network_config_datagram(datagram)
|
||||
# Send the configuration diagram a few times with minor delay
|
||||
# May improve reliability in some setups
|
||||
for _ in range(5):
|
||||
send_network_config_datagram(datagram)
|
||||
time.sleep(0.300)
|
||||
print(f"Configured device to connect to '{SSID}'")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user