mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-09 22:06:47 +00:00
More debug output.
This commit is contained in:
parent
28a824e54a
commit
fc5499fc99
@ -30,6 +30,9 @@ def check(sess, serid, curef, fv="AAM481", osvs="7.1.1", mode=4, ftype="Firmware
|
||||
if req.status_code == 200:
|
||||
return(req.text)
|
||||
else:
|
||||
print(repr(req))
|
||||
print(repr(req.headers))
|
||||
print(repr(req.text))
|
||||
raise SystemExit
|
||||
|
||||
|
||||
@ -40,6 +43,9 @@ def update_request(sess, serid, curef, tv, fwid, salt, vkh, fv="AAM481", mode=4,
|
||||
if req.status_code == 200:
|
||||
return req.text
|
||||
else:
|
||||
print(repr(req))
|
||||
print(repr(req.headers))
|
||||
print(repr(req.text))
|
||||
raise SystemExit
|
||||
|
||||
|
||||
@ -81,10 +87,12 @@ def main2(sess, serid, curef):
|
||||
|
||||
def main(sess, serid, curef):
|
||||
checktext = check(sess, serid, curef)
|
||||
print(repr(checktext))
|
||||
tv, fwid, filename, filesize, filehash = parse_check(checktext)
|
||||
slt = salt()
|
||||
vkh = vkhash(serid, curef, tv, fwid, slt)
|
||||
updatetext = update_request(sess, serid, curef, tv, fwid, slt, vkh)
|
||||
print(repr(updatetext))
|
||||
downloadurl = parse_request(updatetext)
|
||||
print("{0}: HTTP {1}".format(filename, getcode(sess, downloadurl)))
|
||||
print(downloadurl)
|
||||
|
Loading…
Reference in New Issue
Block a user