Code: Select all
url = 'http://localhost:8112/json'
command = {'method': 'auth.login',
'params': [password],
'id': command_id
}
command_id += 1
command = json.dumps(command)
request = urllib2.Request(url, command, headers={'User-Agent': 'Mozilla/5.0'})
try:
response = urllib2.urlopen(request)
[etc...]
Code: Select all
[ERROR ] 23:37:05 auth:329 Login failed (ClientIP 123.456.789.876)