Giter VIP home page Giter VIP logo

Comments (19)

cyberrep avatar cyberrep commented on May 29, 2024

Hey buddy, I leave another cmd pinging and when the exploit start, its loose the connection and after like a minute its back
its stop when start Wait smartcontroller activation ...
Its weird because I use same cable for the others

from xmir-patcher.

remittor avatar remittor commented on May 29, 2024

I leave another cmd pinging and when the exploit start, its loose the connection and after like a minute its back its stop

Maybe the device is rebooting?
At this moment LuCI answers?

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

Good question, how I know ? ;-) if you mean web, no its stop. I'll try again to check the lights status

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

Ok,both lights are white and the command "wait smartcontroller" is send, the AX3000 reboot.

from xmir-patcher.

remittor avatar remittor commented on May 29, 2024

try to uncomment this lines:

xmir-patcher/connect5.py

Lines 282 to 285 in b1e2c7b

#print('Change date ...')
#time.sleep(20)
#res = exec_tiny_cmd("date -s 203301020304")
#die('----- TEST FINISHED ------')

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

Good morning!

This is the result
Enable smartcontroller scene executor ...
Change date ...

ERROR: ----- TEST FINISHED ------

from xmir-patcher.

remittor avatar remittor commented on May 29, 2024
  1. Revert changes.
  2. Change timeout to 10 sec in this line:
    time.sleep(2)
  3. Uncomment line:
    #print(res)

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

with the time 10 work well, but....

Wait smartcontroller activation ...
{ "code": 0, "msg": "" }
Unlock dropbear service ...

SSH Enable, read full device.
When I try to get dump, I get an error

Backup of "crashsyslog" saved to file "./backups/mtd17_crashsyslog.bin"
ERROR on execute command: "dd if=/dev/mtd18 of=/tmp/mtd_dump.bin"
Traceback (most recent call last):
File "create_backup.py", line 109, in
gw.run_cmd("rm -f " + fn_remote)
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\gateway.py", line 734, in run_cmd
channel = ssh.open_session()
File "ssh2\session.pyx", line 400, in ssh2.session.Session.open_session
File "ssh2\utils.pyx", line 148, in ssh2.utils.handle_error_codes
ssh2.exceptions.Timeout

And I have to shutdown the AP, and after when try to apply item 2
Wait smartcontroller activation ...
============ smartcontroller failed ============
Traceback (most recent call last):
File "connect.py", line 55, in
import connect5
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 293, in
res = exec_tiny_cmd("date -s 203301020304")
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 163, in exec_tiny_cmd
raise ExploitError(f'Error on exec command "scene_start_by_crontab" => {res}')
connect5.ExploitError: Error on exec command "scene_start_by_crontab" => {"code":-101,"msg":"request server timeout"}

I'm doing the AP reset to start again

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

second test after reset the AP
SSH Enable, read full device, dump ok

maybe just did wrong in the first time!

I'll try the others

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

The other one
I try with time 10 and change to 20 (until start to ping again)

error

============ smartcontroller failed ============
Traceback (most recent call last):
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 174, in _new_conn
File "d:\python\python38\Lib\site-packages\urllib3/util/connection.py", line 96, in create_connection
File "d:\python\python38\Lib\site-packages\urllib3/util/connection.py", line 86, in create_connection
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\python\python38\Lib\site-packages\urllib3/connectionpool.py", line 699, in urlopen
File "d:\python\python38\Lib\site-packages\urllib3/connectionpool.py", line 394, in _make_request
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 239, in request
File "http\client.py", line 1252, in request
File "http\client.py", line 1298, in _send_request
File "http\client.py", line 1247, in endheaders
File "http\client.py", line 1007, in _send_output
File "http\client.py", line 947, in send
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 205, in connect
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 179, in _new_conn
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x000001E78210D2B0>, 'Connection to 172.16.0.2 timed out. (connect timeout=7)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\python\python38\Lib\site-packages\requests/adapters.py", line 439, in send
File "d:\python\python38\Lib\site-packages\urllib3/connectionpool.py", line 755, in urlopen
File "d:\python\python38\Lib\site-packages\urllib3/util/retry.py", line 574, in increment
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='172.16.0.2', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=2cb0ebdc27bdfaa4a406e456da285cc1/api/xqsmarthome/request_smartcontroller (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x000001E78210D2B0>, 'Connection to 172.16.0.2 timed out. (connect timeout=7)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 73, in exec_smart_cmd
res = requests.post(gw.apiurl + api, data = { "payload": payload }, timeout = timeout)
File "d:\python\python38\Lib\site-packages\requests/api.py", line 117, in post
File "d:\python\python38\Lib\site-packages\requests/api.py", line 61, in request
File "d:\python\python38\Lib\site-packages\requests/sessions.py", line 542, in request
File "d:\python\python38\Lib\site-packages\requests/sessions.py", line 655, in send
File "d:\python\python38\Lib\site-packages\requests/adapters.py", line 504, in send
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='172.16.0.2', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=2cb0ebdc27bdfaa4a406e456da285cc1/api/xqsmarthome/request_smartcontroller (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x000001E78210D2B0>, 'Connection to 172.16.0.2 timed out. (connect timeout=7)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "connect.py", line 55, in
import connect5
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 293, in
res = exec_tiny_cmd("date -s 203301020304")
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 133, in exec_tiny_cmd
res = exec_smart_cmd(pdata)
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 76, in exec_smart_cmd
raise ExploitError(f'Cannot send POST-request "{sc_command}" to SmartController service. {msg}')
connect5.ExploitError: Cannot send POST-request "scene_setting" to SmartController service. HTTPConnectionPool(host='172.16.0.2', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=2cb0ebdc27bdfaa4a406e456da285cc1/api/xqsmarthome/request_smartcontroller (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x000001E78210D2B0>, 'Connection to 172.16.0.2 timed out. (connect timeout=7)'))

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

others same problem (2 dones with original code, 1 done with 10 seconds) I have more 2, weird right

Wait smartcontroller activation ...
============ smartcontroller failed ============
Traceback (most recent call last):
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 174, in _new_conn
File "d:\python\python38\Lib\site-packages\urllib3/util/connection.py", line 96, in create_connection
File "d:\python\python38\Lib\site-packages\urllib3/util/connection.py", line 86, in create_connection
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\python\python38\Lib\site-packages\urllib3/connectionpool.py", line 699, in urlopen
File "d:\python\python38\Lib\site-packages\urllib3/connectionpool.py", line 394, in _make_request
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 239, in request
File "http\client.py", line 1252, in request
File "http\client.py", line 1298, in _send_request
File "http\client.py", line 1247, in endheaders
File "http\client.py", line 1007, in _send_output
File "http\client.py", line 947, in send
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 205, in connect
File "d:\python\python38\Lib\site-packages\urllib3/connection.py", line 179, in _new_conn
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x0000020F149AF2B0>, 'Connection to 172.16.0.4 timed out. (connect timeout=7)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\python\python38\Lib\site-packages\requests/adapters.py", line 439, in send
File "d:\python\python38\Lib\site-packages\urllib3/connectionpool.py", line 755, in urlopen
File "d:\python\python38\Lib\site-packages\urllib3/util/retry.py", line 574, in increment
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='172.16.0.4', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=889600f0484d5ec8d91d21b211424705/api/xqsmarthome/request_smartcontroller (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000020F149AF2B0>, 'Connection to 172.16.0.4 timed out. (connect timeout=7)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 73, in exec_smart_cmd
res = requests.post(gw.apiurl + api, data = { "payload": payload }, timeout = timeout)
File "d:\python\python38\Lib\site-packages\requests/api.py", line 117, in post
File "d:\python\python38\Lib\site-packages\requests/api.py", line 61, in request
File "d:\python\python38\Lib\site-packages\requests/sessions.py", line 542, in request
File "d:\python\python38\Lib\site-packages\requests/sessions.py", line 655, in send
File "d:\python\python38\Lib\site-packages\requests/adapters.py", line 504, in send
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='172.16.0.4', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=889600f0484d5ec8d91d21b211424705/api/xqsmarthome/request_smartcontroller (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000020F149AF2B0>, 'Connection to 172.16.0.4 timed out. (connect timeout=7)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "connect.py", line 55, in
import connect5
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 293, in
res = exec_tiny_cmd("date -s 203301020304")
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 133, in exec_tiny_cmd
res = exec_smart_cmd(pdata)
File "B:\OneDrive@Programas Uteis@Drivers\Xiaomi\xmir-patcher\connect5.py", line 76, in exec_smart_cmd
raise ExploitError(f'Cannot send POST-request "{sc_command}" to SmartController service. {msg}')
connect5.ExploitError: Cannot send POST-request "scene_setting" to SmartController service. HTTPConnectionPool(host='172.16.0.4', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=889600f0484d5ec8d91d21b211424705/api/xqsmarthome/request_smartcontroller (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000020F149AF2B0>, 'Connection to 172.16.0.4 timed out. (connect timeout=7)'))

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

just an ammendment, they are in the mi home app (maybe is that?)

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

I add more debug to you code:

print(dst)
print(res)
print('Change date ...')
time.sleep(20)
res = exec_tiny_cmd("date -s 203301020304")
die('----- TEST FINISHED ------')

and I get
Enable smartcontroller scene executor ...
{'min': 52, 'day': 1, 'index': '0', 'month': 11, 'year': 2023, 'sec': 55, 'hour': 17, 'timezone': " ' ; reboot ; 195"}
{"code":0}
Change date ...

and when I see timezone = '' I just force to addtimezone and voila!!!

I have no ideia why theres a reboot at the end.
its fixed, if you add yo your code a way to fix a timezone its fix all problems!

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

Now I have 5 AX3000 done and 1 AX3600
tks a lot man!!!!

I wanna help more if you need something to test

from xmir-patcher.

remittor avatar remittor commented on May 29, 2024

" ' ; reboot ; 195"
if you add yo your code a way to fix a timezone its fix all problems!

Why did you have such a strange value stored in timezone?

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

Maybe its appear if we add using the mi home app, thats the only thing I can figure out.

from xmir-patcher.

remittor avatar remittor commented on May 29, 2024

Fixed 628fdc4

from xmir-patcher.

remittor avatar remittor commented on May 29, 2024

" ' ; reboot ; 195"

Could this be an artifact left by hack utility ShellClash?

Either this is an artifact of using these scripts: https://openwrt.org/toh/xiaomi/redmi_ax6000#set_bdata

from xmir-patcher.

cyberrep avatar cyberrep commented on May 29, 2024

Maybe, I dont remember if I try it. I can try to use the url script to check if you wanna

from xmir-patcher.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.