diff options
author | Ian Macdonald <ian@caliban.org> | 2020-11-05 17:40:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 17:40:34 +0100 |
commit | ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9 (patch) | |
tree | ea43a90dfd58653bb4ee8f969ecfc6dff271d426 | |
parent | fix #22 (diff) | |
download | samloader-ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9.tar samloader-ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9.tar.gz samloader-ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9.tar.bz2 samloader-ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9.tar.lz samloader-ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9.tar.xz samloader-ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9.tar.zst samloader-ddf8a2c408b3a5cda87a83b6c38e799d29ddbcb9.zip |
-rw-r--r-- | samloader/fusclient.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/samloader/fusclient.py b/samloader/fusclient.py index 5e3cd79..259d1b4 100644 --- a/samloader/fusclient.py +++ b/samloader/fusclient.py @@ -15,7 +15,8 @@ class FUSClient(object): def makereq(self, path, data=""): authv = 'FUS nonce="", signature="' + self.auth + '", nc="", type="", realm="", newauth="1"' r = requests.post("https://neofussvr.sslcs.cdngc.net/" + path, data=data, - headers={"Authorization": authv}, cookies={"JSESSIONID": self.sessid}) + headers={"Authorization": authv, "User-Agent": "Kies2.0_FUS"}, + cookies={"JSESSIONID": self.sessid}) if "NONCE" in r.headers: self.encnonce = r.headers["NONCE"] self.nonce = auth.decryptnonce(self.encnonce) @@ -26,7 +27,7 @@ class FUSClient(object): return r.text def downloadfile(self, filename, start=0): authv = 'FUS nonce="' + self.encnonce + '", signature="' + self.auth + '", nc="", type="", realm="", newauth="1"' - headers = {"Authorization": authv} + headers = {"Authorization": authv, "User-Agent": "Kies2.0_FUS"} if start > 0: headers["Range"] = "bytes={}-".format(start) r = requests.get("https://cloud-neofussvr.sslcs.cdngc.net/NF_DownloadBinaryForMass.do", |