JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 27.04.2017, 03:47
Anjo1077 Anjo1077 is offline
Super Loader
 
Join Date: Jul 2012
Location: Brasil
Posts: 27
Default 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]]]
EDIT:
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
This token is from the html here:
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>
This "_" is not necessary.
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.
Reply With Quote
  #2  
Old 28.04.2017, 11:31
Anjo1077 Anjo1077 is offline
Super Loader
 
Join Date: Jul 2012
Location: Brasil
Posts: 27
Default

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]]]
05:30 AM here and finally I can go to bed.
Reply With Quote
  #3  
Old 28.04.2017, 18:51
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,911
Default

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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 15:29.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.