Skip to content

Instantly share code, notes, and snippets.

@7h3rAm
Created May 19, 2015 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7h3rAm/366e16e7c5da2bd51a82 to your computer and use it in GitHub Desktop.
Save 7h3rAm/366e16e7c5da2bd51a82 to your computer and use it in GitHub Desktop.
def map_to_lowercase_letter(s):
return ord('a') + ((s - ord('a')) % 26)
def next_domain(domain):
dl = [ord(x) for x in list(domain)]
dl[0] = map_to_lowercase_letter(dl[0] + dl[3])
dl[1] = map_to_lowercase_letter(dl[0] + 2*dl[1])
dl[2] = map_to_lowercase_letter(dl[0] + dl[2] - 1)
dl[3] = map_to_lowercase_letter(dl[1] + dl[2] + dl[3])
return ''.join([chr(x) for x in dl])
seed = 'earnestnessbiophysicalohax.com' # 15372 equal to 0 (seed = 0)
domain = seed
for i in range(10):
print(domain)
domain = next_domain(domain)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment