Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 4ef6fc1

Browse files
Update signatures.py
1 parent 3e5dab9 commit 4ef6fc1

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

signatures.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@
44
import urllib
55

66
RANDOMISE_CNONCE = True
7+
8+
9+
def actual_cnonce():
10+
buf = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
11+
cnonce = ''
12+
length = random.randint(0,19) + 30
13+
for i in range(length):
14+
cnonce += random.choice(buf)
15+
return cnonce
16+
17+
DEFAULT_CNONCE = actual_cnonce()
718

819
def get_cnonce() -> str:
920
if RANDOMISE_CNONCE:
10-
buf = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
11-
cnonce = ''
12-
length = random.randint(0,19) + 30
13-
for i in range(length):
14-
cnonce += random.choice(buf)
21+
cnonce = actual_cnonce()
1522
else:
16-
cnonce = 'o5oorrrlBlbWKHRVuH7lBQdVCQEVKeXeTkAyA9H6FY8DT904sq'
23+
cnonce = DEFAULT_CNONCE
1724

1825
return cnonce
1926

0 commit comments

Comments
 (0)