Use curl to retrieve content from Router Webinterface
The command line tool of curl can be used to retrieve data in an automated environment from web interfaces of any device.

In the following example, I download a log file from a router's (or rather a VoIP gateway Zyxel Prestige P2002L) web interface for later processing:

curl -d "LoginPassword=ZyXEL+ZyWALL+Series&hiddenPassword=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&Prestige_Login=Login" > ~/Desktop/test.html

In the example, curl is used with the Option "-d" to send POST data.
Use the Firefox extension "Tamper Data" and log in to your router to see what POST variables need to be sent. In the example, the variables are:
LoginPassword = ZyXEL+ZyWALL+Series
hiddenPassword = [MD5sum of your password]
Prestige_Login = Login

The two links and are the successively requested URLs. The first one is for authentication, the second one for the actual page we want to retrieve.

Finally the output is saved into the file "~/Desktop/test.html"
admin / Dec 08, 2014
2004 - 2019 /