Skip to content

VAPIX: firmwaremanagement.cgi #46

Closed Answered by mattias-kindborg-at-work
tonylom3 asked this question in VAPIX
Discussion options

You must be logged in to vote

Hi @tonylom3.

I think the following code would work.

import requests
import sys

if len(sys.argv) != 4:
    print("Usage: firmware-status.py <ip> <username> <password>")
    sys.exit(1)

ip = sys.argv[1]
username = sys.argv[2]
password = sys.argv[3]

auth = requests.auth.HTTPDigestAuth(username, password)
body = {
    "apiVersion": "1.4",
    "method": "status"
}
r = requests.post("http://{}/axis-cgi/firmwaremanagement.cgi".format(ip), json=body,  auth=auth)

print(r.status_code)
print(r.text)

When I call this I get the following response.

python3 firmware-status.py 192.168.1.80 root mypassword
200
{
  "apiVersion": "1.4",
  "method": "status",
  "data": {
    "activeFirmwareVersion": "10…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@tonylom3
Comment options

@mattias-kindborg-at-work
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tonylom3
Comment options

Answer selected by mattias-kindborg-at-work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
VAPIX
Labels
None yet
2 participants