#1
|
|||
|
|||
LEDE 17.01.1 Firmware
Hi, I have this LEDE 17.01.1 Firmware on my TP-Link TL-WDR3500 v1 (LEDE Reboot 17.01.0 r3205-59508e3 / LuCI lede-17.01 branch (git-17.051.53299-a100738)).
Just to clarify, on my config I create the fourth interface called "Internet" but by default we have only three interfaces and the internet connection is usually set to "wan". This is my recorded script: Code:
[[[HSRC]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] POST /cgi-bin/luci HTTP/1.1 Host: %%%routerip%%% luci_username=root&luci_password=%%%password%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci/ HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci/?status=1&_=0.9236406086785829 HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci/admin/network/network HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci/admin/network/iface_status/Internet,lan,wan,wan6?_=0.6925993909065087 HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] POST /cgi-bin/luci/admin/network/iface_shutdown/Internet HTTP/1.1 Host: %%%routerip%%% token=707c7480eac8d6a5af57b470c71289f9&_=0.23984304297835268 [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci/admin/network/iface_status/Internet,lan,wan,wan6?_=0.7139228047405897 HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] POST /cgi-bin/luci/admin/network/iface_reconnect/Internet HTTP/1.1 Host: %%%routerip%%% token=707c7480eac8d6a5af57b470c71289f9&_=0.6037659788031238 [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci/admin/network/iface_status/Internet,lan,wan,wan6?_=0.3943701399193096 HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[/STEP]]] [[[/HSRC]]] The POST from my browser: Code:
POST **External links are only visible to Support Staff**Request Headers: Host: localhost:8972 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0 Accept: */* Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Referer: **External links are only visible to Support Staff**Content-Length: 59 Cookie: sysauth=10182cd8fc97c7ba2e448d31769b8671 DNT: 1 Connection: keep-alive Request Body: token=94a0c8d4caf2d0c591f5faf04bba3769&_=0.6861135304596157 Code:
<div> <input type="hidden" name="token" value="94a0c8d4caf2d0c591f5faf04bba3769" /> <input type="hidden" name="cbi.submit" value="1" /> <input type="submit" value="Salvar" class="hidden" /> </div> Now, how to proceed? How I can collect this "token" from the html code and the sysauth from the cookie? Last edited by Anjo1077; 28.04.2017 at 10:18. |
#2
|
|||
|
|||
With a lot of research I got it.
Code:
[[[HSRC]]] [[[STEP]]] [[[DEFINE routername="LEDE Reboot 17.01.0"/]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] POST /cgi-bin/luci/ HTTP/1.1 Host: %%%routerip%%% luci_username=%%%user%%%&luci_password=%%%pass%%% [[[/REQUEST]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] GET /cgi-bin/luci/admin/network/network HTTP/1.1 Host: %%%routerip%%% [[[/REQUEST]]] [[[RESPONSE keys="token"]]] token\" value\=\"(.*?)\" [[[/RESPONSE]]] [[[/STEP]]] [[[STEP]]] [[[REQUEST]]] POST /cgi-bin/luci/admin/network/iface_reconnect/Internet HTTP/1.1 Host: %%%routerip%%% Cookie: %%%Set-Cookie%%% token=%%%token%%% [[[/REQUEST]]] [[[/STEP]]] [[[/HSRC]]] |
#3
|
||||
|
||||
Thanks for your effort - I'm sure this will help other users in the future
GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|