Skip to content

Instantly share code, notes, and snippets.

@Abss0x7tbh
Created September 6, 2018 11:54
Show Gist options
  • Save Abss0x7tbh/8d7b422d07fc54cffa1063e8d6ff6ca0 to your computer and use it in GitHub Desktop.
Save Abss0x7tbh/8d7b422d07fc54cffa1063e8d6ff6ca0 to your computer and use it in GitHub Desktop.
Recursive base64 decode
import base64
strx = input('Enter your b64 encoded string')
n = int(input('Enter number of times to decode'))
for i in range(n):
strx = base64.b64decode(strx)
#convert bytes to string
res = (str(strx))
#chuck b''
print(res[2:-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment