mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-09 22:06:47 +00:00
Also output download links for Amazon S3 servers.
This commit is contained in:
parent
cf04ba53df
commit
4917b87741
@ -68,11 +68,14 @@ curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml)
|
||||
|
||||
req_xml = fc.do_request(curef, fv, tv, fw_id)
|
||||
print(fc.pretty_xml(req_xml))
|
||||
fileid, fileurl, slaves, encslaves = fc.parse_request(req_xml)
|
||||
fileid, fileurl, slaves, encslaves, s3_fileurl, s3_slaves = fc.parse_request(req_xml)
|
||||
|
||||
for s in slaves:
|
||||
print("http://{}{}".format(s, fileurl))
|
||||
|
||||
for s in s3_slaves:
|
||||
print("http://{}{}".format(s, s3_fileurl))
|
||||
|
||||
if fc.mode == fc.MODE.FULL:
|
||||
header = fc.do_encrypt_header(random.choice(encslaves), fileurl)
|
||||
headname = "header_{}.bin".format(tv)
|
||||
|
@ -61,11 +61,14 @@ tv = args.targetversion[0]
|
||||
fw_id = args.fwid[0]
|
||||
req_xml = fc.do_request(fc.curef, fv, tv, fw_id)
|
||||
print(fc.pretty_xml(req_xml))
|
||||
fileid, fileurl, slaves, encslaves = fc.parse_request(req_xml)
|
||||
fileid, fileurl, slaves, encslaves, s3_fileurl, s3_slaves = fc.parse_request(req_xml)
|
||||
|
||||
for s in slaves:
|
||||
print("http://{}{}".format(s, fileurl))
|
||||
|
||||
for s in s3_slaves:
|
||||
print("http://{}{}".format(s, s3_fileurl))
|
||||
|
||||
if fc.mode == fc.MODE.FULL:
|
||||
header = fc.do_encrypt_header(random.choice(encslaves), fileurl)
|
||||
headname = "header_{}.bin".format(tv)
|
||||
|
@ -367,11 +367,14 @@ class FotaCheck:
|
||||
file = root.find("FILE_LIST").find("FILE")
|
||||
fileid = file.find("FILE_ID").text
|
||||
fileurl = file.find("DOWNLOAD_URL").text
|
||||
s3_fileurl = file.find("S3_DOWNLOAD_URL").text
|
||||
slave_list = root.find("SLAVE_LIST").findall("SLAVE")
|
||||
enc_list = root.find("SLAVE_LIST").findall("ENCRYPT_SLAVE")
|
||||
s3_slave_list = root.find("SLAVE_LIST").findall("S3_SLAVE")
|
||||
slaves = [s.text for s in slave_list]
|
||||
encslaves = [s.text for s in enc_list]
|
||||
return fileid, fileurl, slaves, encslaves
|
||||
s3_slaves = [s.text for s in s3_slave_list]
|
||||
return fileid, fileurl, slaves, encslaves, s3_fileurl, s3_slaves
|
||||
|
||||
def do_encrypt_header(self, encslave, address):
|
||||
params = self.get_creds()
|
||||
|
Loading…
Reference in New Issue
Block a user