1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-09-19 22:33:25 +01:00

More debug output.

This commit is contained in:
Markus Birth 2017-08-15 15:24:38 +02:00
parent 28a824e54a
commit fc5499fc99

View File

@ -30,6 +30,9 @@ def check(sess, serid, curef, fv="AAM481", osvs="7.1.1", mode=4, ftype="Firmware
if req.status_code == 200: if req.status_code == 200:
return(req.text) return(req.text)
else: else:
print(repr(req))
print(repr(req.headers))
print(repr(req.text))
raise SystemExit 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: if req.status_code == 200:
return req.text return req.text
else: else:
print(repr(req))
print(repr(req.headers))
print(repr(req.text))
raise SystemExit raise SystemExit
@ -81,10 +87,12 @@ def main2(sess, serid, curef):
def main(sess, serid, curef): def main(sess, serid, curef):
checktext = check(sess, serid, curef) checktext = check(sess, serid, curef)
print(repr(checktext))
tv, fwid, filename, filesize, filehash = parse_check(checktext) tv, fwid, filename, filesize, filehash = parse_check(checktext)
slt = salt() slt = salt()
vkh = vkhash(serid, curef, tv, fwid, slt) vkh = vkhash(serid, curef, tv, fwid, slt)
updatetext = update_request(sess, serid, curef, tv, fwid, slt, vkh) updatetext = update_request(sess, serid, curef, tv, fwid, slt, vkh)
print(repr(updatetext))
downloadurl = parse_request(updatetext) downloadurl = parse_request(updatetext)
print("{0}: HTTP {1}".format(filename, getcode(sess, downloadurl))) print("{0}: HTTP {1}".format(filename, getcode(sess, downloadurl)))
print(downloadurl) print(downloadurl)