aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/transaction_id.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-05-26 06:46:00 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-05-26 06:46:00 -0400
commit6424318a059207759b9055cf8a8df91c0ddac7c8 (patch)
tree3fb8adec807ad1ffeba4889a506b05e680ca8051 /gallery_dl/transaction_id.py
parent2bef55427baa34bf0f78d52590bbf27b2c5f3a56 (diff)
parent7672a750cb74bf31e21d76aad2776367fd476155 (diff)
Update upstream source from tag 'upstream/1.29.7'
Update to upstream version '1.29.7' with Debian dir 264267cd1ebd5c7205fe1f137a394d0ae1a2fb3b
Diffstat (limited to 'gallery_dl/transaction_id.py')
-rw-r--r--gallery_dl/transaction_id.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gallery_dl/transaction_id.py b/gallery_dl/transaction_id.py
index 25f1775..89e3d5b 100644
--- a/gallery_dl/transaction_id.py
+++ b/gallery_dl/transaction_id.py
@@ -129,7 +129,9 @@ class ClientTransaction():
keyword="obfiowerehiring", rndnum=3):
bytes_key = self.key_bytes
- now = int(time.time()) - 1682924400
+ nowf = time.time()
+ nowi = int(nowf)
+ now = nowi - 1682924400
bytes_time = (
(now ) & 0xFF, # noqa: E202
(now >> 8) & 0xFF, # noqa: E222
@@ -141,7 +143,7 @@ class ClientTransaction():
method, path, now, keyword, self.animation_key)
bytes_hash = hashlib.sha256(payload.encode()).digest()[:16]
- num = random.randrange(256)
+ num = (random.randrange(16) << 4) + int((nowf - nowi) * 16.0)
result = bytes(
byte ^ num
for byte in itertools.chain(