Skip to content

Commit

Permalink
Update signatures.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YeahNotSewerSide authored Feb 5, 2020
1 parent 3e5dab9 commit 4ef6fc1
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
import urllib

RANDOMISE_CNONCE = True


def actual_cnonce():
buf = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
cnonce = ''
length = random.randint(0,19) + 30
for i in range(length):
cnonce += random.choice(buf)
return cnonce

DEFAULT_CNONCE = actual_cnonce()

def get_cnonce() -> str:
if RANDOMISE_CNONCE:
buf = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
cnonce = ''
length = random.randint(0,19) + 30
for i in range(length):
cnonce += random.choice(buf)
cnonce = actual_cnonce()
else:
cnonce = 'o5oorrrlBlbWKHRVuH7lBQdVCQEVKeXeTkAyA9H6FY8DT904sq'
cnonce = DEFAULT_CNONCE

return cnonce

Expand Down

0 comments on commit 4ef6fc1

Please sign in to comment.