Skip to content

Commit

Permalink
Update tool.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Nov 9, 2023
1 parent d361517 commit cb7aa47
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,7 @@ def urlDecode(str):
def b64Decode(str):
str = str.strip()
str += (len(str)%4)*'='
#print(str)
try:
result = base64.b64decode(str)
except Exception as e:
result = base64.urlsafe_b64decode(str)
return result
return base64.urlsafe_b64decode(str)

def readFile(path):
file = open(path,'rb')
Expand Down

0 comments on commit cb7aa47

Please sign in to comment.