Created
September 27, 2015 12:50
-
-
Save 45deg/a648e56769b2465bf14b to your computer and use it in GitHub Desktop.
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
import random | |
import string | |
import sys | |
import base64 | |
alphabets = string.lowercase + string.uppercase | |
base64s = set(alphabets + '0123456789' + '+' + '/') | |
appeared = set() | |
for i in range(100000): | |
for LEN in range(1,9): | |
stra = '' | |
strb = '' | |
for i in range(LEN): | |
stra += random.choice(alphabets) | |
strb += random.choice(alphabets) | |
if stra == strb: | |
continue | |
stra = base64.b64encode(stra) | |
strb = base64.b64encode(strb) | |
for a, b in zip(stra, strb): | |
if a == b: | |
appeared.add(a) | |
print ''.join(sorted(base64s - appeared)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment