==> Toggle Tuya device's power off and on again 6 times, with ~1 sec pauses in between, to enable AP mode. Repeat if your device's SSID doesn't show up within ~30 seconds. For smart plugs long press the reset button on the device for about 5 seconds. See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
Scanning for open Tuya SmartLife AP
......................................................................................................................................................
Found access point name: "SmartLife-E14C", trying to connect..
Device 'wlan0' successfully activated with '9a41bf73-fb77-413d-acfa-d46987756de1'.
Connected to access point.
Waiting 1 sec to allow device to set itself up..
Running initial exploit toolchain..
Exploit run, saved device config to!
output=/work/configured-devices/nWWRvwMi9Pjx.deviceconfig
Saved device config in /work/configured-devices/nWWRvwMi9Pjx.deviceconfig
==> Turn the device off and on again once. Repeat 6 more times if your device's SSID doesn't show up within ~5 seconds. For smart plugs long press the reset button on the device for about 5 seconds. See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
Scanning for open Tuya SmartLife AP
..
Found access point name: "SmartLife-E14C", trying to connect..
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
...
Found access point name: "A-E14C", trying to connect..
Device 'wlan0' successfully activated with '9edb58ad-049e-4401-a24e-ac8a6b592c4b'.
Connected to access point.
Configured device to connect to 'cloudcutterflash'
Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
Flashing custom firmware ..
==> Wait for 20-30 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
Using WLAN adapter: wlan0
Jan 22 11:41:20 dnsmasq[15]: started, version 2.80 cachesize 150
Jan 22 11:41:20 dnsmasq[15]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
Jan 22 11:41:20 dnsmasq-dhcp[15]: DHCP, IP range 10.42.42.10 -- 10.42.42.40, lease time 12h
Jan 22 11:41:20 dnsmasq-dhcp[15]: DHCP, sockets bound exclusively to interface wlan0
Jan 22 11:41:20 dnsmasq[15]: read /etc/hosts - 5 addresses
Configuration file: /dev/stdin
Using interface wlan0 with hwaddr b4:b0:24:e7:a4:5f and ssid "cloudcutterflash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
Jan 22 11:41:27 dnsmasq-dhcp[15]: 1589176993 available DHCP range: 10.42.42.10 -- 10.42.42.40
Jan 22 11:41:27 dnsmasq-dhcp[15]: 1589176993 client provides name: wlan0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 DHCPDISCOVER(wlan0) a0:92:08:9a:e1:4c
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 tags: wlan0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 DHCPOFFER(wlan0) 10.42.42.10 a0:92:08:9a:e1:4c
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 requested options: 1:netmask, 3:router, 28:broadcast, 6:dns-server
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 next server: 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 1 option: 53 message-type 2
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 54 server-identifier 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 51 lease-time 12h
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 58 T1 6h
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 59 T2 10h30m
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 1 netmask 255.255.255.0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 28 broadcast 10.42.42.255
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 3 router 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 6 dns-server 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 available DHCP range: 10.42.42.10 -- 10.42.42.40
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 client provides name: wlan0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 DHCPDISCOVER(wlan0) a0:92:08:9a:e1:4c
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 tags: wlan0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 DHCPOFFER(wlan0) 10.42.42.10 a0:92:08:9a:e1:4c
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 requested options: 1:netmask, 3:router, 28:broadcast, 6:dns-server
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 next server: 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 1 option: 53 message-type 2
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 54 server-identifier 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 51 lease-time 12h
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 58 T1 6h
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 59 T2 10h30m
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 1 netmask 255.255.255.0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 28 broadcast 10.42.42.255
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 3 router 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 6 dns-server 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 available DHCP range: 10.42.42.10 -- 10.42.42.40
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 client provides name: wlan0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 DHCPREQUEST(wlan0) 10.42.42.10 a0:92:08:9a:e1:4c
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 tags: wlan0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 DHCPACK(wlan0) 10.42.42.10 a0:92:08:9a:e1:4c wlan0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 requested options: 1:netmask, 3:router, 28:broadcast, 6:dns-server
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 next server: 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 1 option: 53 message-type 5
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 54 server-identifier 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 51 lease-time 12h
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 58 T1 6h
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 59 T2 10h30m
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 1 netmask 255.255.255.0
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 28 broadcast 10.42.42.255
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 3 router 10.42.42.1
Jan 22 11:41:30 dnsmasq-dhcp[15]: 1589176993 sent size: 4 option: 6 dns-server 10.42.42.1
Jan 22 11:41:49 dnsmasq[15]: query[A] h3.iot-dns.com from 10.42.42.10
Jan 22 11:41:49 dnsmasq[15]: config h3.iot-dns.com is 10.42.42.1
Using PSK v1 - Received PSK ID version 01
[LOG (Client)] Request: HTTPServerRequest(protocol='https', host='h3.iot-dns.com', method='POST', uri='/v2/url_config', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
b'{"region":"AA","env":"","uuid":"nWWRvwMi9Pjx","ts":51,"sign":"Og3QmnRQVKwvuP4IP+HtXww4cQwHykmnhG2nqyiO4gs=","config":[{"key":"httpUrl","need_ca":false},{"key":"mqttUrl","need_ca":false},{"key":"httpsPSKUrl","need_ca":false},{"key":"mqttsPSKUrl","need_ca":false}]}'
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {"caArr":null,"httpUrl":{"addr":"http://10.42.42.1/d.json","ips":["10.42.42.1"]},"mqttUrl":{"addr":"10.42.42.1:1883","ips":["10.42.42.1"]},"ttl":600}
[I 230122 11:41:50 web:2271] 200 POST /v2/url_config (10.42.42.10) 97.29ms
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.active&et=1&t=52&uuid=nWWRvwMi9Pjx&v=4.4&sign=67d820ecb1afce3158e6d8556eb4465d', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'token': 'AAAAAA', 'softVer': '1.0.10', 'productKey': 'yqiqbaldtr0i7mru', 'protocolVer': '2.2', 'baselineVer': '40.00', 'productKeyStr': 'keyr5qhaxgstx9ys', 'devId': 'bfe5a90124941e152a5v2z', 'hid': 'a092089ae14c', 'modules': '[{"otaChannel":9,"softVer":"1.1.6","online":true}]', 'devAttribute': 579, 'cadVer': '1.0.3', 'cdVer': '1.0.0', 'options': '{"isFK":false,"otaChannel":0}', 't': 52}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'schema': '[{"trigger":"direct","type":"obj","mode":"ro","property":{"range":["alarm","normal"],"type":"enum"},"id":1},{"type":"obj","mode":"ro","property":{"range":["low","middle","high"],"type":"enum"},"id":3}]', 'devId': 'NCh1AQO2ZT2gUeGiM35C', 'resetFactory': False, 'timeZone': '+02:00', 'capability': 1025, 'secKey': 'YOWlMWCwWg1UjKrG', 'stdTimeZone': '+01:00', 'schemaId': '000003ald7', 'dstIntervals': [], 'localKey': 'piUJdvmwj7U7rC6C'}, 'success': True, 't': 1674387710}
[I 230122 11:41:50 web:2271] 200 POST /d.json?a=tuya.device.active&et=1&t=52&uuid=nWWRvwMi9Pjx&v=4.4&sign=67d820ecb1afce3158e6d8556eb4465d (10.42.42.10) 102.73ms
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.dynamic.config.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387710&v=2.0&sign=97bb2b5faf7ea220136d914eb8852a67', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'type': '["timezone"]', 't': 1674387710}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'ackId': '0-0', 'validTime': 1800, 'time': 1674387711, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}, 'timezone': {'ackId': '0-0', 'validTime': 1800, 'time': 1674387711, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}}}, 't': 1674387711, 'success': True}
[I 230122 11:41:51 web:2271] 200 POST /d.json?a=tuya.device.dynamic.config.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387710&v=2.0&sign=97bb2b5faf7ea220136d914eb8852a67 (10.42.42.10) 109.93ms
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.dynamic.config.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387713&v=2.0&sign=975ebe6857ade7acea0e34237f856d33', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'type': '["timezone","rateRule"]', 't': 1674387713}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'ackId': '0-0', 'validTime': 1800, 'time': 1674387714, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}, 'timezone': {'ackId': '0-0', 'validTime': 1800, 'time': 1674387714, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}}}, 't': 1674387714, 'success': True}
[I 230122 11:41:54 web:2271] 200 POST /d.json?a=tuya.device.dynamic.config.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387713&v=2.0&sign=975ebe6857ade7acea0e34237f856d33 (10.42.42.10) 130.56ms
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.uuid.pskkey.get&et=1&t=1674387713&uuid=nWWRvwMi9Pjx&v=1.0&sign=d7f4ebb023dd240ae7e24ee8846ee4ee', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'t': 1674387713}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'pskKey': ''}, 't': 1674387714, 'success': True}
[I 230122 11:41:54 web:2271] 200 POST /d.json?a=tuya.device.uuid.pskkey.get&et=1&t=1674387713&uuid=nWWRvwMi9Pjx&v=1.0&sign=d7f4ebb023dd240ae7e24ee8846ee4ee (10.42.42.10) 87.42ms
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.dynamic.config.ack&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387714&v=2.0&sign=67d85507dfbf4c383bb0fef94d139fb9', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'ackList': [{'type': 'timezone', 'ackId': '0-0'}], 't': 1674387714}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'t': 1674387714, 'success': True}
[I 230122 11:41:54 web:2271] 200 POST /d.json?a=tuya.device.dynamic.config.ack&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387714&v=2.0&sign=67d85507dfbf4c383bb0fef94d139fb9 (10.42.42.10) 101.52ms
Sending firmware update message {"data":{"firmwareType":0},"protocol":15,"t":1674387716} using protocol 2.2
Firmware update messages triggered. Device will download and reset. Exiting in 30 seconds.
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.upgrade.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387715&v=4.4&sign=85cec61ef67a49d6280ff239996da08a', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'type': 0, 't': 1674387715}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'url': 'http://10.42.42.1:80/files/OpenBK7231N_UG_1.15.344.bin', 'hmac': 'B42E38CD069618E5F8A0D5BCA9C8B0C997DBD349BCC1083F03CEC781577C3933', 'version': '9.0.0', 'size': '610640', 'type': 0}, 'success': True, 't': 1674387717}
[I 230122 11:41:57 web:2271] 200 POST /d.json?a=tuya.device.upgrade.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387715&v=4.4&sign=85cec61ef67a49d6280ff239996da08a (10.42.42.10) 117.32ms
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.upgrade.status.update&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387717&v=4.1&sign=acd94108e83b55f62b63975ae73ad6ff', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'type': 0, 'upgradeStatus': 2, 't': 1674387717}
[LOG (Client)] ==== End request body ===
!!! Endpoint default response not found - tuya.device.upgrade.status.update
[LOG (Server)] Response: {'success': True, 't': 1674387717}
[I 230122 11:41:57 web:2271] 200 POST /d.json?a=tuya.device.upgrade.status.update&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387717&v=4.1&sign=acd94108e83b55f62b63975ae73ad6ff (10.42.42.10) 101.77ms
Sending firmware update message {"data":{"firmwareType":0},"protocol":15,"t":1674387719} using protocol 2.2
Firmware update messages triggered. Device will download and reset. Exiting in 30 seconds.
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.upgrade.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387718&v=4.4&sign=0eab500eb4cdb29cd2768ed8565297c1', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'type': 0, 't': 1674387718}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'url': 'http://10.42.42.1:80/files/OpenBK7231N_UG_1.15.344.bin', 'hmac': 'B42E38CD069618E5F8A0D5BCA9C8B0C997DBD349BCC1083F03CEC781577C3933', 'version': '9.0.0', 'size': '610640', 'type': 0}, 'success': True, 't': 1674387719}
[I 230122 11:41:59 web:2271] 200 POST /d.json?a=tuya.device.upgrade.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387718&v=4.4&sign=0eab500eb4cdb29cd2768ed8565297c1 (10.42.42.10) 24.41ms
[I 230122 11:41:59 web:2271] 200 GET /files/OpenBK7231N_UG_1.15.344.bin (10.42.42.10) 2204.27ms
[DEVICE OTA] Responding to device OTA HTTP request range: bytes=0-610639/610640
[I 230122 11:42:04 web:2271] 206 GET /files/OpenBK7231N_UG_1.15.344.bin (10.42.42.10) 125.17ms
[DEVICE OTA] Responding to device OTA HTTP request range: bytes=56864-610639/610640
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.upgrade.silent.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387726&v=4.4&sign=e21c4eb62866e1f82414dd3435570f39', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'subId': None, 't': 1674387726}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'url': 'http://10.42.42.1:80/files/OpenBK7231N_UG_1.15.344.bin', 'hmac': 'B42E38CD069618E5F8A0D5BCA9C8B0C997DBD349BCC1083F03CEC781577C3933', 'version': '9.0.0', 'size': '610640', 'type': 0}, 'success': True, 't': 1674387726}
[I 230122 11:42:06 web:2271] 200 POST /d.json?a=tuya.device.upgrade.silent.get&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387726&v=4.4&sign=e21c4eb62866e1f82414dd3435570f39 (10.42.42.10) 110.77ms
[LOG (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.timer.count&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387726&v=4.0&sign=b04902b97bd110f7e0441e5e12f47ed7', version='HTTP/1.1', remote_ip='10.42.42.10')
[LOG (Client)] ==== Request body ===
{'devId': 'NCh1AQO2ZT2gUeGiM35C', 'lastFetchTime': '0', 't': 1674387726}
[LOG (Client)] ==== End request body ===
[LOG (Server)] Response: {'result': {'devId': 'NCh1AQO2ZT2gUeGiM35C', 'count': 0, 'lastFetchTime': 0}, 't': 1674387727, 'success': True}
[I 230122 11:42:07 web:2271] 200 POST /d.json?a=tuya.device.timer.count&devId=NCh1AQO2ZT2gUeGiM35C&et=1&t=1674387726&v=4.0&sign=b04902b97bd110f7e0441e5e12f47ed7 (10.42.42.10) 101.19ms
[I 230122 11:42:10 web:2271] 206 GET /files/OpenBK7231N_UG_1.15.344.bin (10.42.42.10) 131.92ms
[DEVICE OTA] Responding to device OTA HTTP request range: bytes=56864-610639/610640
[I 230122 11:42:14 web:2271] 206 GET /files/OpenBK7231N_UG_1.15.344.bin (10.42.42.10) 136.58ms
[DEVICE OTA] Responding to device OTA HTTP request range: bytes=56864-610639/610640
[I 230122 11:42:20 web:2271] 206 GET /files/OpenBK7231N_UG_1.15.344.bin (10.42.42.10) 227.88ms
[DEVICE OTA] Responding to device OTA HTTP request range: bytes=56864-610639/610640
[I 230122 11:42:25 web:2271] 206 GET /files/OpenBK7231N_UG_1.15.344.bin (10.42.42.10) 229.53ms
[DEVICE OTA] Responding to device OTA HTTP request range: bytes=56864-610639/610640