diff --git a/x.py b/x.py index 4be88b8..a50e8e8 100644 --- a/x.py +++ b/x.py @@ -89,7 +89,7 @@ def x(url): # allow only one request at a time with lock: durl = str.encode(url) - durl = base64.b64decode(durl) + durl = base64.urlsafe_b64decode(durl) durl = zlib.decompress(durl) aes = aes_new() durl = aes.decrypt(durl) @@ -134,7 +134,7 @@ if __name__ == "__main__": foo = str.encode(sys.argv[2]) foo = aes.encrypt(foo) foo = zlib.compress(foo) - foo = base64.b64encode(foo) + foo = base64.urlsafe_b64encode(foo) stdout_write(foo) print() sys.exit(0)