Skip to content

Instantly share code, notes, and snippets.

@Sparrow1029
Created March 25, 2019 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sparrow1029/ea1e4d553a8c0076d9081f5cbd56acff to your computer and use it in GitHub Desktop.
Save Sparrow1029/ea1e4d553a8c0076d9081f5cbd56acff to your computer and use it in GitHub Desktop.
Decode base64 until flag is found
#!usr/bin/env python3
from base64 import b64decode
f = open('lol.txt', 'r')
string = str(f.read())
f.close()
print("Decoding...")
while True:
try:
b64str = b64decode(string).decode('utf-8')
string = b64str
except:
print("Done.\n")
print(f'Decoded string: "{b64str}"')
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment