Created
October 30, 2015 09:31
-
-
Save fblundun/3e79835845f1c8682c11 to your computer and use it in GitHub Desktop.
List strings which may appear when a target string is doubly base 64-encoded
This file contains hidden or 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/python | |
import base64 | |
import sys | |
input = sys.argv[1] | |
def get_combinations(s): | |
return [base64.urlsafe_b64encode('a'*i + s)[2*i:-4] for i in range(3)] | |
for x in [get_combinations(intermediate) for intermediate in get_combinations(sys.argv[1])]: | |
for y in x: | |
print(y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage: