Skip to content

Instantly share code, notes, and snippets.

@45deg 45deg/crypt500.py
Created Sep 27, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.