Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib
- import urllib2
- try:
- #restart the modem
- data = {'RestoreFactoryDefault' : '0',
- 'ResetReq' : '1'}
- data = urllib.urlencode(data)
- req = urllib2.Request('http://192.168.100.1/goform/RgConfig', data)
- urllib2.urlopen(req)
- #restore factory defaults
- urllib2.urlopen('http://192.168.1.1/apply.cgi?submit_button=Factory_Defaults&change_action=&action=Restore&wait_time=19&FactoryDefaults=1')
- except Exception, e:
- print '>> Fatal error: %s' % e
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement