From fc5499fc993a3602887e1a8ee322a164885e3e18 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Tue, 15 Aug 2017 15:24:38 +0200 Subject: [PATCH] More debug output. --- tclcheck.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tclcheck.py b/tclcheck.py index 12c7780..2a632b3 100644 --- a/tclcheck.py +++ b/tclcheck.py @@ -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)