23 Aug 2017 
Support Center » Knowledgebase » Netopia 2210-02 software version 7.8.4r4
 Netopia 2210-02 software version 7.8.4r4
Article //--------------------- Variation 1 --------------------

hs=new HTTPScript("username", "password");
hs.ForceAuthHeader=true;
s=hs.GET("http://192.168.1.254/homeRES.htm");
vHtml=new HTML(s);
vInputs=vHtml.GetAllElementsByTag("input");
vNonce='?';
foreach(vInput in vInputs)
if (vInput.InnerText=="Connection Information")
 vNonce=vInput.Value;
Info("Disconnect modem");
hs.Data='csrfNonce='+vNonce+'&Disconnect=Disconnect';
hs.Referer='http://192.168.1.254/homeRES.htm';
hs.POST('http://192.168.1.254/Forms/homeRES_1');
Wait(5000);

Info("Restart connection");
hs.Data='csrfNonce='+vNonce+'&Restart+Connection=Restart+Connection';
hs.Referer='http://192.168.1.254/homeRES.htm';
hs.POST('http://192.168.1.254/Forms/homeRES_1');
Wait(5000);    
return true;


//--------------------- Variation 2 --------------------
hs=new HTTPScript("username", "password");
hs.ForceAuthHeader=true;
s=hs.GET("http://192.168.1.254/restartModemRES.htm");
vHtml=new HTML(s);
vInputs=vHtml.GetAllElementsByTag("input");
vNonce='?';
foreach(vInput in vInputs)
if (vInput.Name=="csrfNonce")
 vNonce=vInput.Value;
Info("Restart modem");
hs.Data='csrfNonce='+vNonce+'&Yes, restart modem=Yes, restart Router';
hs.Referer='http://192.168.1.254/restartModemRES.htm';
hs.POST('http://192.168.1.254/Forms/homeRES_1');
Wait(5000);
return true;


Article Details
Article ID: 103
Created On: 18 Aug 2010 4:28 PM

 This article was helpful  This article was not helpful

 Back
 Log in [Lost Password] 
E-mail:
Password:
Remember Me:
 
 Search
 Article Options
Home | Submit a Ticket | Knowledgebase | Troubleshooter
Language:

Help Desk Software by Kayako SupportSuite v3.70.02