Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # The following fixes Virgin Media's router not saving settings, put in crontab to execute periodically (# crontab -e)
- # setup wget to use cookies
- alias wget="wget --delete-after --keep-session-cookies --save-cookies=.router_cookie.txt"
- # login
- wget --post-data="VmLoginUsername=admin&VmLoginPassword=password&VmLoginErrorCode=0&VmChangePasswordHint=0" http://192.168.0.1/goform/VmLogin
- # set dmz
- wget --post-data="VmDmzSupport=0x1&VmDmzHostIP3=22&VmDmzRestore=0" http://192.168.0.1/goform/VmRgDmzHost
- # logout
- wget http://192.168.0.1/VmLogout.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement