View Single Post
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#25
Originally Posted by feydrutha View Post
thanks for the tip but I have no spaces here, so I'm still in the dark..
If you're not afraid of the command line, start a python interpreter, and then type (or copy/paste) the following. The end variable data would contain what the server returned (if all goes well, it returns [], double brackets). If there is an error on the way, it might lead you to the solution.

Code:
from gnome import gconf
import socket, httplib, urllib, base64, htmllib, formatter

username = base64.b64decode(gconf.client_get_default().get_string('/apps/maegios/username'))
password = base64.b64decode(gconf.client_get_default().get_string('/apps/maegios/password'))

base64string = base64.encodestring('%s:%s' % (username, password))[:-1]
headers = {"Authorization": "Basic %s" % base64string}
socket.setdefaulttimeout(5)
url = gconf.client_get_default().get_string('/apps/maegios/url').split('/')
connection = httplib.HTTPSConnection(url[2])
connection.request("POST", "/%s/%s" % (url[3], "cgi-bin/status.cgi"), [], headers)
response = connection.getresponse()
data = response.read()
data
 

The Following User Says Thank You to Slocan For This Useful Post: