Skip to content

Instantly share code, notes, and snippets.

@theseanco
Created June 7, 2017 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theseanco/55ab8aeeff44bf0563bd6ef9a7344a0e to your computer and use it in GitHub Desktop.
Save theseanco/55ab8aeeff44bf0563bd6ef9a7344a0e to your computer and use it in GitHub Desktop.
MAKE YOUR OWN GOOGLE-PROOF NAMES
# -*- coding: UTF-8 -*-
# This script mangles a set of words with the first 11,264 characters of Unicode
# it will then perform the mangle to the number of times specified
# it will then save these mangled names to a file.
# it'll get messy.
# from co¥ᄀpt
from random import randint
print(
'\x1b[0;31m'+
"""\
_____ __ __ __
_________ |__ // // / ____ / /_
/ ___/ __ \ /_ </ // /_/ __ \/ __/
/ /__/ /_/ /__/ /__ __/ /_/ / /_
\___/\____/____/ /_/ / .___/\__/
/_/
"""+
'\x1b[0m'
)
print('\x1b[6;30;42m' + 'Make your own google-proof names!' + '\x1b[0m')
my_string = raw_input("Text to co¥ᄀpt-ify: ")
numTimes = raw_input("number of iterations: ")
# creates a random string of 1-5 unicode characters
# unicode characters taken to the end of 'miscellaneous arrows and symbols
def randomUnicode():
return ''.join(unichr(randint(0,11263)) for _ in range(randint(2,5)))
words = my_string.split()
newWords = []
wordFile = open(my_string+".txt","w")
# inserts the new string at a random point in the old string
def writeToFile(iterations):
for i in range(int(iterations)):
newWords = []
for i in range(len(words)):
randNum = randint(0,len(words[i]))
randomChars = randomUnicode()
newWords.append(words[i][0:randNum]+randomChars+words[i][randNum:len(my_string)])
print(' '.join(newWords))
wordFile.write(' '.join(newWords).encode('utf8'))
wordFile.write('\n')
writeToFile(numTimes)
wordFile.close()
#print(randomChars)
#print(my_string[0:randNum])
#print(my_string[randNum:len(my_string)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment