Created
March 25, 2019 22:51
-
-
Save Sparrow1029/ea1e4d553a8c0076d9081f5cbd56acff to your computer and use it in GitHub Desktop.
Decode base64 until flag is found
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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