From the shell i'd use wget --post-data
wget --post-data 'Reboot=1' ip-address-of-router
I'm not sure what the javascript does. Does is submit Reboot or connectflag?
Also, you can use the LWP library in Perl for this.
Under Linux, the GET, POST and PUT commands are wrappers around this (lwp-request)
Both of these can use a username/password pair for authentication.
Ed
Robert Citek wrote:
How can I reboot my router?
I have a D-Link DI-514 wireless router that is kind of flakey. So, I would like to setup a cron job from my linux box to automatically reboot the router once a day. I can connect to the router via a web browser and reboot it, but would like to automate the process. The HTML has JavaScript, which looks like so:
<script language="JavaScript"> function doConfirm() { if (confirm('Reboot Router ?')) { document.tF.connectflag.value=1; document.tF.submit(); } } </script> ... <input type="button" value="Reboot" onclick="doConfirm()">
Anyone have any hits, tips, suggestions on how to send a signal from a script to the router to reboot?
Regards, - Robert http://www.cwelug.org/downloads Help others get OpenSource software. Distribute FLOSS for Windows, Linux, *BSD, and MacOS X with BitTorrent
_______________________________________________ CWE-LUG mailing list http://www.cwelug.org/ [email protected] http://lists.firepipe.net/listinfo/cwe-lug
-- Ed Howland WDT Solutions, LLC. [EMAIL PROTECTED] (314) 962-0766
_______________________________________________
CWE-LUG mailing list
http://www.cwelug.org/ [email protected]
http://lists.firepipe.net/listinfo/cwe-lug
