Sign in to follow this  
Followers 0
kctvt

Help me , i cant run my code on this websiteHi

3 posts in this topic

#1 ·  Posted (edited)

Hi. I'm writing code Restart modem. But i got some problems , I cant Click the button.

I'm using Siemens modem. This's website's code.

Posted Image

And this's my code :

#include <IE.au3>

$oIE = _IECreate ('http://192.168.1.1/resetrouter.html',0,1,0)

Sleep(1000)

ControlSetText ($alerttext1,'', "[CLASS:Edit; INSTANCE:2]", "admin" )

Sleep(200)

ControlSetText ($alerttext1,'', "[CLASS:Edit; INSTANCE:3]", "admin" )

Sleep(200)

ControlClick($alerttext1,'', "[CLASS:Button; Instance:2]")

_IELoadWait ($oIE)

;= = = = = = = = = Dont Run = = = = = = =

$form = _IEGetObjByname ($oIE, 'frmload')

$button = _IEFormElementGetCollection ($form, 0)

_IEAction ($button, "Click")

Help me. I never seen any website'code like that before.

= = = = = ==

I found more , This website's code is hidden.

function btnReset() {

var code = 'location.assign("rebootinfo.cgi")';

eval(code);

}

function frmLoad() {

var sysReboot = '0';

var lanRefresh = '0';

if ( sysReboot == '1' )

btnReset();

else if ( lanRefresh == '1' ) {

var code = 'location.assign("resetrouter.cgi?lanRefresh=0")';

eval(code);

}

}

Edited by kctvt

Share this post


Link to post
Share on other sites



Hi. I'm writing code Restart modem. But i got some problems , I cant Click the button.

I'm using Siemens modem. This's website's code.

Posted Image

And this's my code :

Help me. I never seen any website'code like that before.

Hi,

$form = _IEGetObjByname ($oIE, 'frmload') -> "frmload" isn't a value name= in the html code.

you may try

$form = _IEGetObjByname ($oIE, "basefrm")

You may search also for java code injection and inject directly btnreset () value="Save/Reboot"

;-))

Stefan

Share this post


Link to post
Share on other sites

so... How can I run this Java Scrip ?

function btnReset() {

var code = 'location.assign("rebootinfo.cgi")';

eval(code);

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0