17 lines
336 B
Python
Executable File
17 lines
336 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import httplib2
|
|
import sys
|
|
|
|
URL = "http://"+sys.argv[1]+"/cgi-bin/reboot.cgi"
|
|
USER = sys.argv[2]
|
|
PASS = sys.argv[3]
|
|
|
|
h = httplib2.Http(cache=None, timeout=0.1)
|
|
h.add_credentials(USER, PASS)
|
|
try:
|
|
resp = h.request(URL, "GET", headers={'cache-control':'no-cache'})
|
|
resp
|
|
print"OK"
|
|
except:
|
|
print"Asic not avalible" |