I have an old router that I have set up as an AP on my home network. For some reason it loses connectivity every few days and needs a reboot.
I would like to set up a script to run once every night to do this automatically.
I can open the my browser (iceweasel
) and navigate to my admin page of the router from the terminal:
iceweasel http://admin:password@192.168.1.1/WLG_adv.htm
On the page that this command opens there is a button with this code:
<input onclick="return checkData();" name="Apply" value="Apply" type="submit">
Is there a way of performing the same action as this button from the terminal? I'm using a Debian Linux.
jmeter
andselenium
can automate HTTP requests. I don't have a complete answer but if you wanted a direction to go into, there you go. – Bratchley Apr 07 '14 at 13:13checkData()
call (which itself the OP may not be able to properly figure out). If the site uses CSRF then it gets even more complicated. It's definitely still possible, but it's easier to use tools that have taken these things into consideration. – Bratchley Apr 07 '14 at 13:19checkData
does — with a name like this, there's a chance that it only performs validation and the submitted form is easy to prepare). If you tell us exactly what router model you have and give us a way to see what that web page contains (including all relevant JS), we might help more. – Gilles 'SO- stop being evil' Apr 07 '14 at 20:25