JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #41  
Old 12.08.2011, 17:38
tom_b
Guest
 
Posts: n/a
Default Alice Modem WLAN 1421 (a little shorter and faster)

Quote:
Originally Posted by buggsy View Post
Liveheader/Curl Skript for Alice Modem WLAN 1421 with Firmware 1.00.11:

Regards
N.N.
A little shorter and faster...

Spoiler:

Code:
[[[HSRC]]]
    
    [[[STEP]]]
        [[[REQUEST]]]
        POST /cgi-bin/Hn_login.cgi HTTP/1.0
        Host: %%%routerip%%%
controller=Overview&action=Login&id=0&idTextPassword=%%%pass%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        POST /cgi-bin/Hn_wan.cgi HTTP/1.0
        Host: %%%routerip%%%
controller=Internet&action=DisconnectInternet&id=0&ReturnPage=%2Fdiagnostic.htm
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        POST /cgi-bin/Hn_wan.cgi HTTP/1.0
        Host: %%%routerip%%%
controller=Internet&action=ConnectInternet&id=0&ReturnPage=%2Fdiagnostic.htm
        [[[/REQUEST]]]
    [[[/STEP]]]

[[[/HSRC]]]
Reply With Quote
  #42  
Old 30.08.2011, 14:51
JoeST3
Guest
 
Posts: n/a
Default Thomson TWG850-4u reconnection script

This is my Thomson TWG850-4u reconnection script. I try it and manage to download and reconnect with no problem.

User Name:
Password:admin

Here go script!:thumbup:

Spoiler:
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /menu.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /RgSetup.asp HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /menu.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /RgDhcp.asp HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /menu.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /common.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
POST /goform/RgDhcp HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%

WanLeaseAction=1&WanConnectionType=0&Mtu=0&HostName=&DomainName=&SpoofedMacAddressMA0=00&SpoofedMacA ddressMA1=00&SpoofedMacAddressMA2=00&SpoofedMacAddressMA3=00&SpoofedMacAddressMA4=00&SpoofedMacAddre ssMA5=00
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /RgDhcp.asp HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /common.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /menu.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[/HSRC]]]



P.S.I posted this script in another thread but i think here is proper place to post it! So if this is double post and admin want to delete it please do it! Thanks!
Greetings!;)
Reply With Quote
  #43  
Old 22.09.2011, 09:06
jaguar69
Guest
 
Posts: n/a
Default

Working script for Linksys WRT120N

Took me ages - days - to understand what to do, but the info was on this site if what a little muddled, and in different places. I eventually found out how to do this using the reconnect recorder using the router web interface. Keep at it folks for those of you having trouble - perserverance is the key!:thumbup:

Removed as now not working properly!!

Last edited by jaguar69; 22.09.2011 at 09:29. Reason: Removed as now not working properly!!
Reply With Quote
  #44  
Old 10.11.2011, 17:20
mintichess
Guest
 
Posts: n/a
Default

TP-LINK TD-WB901G
54M wiereles adsl2+ modem router?
Reply With Quote
  #45  
Old 18.11.2011, 13:45
kitsune0
Guest
 
Posts: n/a
Default

ENG
The script for the router Comtrend VR-3025-un wich is really the model CT-5374 with a custom firmware from Jazztel.

User: admin
Pass: admin
IP: 192.168.1.1
(The data above may varie)
SPA
El script para el router Comtrend VR-3025-un el cual es realmente el modelo CT-5374 con un formware personalizado de Jazztel.

Usuario: admin
Clave: admin
IP: 192.168.1.1
(Los datos arriba pueden variar)
Code:
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /resetrouter.html HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[PARSE]]]
sesion:sessionKey='([0-9]+)'
[[[/PARSE]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /rebootinfo.cgi?sessionKey=%%%sesion%%% HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[/HSRC]]]
Reply With Quote
  #46  
Old 24.01.2012, 23:50
indaco
Guest
 
Posts: n/a
Default Tp-linktd-w8961nd

Working script for TP-LINKTD-W8961ND

Spoiler:
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /navigation-status.html HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /status.html HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /status/status_deviceinfo.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /js/general.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /status/status_deviceinfo.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /maintenance/tools_admin.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /navigation-maintenance.html HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /js/general.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /maintenance/tools_system.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
POST /Forms/tools_system_1 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%

restoreFlag=0&Restart=RIAVVIO
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /progress.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /navigation-status.html HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /status/status_deviceinfo.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /js/general.js HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /navigation-status.html HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /status/status_deviceinfo.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /js/general.js HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /basic/home_wan.htm HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /navigation-basic.html HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /basic/home_wan.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /js/general.js HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /js/general.js HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[/HSRC]]]
Reply With Quote
  #47  
Old 05.02.2012, 12:59
rekotc
Guest
 
Posts: n/a
Default working script for netgear DNG1000 (N-150)

this is the script im currently using for my netgear DGN1000 (N-150) firmware version V1.1.00.34_ww which is the "rest of the world" firmware version, give it a try

Spoiler:
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /start.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]


[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=wanstat.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=st_poe.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]


[[[STEP]]]
[[[REQUEST]]]
POST /setup.cgi HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%

todo=disconnect&this_file=st_poe.htm&next_file=st_poe.htm
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=st_poe.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]


[[[STEP]]]
[[[REQUEST]]]
POST /setup.cgi HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%

todo=connect&this_file=st_poe.htm&next_file=st_poe.htm
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=st_poe.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]


[[[/HSRC]]]
Reply With Quote
  #48  
Old 07.02.2012, 09:16
Ciaccia
Guest
 
Posts: n/a
Default LiveHeader script for NETGEAR WNDR4000 (firmware V1.0.0.88_9.1.77)

Hi all,
For my "new" NETGEAR WNDR4000 I wrote a new LiveHeader script. The script is simple, but needs to grab a secret "token" from the HTML using regex in order to work.

Code:
[[[HSRC]]]
    [[[STEP]]]
        [[[REQUEST]]]
        GET /RST_st_poe.htm HTTP/1.1
        Host: %%%routerip%%%
        Authorization: Basic %%%basicauth%%%
        [[[/REQUEST]]]
        [[[RESPONSE keys="cgi"]]]
        .*action=\"(st_poe.cgi\?id=[0-9]{10})\".*
        [[[/RESPONSE]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        POST /%%%cgi%%% HTTP/1.1
        Host: %%%routerip%%%
        Authorization: Basic %%%basicauth%%%

Disconnect=Disconnect&ConMethod=Disconnect&pppoe2=disable
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[WAIT seconds="5"/]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        POST /%%%cgi%%% HTTP/1.1
        Host: %%%routerip%%%
        Authorization: Basic %%%basicauth%%%

Connect=Connect&ConMethod=++Connect++&pppoe2=disable
        [[[/REQUEST]]]
    [[[/STEP]]]


    [[[STEP]]]
        [[[WAIT seconds="5"/]]]
    [[[/STEP]]]
[[[/HSRC]]]
Reply With Quote
  #49  
Old 20.02.2012, 03:59
kickass
Guest
 
Posts: n/a
Default TP-Link WR741ND + Cisco EPC3212 cable modem

here's my nifty lil cable reconnection script (python3).
it will assign a new mac address to the router and thus force the cable modem to request a new ip.
it should be easy to customize it for different hardware.

you will need python3 to run this.
**External links are only visible to Support Staff**DOWNLOAD
Attached Files
File Type: zip unityreset.zip (968 Bytes, 702 views)

Last edited by kickass; 20.02.2012 at 04:09.
Reply With Quote
Old 03.03.2012, 17:29
fefele
Message deleted by drbits.
  #50  
Old 01.05.2012, 14:10
junke
Guest
 
Posts: n/a
Default RouterOS v5.15 (Mikrotik)

I tried to use Liveheader/Curl but it didn't work (Webfig uses Javascript and iframes). Finally, I managed to reconnect RouterOS v5.15 (Mikrotik) using SSH. I had to add a reconnect script on the router because /system reboot didn't work ("y"-button must be pressed).

It requires a Linux box running JDownloader. Windows users may try using PuTTYgen + PuTTY instead of ssh-keygen + ssh, but I haven't tried it.

Linux - Generate keys
  • ssh-keygen -t dsa -f ~/.ssh/id_dsa_mikrotik -P ""
Webfig - Create User, upload key, assign key
  • Files
    Upload: .ssh/id_dsa_mikrotik.pub
  • System - Groups - Add New
    Name: reconnect
    Policies: read,write,test
  • System - Users
    Name: reconnect
    Group: reconnect
    Allowed Address: <your LAN, e.g. 192.168.1.0/24>
  • System - SSH Keys - Import SSH Key
    User: reconnect
    Key File: id_dsa_mikrotik.pub

Linux - Login without password
  • echo "ssh -i ~/.ssh/id_dsa_mikrotik reconnect@<Router-IP>" >~/reconnect
    chmod 700 ~/reconnect
    ~/reconnect

RouterOS - Add reconnect script for pppoe-dsl, reconnect
(Replace pppoe-dsl by the name of the pppoe-client interface)
  • /system script add name=reconnect policy=read,write,test\
    source=":if ([/interface pppoe-client get pppoe-dsl disabled]=no) do={\
    \n /interface pppoe-client set pppoe-dsl disabled=yes\
    \n delay 5\
    \n /interface pppoe-client set pppoe-dsl disabled=no\
    \n}"
  • /ip address print
  • /system script run reconnect
  • /ip address print

Configure JDownloader, reconnect
  • Settings - Modules - Reconnection - Advanced
    First IP check wait time (sec): 10
    Max repeats (-1 = no limit): 0
    Time for ip change [sec]: 30
  • Settings - Modules - Reconnection - Methods - External - Interpreter: ~/reconnect
  • Change IP

Last edited by junke; 14.07.2012 at 05:24. Reason: corrected
Reply With Quote
  #51  
Old 22.05.2012, 06:59
jerlhn
Guest
 
Posts: n/a
Default

Need the Reconnectios Script for LINKSYS WRT54G2 Firmware Version: 1.0.04, please, ASAP
Reply With Quote
  #52  
Old 01.06.2012, 15:51
horn
Guest
 
Posts: n/a
Default Reconnect für Easy Box 803 (Vodafone)

Hier mein funktionierender Reconnect für die Easy Box 803 A

Firmware: 30.05.211

Hinweis ich habe ihn dahingehend verändert, dass jeder der die Standartkonfiguration verwendet ihn einfach nur noch kopieren und einfügen muss!

Benutzername ist: root
Kennwort ist: 123456

Spoiler:
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET /? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
POST /cgi-bin/login.exe HTTP/1.1
Host: easy.box

user=root&pws=123456 [[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /index.stm? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /setupa_top.stm? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /setupa_brief.stm? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /menu.stm? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /status_main.stm? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
POST /cgi-bin/statusprocess.exe HTTP/1.1
Host: easy.box

pvc=0&cur_if=11&disconnect.x=89&disconnect.y=12&disconnect=Neu+verbinden [[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /status_main.stm? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
POST /cgi-bin/statusprocess.exe HTTP/1.1
Host: easy.box

pvc=0&cur_if=3&connect.x=67&connect.y=10&connect=+Verbinden+ [[[/REQUEST]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
GET /err_msg_inframe.stm? HTTP/1.1
Host: easy.box
[[[/REQUEST]]]
[[[/STEP]]]
[[[/HSRC]]]


P.S. Hatte selbst nach ner Neuinstallation riesen Probleme mit dem reconnect. Mit dem obigen Skript klappts jetzt!

Gruß horn
Reply With Quote
  #53  
Old 30.09.2012, 08:49
zinox
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by usagi-sama View Post
Hey there.
a few months ago i posted a script in a new thread, but now you made an sticky with userscripts ^^

This Script is tested with Fritz!Box FON WLAN 7270 & 7390

Code:
[[[HSRC]]]
    [[[STEP]]]
        [[[REQUEST]]]
            POST /upnp/control/WANIPConn1 HTTP/1.1
            Host: %%%routerip%%%:49000
            Content-Type: text/xml; charset="utf-8"
            SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination

            <?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='**External links are only visible to Support Staff** xmlns:s='**External links are only visible to Support Staff**> <s:Body> <u:ForceTermination xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>
        [[[/REQUEST]]]
    [[[/STEP]]]
[[[/HSRC]]]
P.S.: the fastest Fritz!Box Reconnect Script i know!

Funktioniert auch super mit der Fritz Box 7330 SL (W-Lan)!!!

DANKE!!!
Reply With Quote
  #54  
Old 26.10.2012, 16:12
Axel1492
Guest
 
Posts: n/a
Thumbs up FritzBox 7390 reconnect without uPnP

Well, I did not found any reconnect script for the FrritzBox 7390 which does NOT utilize uPnP. So I wrote one by myself.

For everyone out there who does not understand why I did this: It is a fact that uPnP could be a security risk. If you use uPnP to configre yor router/nat/firewall it usually is a security risk.

This script is a Powershell script. (Well, Powershell is a command prompt written by Microsoft. On Windows 7 it is installed by default.)

Installation instructions coud be found in the script.

The file extension for powershell scripts is "ps1". So you may put the following script into a file called "reconnect.ps1".

Spoiler:

Code:
# -------------------------------------------------------------------------- #
# PS reconnect Script for FritzBox 7390                                      #
#                                            by Axel1492                     #
#                                                                            #
# This Script is for everyone who does not want to enable UPnP on his        #
# FritzBox. This Script reproduces the Javascript based challenge-response   #
# protocol of the web interface.                                             #
#                                                                            #
# PREPARATION: You need to allow the excecution of Powershell scripts on     #
#              your PC. You could easily do this by running the folloowing   #
#              command in an admin priviledged Powershell promt:             #
#              Set-ExecutionPolicy RemoteSigned                              #
#              If you want some information about what you are doing run:    #
#              Get-Help About_Signing                                        #
#                                                                            #
# Call from JD: Use the 'External' configuration. Enter as 'Command':        #
#               %windir%\System32\WindowsPowerShell\v1.0\powershell.exe      #
#               As 'Parameter' enter the path to this script.                #
# -------------------------------------------------------------------------- #

# -------------------------------------------------------------------------- #
# Just Enter your Password below and enjoy ;-)                               #
# -------------------------------------------------------------------------- #
[string]$_host_ = "**External links are only visible to Support Staff**
[string]$_pass_ = "******"

# -------------------------------------------------------------------------- #
# internal stuff                                                             #
# -------------------------------------------------------------------------- #
# these values are queried from the server or they are computed
[string]$challenge = [string].Empty
[string]$challenge_response = [string].Empty
[string]$sid = "0000000000000000"

# send a Post-message to the server and get the response
Function Post ( [string]$path, [string]$req )
{
    [System.Text.Encoding]$encASCII = New-Object System.Text.ASCIIEncoding
    $webRequest = [System.Net.WebRequest]::Create($_host_+$path)
    $reqBytes = $encASCII.GetBytes($req)
    $webRequest.Method = "Post"
    $webRequest.ContentLength = $reqBytes.Length
    $webRequest.ContentType = "application/x-www-form-urlencoded"
    $stream = $webRequest.GetRequestStream()
    $stream.Write($reqBytes,0,$reqBytes.Length)
    $stream.close()
    
    [System.Net.HttpWebResponse]$resp = $webRequest.GetResponse()
    $rs = $resp.GetResponseStream()
    $sr = New-Object System.IO.StreamReader -argumentList $rs
    $results = $sr.ReadToEnd()
    $sr.Close()
    $resp.close()
    
    return $results
}

# compute the challenge-response
Function Chall-Resp ( $challenge )
{
    [System.Text.Encoding]$encUnicode = New-Object System.Text.UnicodeEncoding
    [System.Security.Cryptography.MD5]$hasher = [System.Security.Cryptography.MD5]::Create()
    $_pass_ = [System.Text.RegularExpressions.Regex]::Replace($_pass_, "[^\u0000-\u007F]", ".");
    $bytes = $hasher.ComputeHash($encUnicode.GetBytes($challenge+"-"+$_pass_))
    [string]$hex = [String].Empty
    foreach ($b in $bytes) {
        $hex += "{0:x2}" -f $b
    }
    return $challenge+"-"+$hex
}

# -------------------------------------------------------------------------- #
# the interesting part                                                       #
# -------------------------------------------------------------------------- #

# query challenge
$challenge = ([xml] (Post "cgi-bin/webcm" "getpage=../html/login_sid.xml")).SessionInfo.Challenge

# compute challenge-response
$challenge_response = Chall-Resp $challenge

# login
$sid = ([xml] (Post "cgi-bin/webcm" "login:command/response=$($challenge_response)&getpage=../html/login_sid.xml")).SessionInfo.SID
if ( $sid.equals("0000000000000000") )
{
    "`n`t+++ Login Failed! +++`n"
    Exit
}

# disconnect FritzBox from internet (reconnects automatically)
Post "cgi-bin/webcm" "sid=$($sid)&connection0:settings/cmd_disconnect=" | Out-Null
"`n`tSuccessfully initiated reconnect!`n"

# logout
Post "cgi-bin/webcm" "sid=$($sid)&security:command/logout=" | Out-Null
Reply With Quote
  #55  
Old 28.12.2012, 17:20
diego.pr
Guest
 
Posts: n/a
Default connection failure

hello I downloaded a few days ago jdownloader but not quite get it right and I have a half movie download but I constantly jumps a message that the connection does not work and no way to connect it again I have a netgear router cg3100d
can you help me...?
thank!
Reply With Quote
  #56  
Old 29.12.2012, 07:06
klimperkasten
Guest
 
Posts: n/a
Default DIR-645 D-Link

DIR-645 D-Link - Reconnection LiveHeader/Curl script



Hardware-Version : A1
Firmware-Version : DIR645A1_FW102B11.bin
Sprachpaket: DIR645A1_101DE.lng
IP: 192.168.0.1.
User: admin
Passwort: 00000000
OS: Windows 7, 32 bit mit JD 0.9.581 getestet -> OK

Datei Infos:
Spoiler:

Code:
[[[HSRC]]]
    [[[STEP]]]
        [[[REQUEST]]]
        GET / HTTP/1.1
        Host: %%%routerip%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        GET /js/postxml.js HTTP/1.1
        Host: %%%routerip%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        GET /js/comm.js HTTP/1.1
        Host: %%%routerip%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        GET /js/libajax.js HTTP/1.1
        Host: %%%routerip%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        GET /js/libajax.js HTTP/1.1
        Host: %%%routerip%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        POST /session.cgi HTTP/1.1
        Host: %%%routerip%%%

REPORT_METHOD=xml&ACTION=login_plaintext&USER=admin&PASSWD=00000000&CAPTCHA=
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        GET /tools.php HTTP/1.1
        Host: %%%routerip%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        POST /getcfg.php HTTP/1.1
        Host: %%%routerip%%%

SERVICES=DEVICE.ACCOUNT%2CHTTP.WAN-1%2CINBFILTER%2CSHAREPORT
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        GET /tools_system.php HTTP/1.1
        Host: %%%routerip%%%
        [[[/REQUEST]]]
    [[[/STEP]]]

    [[[STEP]]]
        [[[REQUEST]]]
        POST /service.cgi HTTP/1.1
        Host: %%%routerip%%%

EVENT=REBOOT
        [[[/REQUEST]]]
    [[[/STEP]]]

[[[/HSRC]]]

Last edited by klimperkasten; 29.12.2012 at 07:09.
Reply With Quote
  #57  
Old 03.02.2013, 17:55
bunda
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Axel1492 View Post
Well, I did not found any reconnect script for the FrritzBox 7390 which does NOT utilize uPnP. So I wrote one by myself.

For everyone out there who does not understand why I did this: It is a fact that uPnP could be a security risk. If you use uPnP to configre yor router/nat/firewall it usually is a security risk.

This script is a Powershell script. (Well, Powershell is a command prompt written by Microsoft. On Windows 7 it is installed by default.)

Installation instructions coud be found in the script.

The file extension for powershell scripts is "ps1". So you may put the following script into a file called "reconnect.ps1".

Spoiler:

Code:
# -------------------------------------------------------------------------- #
# PS reconnect Script for FritzBox 7390                                      #
#                                            by Axel1492                     #
#                                                                            #
# This Script is for everyone who does not want to enable UPnP on his        #
# FritzBox. This Script reproduces the Javascript based challenge-response   #
# protocol of the web interface.                                             #
#                                                                            #
# PREPARATION: You need to allow the excecution of Powershell scripts on     #
#              your PC. You could easily do this by running the folloowing   #
#              command in an admin priviledged Powershell promt:             #
#              Set-ExecutionPolicy RemoteSigned                              #
#              If you want some information about what you are doing run:    #
#              Get-Help About_Signing                                        #
#                                                                            #
# Call from JD: Use the 'External' configuration. Enter as 'Command':        #
#               %windir%\System32\WindowsPowerShell\v1.0\powershell.exe      #
#               As 'Parameter' enter the path to this script.                #
# -------------------------------------------------------------------------- #

# -------------------------------------------------------------------------- #
# Just Enter your Password below and enjoy ;-)                               #
# -------------------------------------------------------------------------- #
[string]$_host_ = "**External links are only visible to Support Staff**
[string]$_pass_ = "******"

# -------------------------------------------------------------------------- #
# internal stuff                                                             #
# -------------------------------------------------------------------------- #
# these values are queried from the server or they are computed
[string]$challenge = [string].Empty
[string]$challenge_response = [string].Empty
[string]$sid = "0000000000000000"

# send a Post-message to the server and get the response
Function Post ( [string]$path, [string]$req )
{
    [System.Text.Encoding]$encASCII = New-Object System.Text.ASCIIEncoding
    $webRequest = [System.Net.WebRequest]::Create($_host_+$path)
    $reqBytes = $encASCII.GetBytes($req)
    $webRequest.Method = "Post"
    $webRequest.ContentLength = $reqBytes.Length
    $webRequest.ContentType = "application/x-www-form-urlencoded"
    $stream = $webRequest.GetRequestStream()
    $stream.Write($reqBytes,0,$reqBytes.Length)
    $stream.close()
    
    [System.Net.HttpWebResponse]$resp = $webRequest.GetResponse()
    $rs = $resp.GetResponseStream()
    $sr = New-Object System.IO.StreamReader -argumentList $rs
    $results = $sr.ReadToEnd()
    $sr.Close()
    $resp.close()
    
    return $results
}

# compute the challenge-response
Function Chall-Resp ( $challenge )
{
    [System.Text.Encoding]$encUnicode = New-Object System.Text.UnicodeEncoding
    [System.Security.Cryptography.MD5]$hasher = [System.Security.Cryptography.MD5]::Create()
    $_pass_ = [System.Text.RegularExpressions.Regex]::Replace($_pass_, "[^\u0000-\u007F]", ".");
    $bytes = $hasher.ComputeHash($encUnicode.GetBytes($challenge+"-"+$_pass_))
    [string]$hex = [String].Empty
    foreach ($b in $bytes) {
        $hex += "{0:x2}" -f $b
    }
    return $challenge+"-"+$hex
}

# -------------------------------------------------------------------------- #
# the interesting part                                                       #
# -------------------------------------------------------------------------- #

# query challenge
$challenge = ([xml] (Post "cgi-bin/webcm" "getpage=../html/login_sid.xml")).SessionInfo.Challenge

# compute challenge-response
$challenge_response = Chall-Resp $challenge

# login
$sid = ([xml] (Post "cgi-bin/webcm" "login:command/response=$($challenge_response)&getpage=../html/login_sid.xml")).SessionInfo.SID
if ( $sid.equals("0000000000000000") )
{
    "`n`t+++ Login Failed! +++`n"
    Exit
}

# disconnect FritzBox from internet (reconnects automatically)
Post "cgi-bin/webcm" "sid=$($sid)&connection0:settings/cmd_disconnect=" | Out-Null
"`n`tSuccessfully initiated reconnect!`n"

# logout
Post "cgi-bin/webcm" "sid=$($sid)&security:command/logout=" | Out-Null
Hey Axel1492,

Can´t allow the excecution of Powershell scripts by "Set-ExecutionPolicy RemoteSigned". --> Zugriff verweigert. Bei Zeile 1 Zeichen 20 - Not Specified: Set-ExecutionPolicy, UnauthoriziedAccessException

Can you pls help?
Thanks!
Reply With Quote
  #58  
Old 13.02.2013, 19:45
ohforf3141592653
Guest
 
Posts: n/a
Thumbs up

Precisely what I've been using with a Fritz! 2170. Perfect and far superior to what jd's wizards have to offer for the series (those work, but perform an atm-level line reset AFAIK, which takes a few minutes). I do not trust upnp either, but since this works with the most restrictive upnp-related router settings, there's no reason not to use it.

Quote:
Originally Posted by usagi-sama View Post
This Script is tested with Fritz!Box FON WLAN 7270 & 7390

Code:
[[[HSRC]]]
    [[[STEP]]]
        [[[REQUEST]]]
            POST /upnp/control/WANIPConn1 HTTP/1.1
            Host: %%%routerip%%%:49000
            Content-Type: text/xml; charset="utf-8"
            SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination

            <?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='**External links are only visible to Support Staff** xmlns:s='**External links are only visible to Support Staff**> <s:Body> <u:ForceTermination xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>
        [[[/REQUEST]]]
    [[[/STEP]]]
[[[/HSRC]]]
Reply With Quote
  #59  
Old 13.02.2013, 19:53
ohforf3141592653
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by bunda View Post
Can´t allow the excecution of Powershell scripts by "Set-ExecutionPolicy RemoteSigned". --> Zugriff verweigert. Bei Zeile 1 Zeichen 20 - Not Specified: Set-ExecutionPolicy, UnauthoriziedAccessException
Yes, execution of unsigned powershell scripts is now disabled by default, and for good reasons. If you're feeling lucky, you could go into powershell and do a
Code:
Set-ExecutionPolicy Unrestricted
which will stick unless overridden by group policies.
Reply With Quote
  #60  
Old 14.02.2013, 18:03
GfK-Michael
Guest
 
Posts: n/a
Default

D-Link DIR-100 V1.13 DE:

Download Curl to the path of your batchfiles (settings in JD)

Code:
curl "**External links are only visible to Support Staff** -d "authen_username=xxxxx&authen_password=yyyyy" -c "cookies.txt"
curl "**External links are only visible to Support Staff** -b "cookies.txt"
curl "**External links are only visible to Support Staff** -b "cookies.txt"

if exist cookies.txt del cookies.txt

aaa.aaa.a.a=Url of your Router (in most cases 192.168.0.1)

xxxxx=Username

yyyyy=Password (if there is any problem, you must install "Live HTTP headers" to your Firefox, activate it and Loggin to your router. Then copy the password from there to the JD-script - it´s in hex-format)


Last edited by GfK-Michael; 15.02.2013 at 13:20.
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 08:34.
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.