Thread: [Reconnect working] Script search for sagemcom 4
View Single Post
  #7  
Old 06.09.2021, 02:32
bugnotme bugnotme is offline
BugMeNot Account
 
Join Date: Apr 2013
Posts: 348
Default

I think I might be onto something. I tried the following requests with HTTP request Maker on Firefox and got my router to reboot. However, translating these request into Reconnect Script doesn't seem to work. I must have done an error somewhere.

First I open my browser and go to my Livebox login page. Then I press SHIFT+ALT+Y to open the HTTP request Maker. The requests below only work if they're executed on the router's login page, it doesn't work on an empty tab, even when supplying the right address in the Target Site field.

REQUEST #1
Quote:
Target Site: **External links are only visible to Support Staff****External links are only visible to Support Staff** (My router's IP + /ws)

Method: POST

Request Headers:

authorization: X-Sah-Login
content-length: 158
connection: keep-alive

Body Data:

{"service":"sah.Device.Information","method":"createContext","parameters":{"applicationName":"so_sdk ut","username":"admin","password":"MY PASSWORD THAT MAKES THE ENTIRE BODY A TOTAL OF 158 CHARACTERS"}}
Response Data:
Quote:
{'status':0,'data':{'contextID':'A UNIQUE ID THAT CHANGES EVERYTIME THAT REQUEST IS SENT BUT IS REQUIRED FOR THE NEXT REQUESTS','username':'admin','groups':'http,admin'}}
REQUEST #2:
Quote:
Target Site: **External links are only visible to Support Staff****External links are only visible to Support Staff** (My router's IP + /ws)

Method: POST

Request Headers:

authorization: X-Sah THE CONTEXT ID I WAS GIVEN DURING REQUEST 1.
connection: keep-alive
x-context: THE CONTEXT ID I WAS GIVEN DURING REQUEST 1.
content-length: 466
content-type: application/x-sah-ws-4-call+json

Body Data:

{"service":"Probe","method":"logEvents","parameters":{"events":[{"EventSource":"gui_module","EventKey":"GUI","EventParameters":{"userSession":"THE CONTEXT ID I WAS GIVEN DURING REQUEST 1.","source":"GUI","page":"Redémarrage","state":"Défaut","action":"restart","browserName":"Firefox ","browserVersion":"91.0","browserEngine":"","deviceType":"","deviceVendor":"","deviceModel":"","osN ame":"Windows","osVersion":"10","screenSize":"1920x1080"}}]}}
Response Data:
Quote:
{'status':true}
REQUEST #3:
Quote:
Target Site: **External links are only visible to Support Staff****External links are only visible to Support Staff** (My router's IP + /ws)

Method: POST

Request Headers:

authorization: X-Sah THE CONTEXT ID I WAS GIVEN DURING REQUEST 1.
connection: keep-alive
x-context: THE CONTEXT ID I WAS GIVEN DURING REQUEST 1.
content-length: 72
content-type: application/x-sah-ws-4-call+json

Body Data:

{"service":"NMC","method":"reboot","parameters":{"reason":"GUI_Reboot"}}
Response Data:
Quote:
{'status':true}
Reply With Quote