JD Community
 

Reply
 
Thread Tools Display Modes
  #1  
Old 01.08.2012, 14:26
LordOfThunder LordOfThunder is offline
Modem User
 
Join Date: Mar 2012
Posts: 4
Default Netgear Router N300 DGN2200v3

Netgear Router (N300 DGN2200v3) (click on spoiler to get the script)
Spoiler:
Code:
[[[HSRC]]]

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Za-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Za-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

[[[/HSRC]]]


Hi,

I tried to reconnect my new Netgear Router (N300 DNG2200v3) with the various methods JD offered. When that didn't work I tried RouterReconnect. That did work for the disconnect but for some reason the router doesn't reconnect after that, although I set the connection type to "on Demand".

But If I click on connect in the router config menu, the connection is established immadiately. Does anyone of you have exprience with this kind of problem? Is there a way to force the router to connect again via upnp similar to the forced deconnection?

thanks and so long
Lord

Last edited by Freeloader; 04.09.2012 at 12:19.
Reply With Quote
  #2  
Old 01.08.2012, 16:07
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

record the script with JDownloader reconnect recorder and post the recorded script, after youve done that also send me the source codes of the routers login page and router page where you disconnect/reconnect the router from.
Reply With Quote
  #3  
Old 02.08.2012, 06:33
LordOfThunder LordOfThunder is offline
Modem User
 
Join Date: Mar 2012
Posts: 4
Default

Hi, thanks for answering me!

Here is what you asked for:
This is the source code of the connection status window, where I reestablish the connection:

Spoiler:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="Mon, 06 Jan 1990 00:00:01 GMT"><meta name="description" content="DGN2200Bv3_multilangual"><title>NETGEAR Router DGN2200Bv3</title><script language="javascript" type="text/javascript" src="string.js"></script><link rel="stylesheet" href="form.css"><script language="javascript" type="text/javascript" src="utility.js"></script><script language="javascript" type="text/javascript" src="linux.js"></script><script language="javascript" type="text/javascript">
<!--
function refreshPage() {
var blocked_by_tm = "no";
if(document.forms[0].Connect.value == 'Renew')
return true;
if(blocked_by_tm == "yes")
{
document.forms[0].Connect.disabled = true;
}
window.setTimeout('window.location.href="./RST_st_poe.htm";',10000);
}
//-->
</script></head><body bgcolor="#ffffff" onload="refreshPage()">
<form name="poe_st" method="post" action="setup.cgi?id=4a7bfcd8">
<table border="0" width="100%"><tr><td colspan="2" align="left" nowrap>
<h1 languageCode = "427">Connection Status</h1>
</td>
</tr></table><table border="0" cellpadding="0" cellspacing="3" width="100%"><tr><!-- RULE --><td background="liteblue.gif" height="12"></td>
</tr></table><table width="100%" border="1" cellspacing="1" cellpadding="4"><tr><td nowrap width="50%"><b languageCode = "70">Connection Time</b></td>
<td nowrap width="50%">00:06:31</td>
</tr><tr><td nowrap><b languageCode = "427">Connection Status</b></td>
<td nowrap>Verbindung hergestellt</td>
</tr><tr><td nowrap><b languageCode = "72">Negotiation</b></td>
<td nowrap>Erfolgreich</td>
</tr><tr><td nowrap><b languageCode = "73">Authentication</b></td>
<td nowrap>Erfolgreich</td>
</tr><tr><td nowrap><b languageCode = "37">IP Address</b></td>
<td nowrap>93.212.93.166</td>
</tr><tr><td nowrap><b languageCode = "428">Subnet Mask</b></td>
<td nowrap>255.255.255.255</td>
</tr></table><table border="0" cellpadding="0" cellspacing="3" width="100%"><tr><td align="center" nowrap><br><input type="button" name="Connect" value = "Connect" onclick="stdAction(this.form,'connect'); buttonToDisabled(document.forms[0])" languageCode = "434"><input type="button" name="Disconnect" value = "Disconnect" onclick="alert(getErrorMsgByVar('gsm_msg_st_poe_disconnect_warning')); stdAction(this.form,'disconnect'); buttonToDisabled(document.forms[0])" languageCode = "435"><!--
<input type="submit" name="connect" value=" Connect ">
<input type="submit" name="disconnect" value="Disconnect">
--></td>
</tr><tr><!-- RULE --><td background="liteblue.gif" height="12"></td>
</tr><tr><td align="center"><input type="button" name="close" value = "Close Window" onclick="self.close();" languageCode = "69"></td>
</tr></table><input type="hidden" name="todo" value="reload"><input type="hidden" name="this_file" value="RST_st_poe.htm"><input type="hidden" name="next_file" value="RST_st_poe.htm"><input type="hidden" name="SID" value=""></form>
<script language="javascript" type="text/javascript" src="langs.js"></script></body></html>


I don't have a login screen, so I don't know what to post you. The login window pops up as a dialog when I browse to routerlogin.net.

And here's the script from a succesful (manual) reconnect:

Spoiler:
[[[HSRC]]]
[[[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 /MNU_top.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

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

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

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

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=common/system.xml&timestamp=1343880556768 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/msg.xml?timestamp=1343880556891 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/ui.xml?timestamp=1343880556919 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=common/system.xml&timestamp=1343880556951 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/msg.xml?timestamp=1343880557050 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/ui.xml?timestamp=1343880557088 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=common/system.xml&timestamp=1343880557517 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/msg.xml?timestamp=1343880557562 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/ui.xml?timestamp=1343880557590 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

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

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=common/system.xml&timestamp=1343880557731 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/hlp.js?timestamp=1343880557778 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

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

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

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=common/system.xml&timestamp=1343880582485 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/msg.xml?timestamp=1343880582530 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/ui.xml?timestamp=1343880582563 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

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

[[[STEP]]]
[[[REQUEST]]]
POST /setup.cgi?id=596d5d15 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%

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

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

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

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=common/system.xml&timestamp=1343880599848 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/msg.xml?timestamp=1343880599898 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/ui.xml?timestamp=1343880599929 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

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

[[[STEP]]]
[[[REQUEST]]]
GET /setup.cgi?next_file=common/system.xml&timestamp=1343880610465 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/msg.xml?timestamp=1343880610512 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /langs/language/ui.xml?timestamp=1343880610554 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
POST /setup.cgi?id=5d927a74 HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%

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

[[[/HSRC]]]


I hope this helps you. If you need anything else, just ask. :-)
Reply With Quote
  #4  
Old 02.08.2012, 16:23
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

Fırst try this
Code:
[[[HSRC]]]
[[[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 /RST_st_poe.htm HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

[[[/HSRC]]]

And also try this
Code:
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

[[[/HSRC]]]
Reply With Quote
  #5  
Old 02.08.2012, 16:26
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

When youre testing both scripts please make sure that JDs logging LEVEL is set to ALL , and send me the Log URL > ONLY IF BOTH OF THE SCRIPTS FAIL

How to send a log file > http://jdownloader.org/knowledge/wik...d-log?s=lng_en
Reply With Quote
  #6  
Old 03.08.2012, 07:29
LordOfThunder LordOfThunder is offline
Modem User
 
Join Date: Mar 2012
Posts: 4
Default

Hi,

I tried both scripts but unfortunately neither worked.

Here's the log:

http://jdownloader.org/pastebin/91339

After the second script failed on its own, I tried the following: I ran RouterReconnect and disconnected via UPnP. As written before this works for disconnecting, but not for reconnecting again. Then I ran your second script again and it reconnected the router (which I had to do manually from the routers config menu before).

So to get a working reconnect I'd need to run a program from CUrl or do what CUrl does from a batch file. Is that possible?
Reply With Quote
  #7  
Old 03.08.2012, 15:03
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

No not possible, yes Ive just noticed now, the script only has "connect" cant see disconnect in it. I added disconnect in one of the lines manually, it could work, just try it please. Is it possible for you to contact me through JDownloader support chat? If I can look at this with teamviewer, perhaps I can figure it out.

try this first
Code:
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
Authorization: Basic %%%basicauth%%%
[[[/REQUEST]]]
[[[/STEP]]]

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

[[[/HSRC]]]

Last edited by Freeloader; 03.08.2012 at 15:15.
Reply With Quote
  #8  
Old 04.08.2012, 06:34
LordOfThunder LordOfThunder is offline
Modem User
 
Join Date: Mar 2012
Posts: 4
Default

Hey,

Thank you very much for helping me. With the last script the disconnect finally worked. At first the reconnect didn't work again but after I put in a WAIT-Step it now works. Here's the final script:

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Z-a-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

[[[/HSRC]]]
Thanks again for helping me!

bye
Lord
Reply With Quote
  #9  
Old 04.08.2012, 11:02
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

Happy to be of assistance .

Take care
Freeloader
Reply With Quote
  #10  
Old 04.09.2012, 02:22
johnny20 johnny20 is offline
Baby Loader
 
Join Date: Sep 2012
Posts: 5
Thumbs up

Just bought the same model, i.e. the Netgear DGN2200v3. Was looking around for a reconnect script desperately but nothing worked. Tried all the scripts for the other Netgear models, but no go. Tried searching for the model here, but nothing matched as well. It was purely by chance that I found this thread. Why? Because the router's model is spelt wrong! It is Netgear DGN2200v3, not Netgear DNG2200v3! No wonder the forum search failed to find this thread!

@Mods: Please edit the model name above to the correct one, so that others searching for this don't needlessly suffer like I did.

The final script that works 100% of the time with this model, thanks to Freeloader of course, is as below (with minor edits by me to remove the extra connect at the end which is not required for sure):

Code:
[[[HSRC]]]

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Za-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

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

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

[[[/REQUEST]]]
[[[PARSE]]]
num:setup.cgi.id=([A-Za-z0-9]+)
[[[/PARSE]]]
[[[/STEP]]]

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

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

[[[/HSRC]]]

To all HTTP Live header script ninjas, if the script can be further reduced in size or made to work faster without loss of functionality, please post here and let us know how.

@Devs: Hope you will include this reconnect script in JD2's in-built database!
Reply With Quote
  #11  
Old 04.09.2012, 12:03
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

Hi Johnny,

Yes true the extra line is not required, Ive reedited the thread topic and added the script without the extra > connect header as well. The script can not be further reduced as rest of the headers are necessary for it to function properly.

And with JD 2 it is possible for the end user to upload his/her script to JD database manually

Take care
Reply With Quote
  #12  
Old 04.09.2012, 12:20
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

btw Ive chnaged the waittime btw disconnect and connect to 5, as 2 seconds might cause problems. You guys can always edit this manually.
Reply With Quote
  #13  
Old 04.09.2012, 21:16
johnny20 johnny20 is offline
Baby Loader
 
Join Date: Sep 2012
Posts: 5
Default

Thanks again for the script, Freeloader!

Quote:
Originally Posted by Freeloader View Post
btw Ive chnaged the waittime btw disconnect and connect to 5, as 2 seconds might cause problems. You guys can always edit this manually.
I tried 5s initially as LordOfThunder mentioned above, but 2s seems to work just fine in my case with no failures. YMMV of course. Also, thanks for correcting the model name in the thread title.

A few more questions, if you don't mind. I'm completely new to HSRC of course, so is it necessary to have all those separate STEPs? Why can't we have just one STEP with everything else inside?

Also, the script as I understand it basically goes like this:

Code:
1.a) Send GET request to RST_st_poe.htm with auth
1.b) Parse id URL parameter with RegEx and store in var num
2) Send POST request to setup.cgi with id parsed above and appropriate todo (disconnect) etc. parameters

3) Wait for x seconds

4.a) Send GET request to RST_st_poe.htm with auth
4.b) Parse id URL parameter with RegEx and store in var num
5) Send POST request to setup.cgi with id parsed above and appropriate todo (connect) etc. parameters

Is it necessary to repeat 1.a) and 1.b) as 4.a) and 4.b)? When I use the WebUI, disconnecting doesn't log me out and I don't need to re-login to connect, so the id value seems to remain constant. So isn't it possible to do the same via the script, i.e. login/auth just once, parse the id, then use it to first disconnect and then reconnect? (Hopefully this is not a really stupid question , but if it is, please let me know why my assumption is incorrect.)

Quote:
Originally Posted by Freeloader View Post
And with JD 2 it is possible for the end user to upload his/her script to JD database manually
Awesome! But will there be a review to ensure people don't submit junk code? And even if there is a review, reviewers can only judge the code quality, and not whether it actually works unless they also own the same device...
Reply With Quote
  #14  
Old 06.09.2012, 13:54
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

Thanks again for the script, Freeloader!



Code:
I tried 5s initially as LordOfThunder mentioned above, but 2s seems to work just fine in my case with no failures. YMMV of course. Also, thanks for correcting the model name in the thread title.
Youre welcome, well 5 is better as you dont want the reconnection to be too fast because when u send the disconnect command to router this takes time, and you do not want the connect command to be sent when the router is still disconnecting. But if your router can disconnect in 2 seconds this shouldnt be a problem.

Quote:
A few more questions, if you don't mind. I'm completely new to HSRC of course, so is it necessary to have all those separate STEPs? Why can't we have just one STEP with everything else inside?
I didnt create the scripting language, Im sure the creator must have his//her reasons
Quote:
Also, the script as I understand it basically goes like this:

Code:
1.a) Send GET request to RST_st_poe.htm with auth
1.b) Parse id URL parameter with RegEx and store in var num
2) Send POST request to setup.cgi with id parsed above and appropriate todo (disconnect) etc. parameters

3) Wait for x seconds

4.a) Send GET request to RST_st_poe.htm with auth
4.b) Parse id URL parameter with RegEx and store in var num
5) Send POST request to setup.cgi with id parsed above and appropriate todo (connect) etc. parameters
Is it necessary to repeat 1.a) and 1.b) as 4.a) and 4.b)? When I use the WebUI, disconnecting doesn't log me out and I don't need to re-login to connect, so the id value seems to remain constant. So isn't it possible to do the same via the script, i.e. login/auth just once, parse the id, then use it to first disconnect and then reconnect? (Hopefully this is not a really stupid question , but if it is, please let me know why my assumption is incorrect.)
Yes you understand this correctly, but the ID value will change when you hard reboot the router (power button or reboot button in interface), there fore the script will not function. This can also happen when the electricity goes off.


Quote:
Awesome! But will there be a review to ensure people don't submit junk code? And even if there is a review, reviewers can only judge the code quality, and not whether it actually works unless they also own the same device...
Before the users commitment (upload process) JD will first verify the script > meaning it will perform a reconnection by executing the script. This will ensure that junk can not be uploaded to database.

So all in all without JDownloaders verification end user can not upload his/her script

After the script is added to database another user can use JDownloader reconnection wizard which can scan through the similar models until it finds a working script, and even if a working script is found > the end user still can continue (will have an option for) scanning for further scripts > as the reconnection wizard is also capable of finding faster reconnection scripts. Faster reconnection scripts are usually scripts which use the ppoe disconnect > reconnect option and they usually do not include those extra junk headers which get caught between the beginning of the login process and ending of disconnection/reconnection.

So basically the only junk code that can get in there is presented within the example script below; most of the headers in this script arent necessary but they exist as the reconnect recorder records every step which has been executed by the end user when he/she tries to reconnect the router via user interface.

Most of the headers within this script arent necessary but this doesnt mean that it doesnt work. Marked junk with bold, again it doesnt mean that it doesnt work.
[[[HSRC]]]
[[[STEP]]]
[[[REQUEST]]]
GET / HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]

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

[[[STEP]]]
[[[REQUEST]]]
POST /cgi-bin/webcm HTTP/1.1
Host: %%%routerip%%%

getpage=..%2Fhtml%2Fframe.htm&errorpage=..%2Fhtml%2Findex.html&login%3Acommand%2Fusername=%%%user%%% &login%3Acommand%2Fpassword=%%%pass%%%&var%3Aerrormsg=Error
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /cgi-bin/webcm?getpage=../html/home.htm HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]

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

[[[STEP]]]

[[[REQUEST]]]
GET /cgi-bin/webcm?getpage=../html/tools/index.htm HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]

[[[REQUEST]]]
GET /cgi-bin/webcm?getpage=../html/tools/syscommands.htm HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]

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

[[[STEP]]]

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

[[[STEP]]]
[[[REQUEST]]]
POST /cgi-bin/webcm HTTP/1.1
Host: %%%routerip%%%

getpage=..%2Fhtml%2Ftools%2Frestartmodem.htm&var%3Acom=restart&var%3Arestart=1
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
POST /cgi-bin/webcm HTTP/1.1
Host: %%%routerip%%%

getpage=..%2Fhtml%2Ftools%2Frestartmodem.htm&logic%3Acommand%2Freboot=&var%3Arestart=0
[[[/REQUEST]]]
[[[/STEP]]]

[[[STEP]]]
[[[REQUEST]]]
GET /html/index.html HTTP/1.1
Host: %%%routerip%%%
[[[/REQUEST]]]
[[[/STEP]]]

[[[/HSRC]]]

Last edited by Freeloader; 06.09.2012 at 14:03.
Reply With Quote
  #15  
Old 06.09.2012, 14:03
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

Bye for now, take care.
Reply With Quote
  #16  
Old 07.09.2012, 22:16
johnny20 johnny20 is offline
Baby Loader
 
Join Date: Sep 2012
Posts: 5
Default

Sorry for the late reply, was busy last few days.

Quote:
Originally Posted by Freeloader View Post
Yes you understand this correctly, but the ID value will change when you hard reboot the router (power button or reboot button in interface), there fore the script will not function. This can also happen when the electricity goes off.
I'm not sure I understand what you're saying here... The reconnect script can either run automatically if some file host is making JD wait between downloads, or it can be run manually, right?

What I was suggesting was this:

Code:
1) Send GET request to RST_st_poe.htm with auth

2) Parse id URL parameter with RegEx and store in var num

3) Send POST request to setup.cgi with id parsed above and appropriate todo (disconnect) etc. parameters

4) Wait for x seconds

5) Send POST request to setup.cgi with id parsed above and appropriate todo (connect) etc. parameters

So even if there is a hard reboot or power loss, anyway we are getting id afresh once in step 2). What I was asking is, why do we need to a) send GET request to RST_st_poe.htm with auth, and b) parse id URL parameter with RegEx and store in var num, twice in the original script? Can't we do it only once at the start of the script, as shown above? Or is there some reason that we need to repeat these two steps before the connect also?

Quote:
Originally Posted by Freeloader View Post
Before the users commitment (upload process) JD will first verify the script > meaning it will perform a reconnection by executing the script. This will ensure that junk can not be uploaded to database.

So all in all without JDownloaders verification end user can not upload his/her script

After the script is added to database another user can use JDownloader reconnection wizard which can scan through the similar models until it finds a working script, and even if a working script is found > the end user still can continue (will have an option for) scanning for further scripts > as the reconnection wizard is also capable of finding faster reconnection scripts.
I think this is a really nice idea and the proposed implementation sounds great!

Quote:
Originally Posted by Freeloader View Post
Most of the headers within this script arent necessary but this doesnt mean that it doesnt work. Marked junk with bold, again it doesnt mean that it doesnt work.
Yes, I understand that these extra headers are unnecessary bloat and can be removed without affecting the actual working of the script. What I meant by "junk code" was that people could just write some wrong non-working script (by mistake or deliberately) and submit to the database. But above I see that this problem has been taken care of, since JD2 will run and verify the script before uploading it. So there is no problem at all here.
Reply With Quote
  #17  
Old 08.09.2012, 09:34
Freeloader's Avatar
Freeloader Freeloader is offline
JDownloader Support (inactive)
 
Join Date: Mar 2009
Location: #jdownloader@freenode.net
Posts: 3,955
Default

Quote:
So even if there is a hard reboot or power loss, anyway we are getting id afresh once in step 2). What I was asking is, why do we need to a) send GET request to RST_st_poe.htm with auth, and b) parse id URL parameter with RegEx and store in var num, twice in the original script? Can't we do it only once at the start of the script, as shown above? Or is there some reason that we need to repeat these two steps before the connect also?
good morning,

Well yes there is a reason, and its because it wont work, parsing and replacing the variable(s) only happens within each step.

I tried it like 1 or 2 years ago as I thought (just like you) parsing at the beginning num should replace all of its corresponding variables %%%num%%%, but I was wrong.

You can also try it, just delete the second step where the parsing occurs. And see if it works, last time I tested this, it failed.

Take care
The Freeloader

Last edited by Freeloader; 08.09.2012 at 09:37.
Reply With Quote
  #18  
Old 09.09.2012, 01:51
johnny20 johnny20 is offline
Baby Loader
 
Join Date: Sep 2012
Posts: 5
Default

Just tried it and like you said, the changes didn't work. Guess that's just the way HSRC is! Thanks for all your help and take care!
Reply With Quote
  #19  
Old 10.04.2013, 13:32
klint klint is offline
Modem User
 
Join Date: Apr 2013
Posts: 1
Default Script for me doesn't work

Hello everybody,
I reopen this thread since I have tried the script reported to work, but it fails with my 2200v3. I have copied and pasted the script in the Liveheader/Curl window (I hope this was the right way to do), but the script doesn't disconnect and reconnect my router.

Here's the link of the log:

**External links are only visible to Supporters**

I hope that somebody can help.
Reply With Quote
  #20  
Old 16.07.2013, 10:23
varunvikram1 varunvikram1 is offline
Modem User
 
Join Date: Jan 2011
Posts: 3
Default

I can confirm the current script doesnt work with the latest patched DGN2200v3. can anyone post a modified script
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 16:14.
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.