kctvt Posted September 17, 2009 Share Posted September 17, 2009 (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. 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 September 17, 2009 by kctvt Link to comment Share on other sites More sharing options...
99ojo Posted September 17, 2009 Share Posted September 17, 2009 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.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 Link to comment Share on other sites More sharing options...
kctvt Posted September 17, 2009 Author Share Posted September 17, 2009 so... How can I run this Java Scrip ? function btnReset() {var code = 'location.assign("rebootinfo.cgi")';eval(code);} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now