mardi 26 octobre 2021

Posting after loging in with MD5 HASH

I'm want to send some text to change the Title Text of my camera i can do that in a browser with: (I will use that later to add some variables (temperatuur info and other info from my home automation)

http://192.168.1.123/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[0].Name.CustomTitle[1].Text=TEST

and then i have to fill in my inlog credentialos i have found pythonscript that login to my camera.

A part of the script:

print "[Logging in"

query_args = {"method":"global.login",
    "session":json_obj['session'],
    "params":{
        "userName":USER_NAME,
        "password":RANDOM_HASH,
        "clientType":"Web3.0",
        "authorityType":"Default"},
    "id":10000}

URI = '/RPC2_Login'
response = HTTPconnect(self.rhost,self.proto,self.verbose,self.credentials,self.Raw).Send(URI,headers,query_args,json_obj['session'])
print response.read()

With the result:

[>] Logging in
[Verbose] Sending: http://192.168.10.185:80/RPC2_Login
[<] 200 OK
{ "id" : 10000, "params" : null, "result" : true, "session" : 1998182089 }

How can i excuted the following after the login

/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[0].Name.CustomTitle[1].Text=TEST



Aucun commentaire:

Enregistrer un commentaire