#Written by Bazju (backtrack-linux.org/forums) 26 Jan 2013 import re def mod_list(word, s_name): check_spec = ['.', '^', '$', '*', '+', '?', '*?', '+?', '??', \ '\\', '|', '\A', '\b', '\B', '\d', '\D', '\s', \ '\S', '\w', '\W', '\Z', ']', '[', '(', ')'] leet_dic = {'a': ('@', '4', '^', 'A'), \ 'b': ('8', 'B'), \ 'c': ('[(', '<', 'C'), \ 'd': ('D'), \ 'e': ('3', 'E'), \ 'f': ('ph', 'p#', 'F'), \ 'g': ('6', '9', 'G'), \ 'h': ('#', 'H'), \ 'i': ('!', '1', 'I'), \ 'j': ('J'), \ 'k': ('K'), \ 'l': ('1', 'L'), \ 'm': ('M'), \ 'n': ('N'), \ 'o': ('0', 'O'), \ 'p': ('P'), \ 'q': ('Q'), \ 'r': ('R'), \ 's': ('$', '5', 'S'), \ 't': ('+', '7', 'T'), \ 'u': ('U'), \ 'v': ('V'), \ 'w': ('W'), \ 'x': ('X'), \ 'y': ('Y'), \ 'z': ('2', 'Z'), 'elite': ('1337', '133+', '133t', '1eet', '1ee+', 'l337', 'l33+', 'l33t', 'leet', \ 'lee+'), 'hacker': ('haxx0r', 'haxX0r'), \ 'fucked': ('fuxx0red', 'fuxX0red'), \ 'fucker': ('fuxX0r', 'fuxx0r'), \ 'fuck': ('fuq', 'fuxX0r', 'fuxx0r', 'fsck'), \ 'cum': ('spooge', 'splooge', 'sp00ge'), \ 'boobs': ('h00trz', 'hooters'), \ 'fear': ('phjear', 'phear', 'ph33r', 'pheer', 'phj34r'), \ 'technique': ('tekniq', 't3kniq'), \ 'the': ('teh', 't3h'), \ 'access': ('haxXess', 'h4xX3s5', 'h4xX35'), \ 'porn': ('pron', 'pr0n', 'prawn'), \ 'lamer:': ('llama', '11ama'), \ 'tool': ('t00l', '700l'), \ 'newbie': ('n00b', 'newb', 'n3wb'), \ 'own': ('pwn', 'pown', 'p3wn', 'pwnz'), \ 'owned': ('pwned', 'pwnd', 'pwnt', 'pwn3d'), \ 'ownage': ('pwnage', 'pwning', 'pwner'), \ 'or': ('0rZ', 'OrZ'), \ 'er': ('0rZ', 'OrZ'), \ 'schooled': ('schooled', 'sk00l3d'), \ 'you': ('j00', 'joo'), \ 'hi': ('j0', 'jO'), \ 'later': ('l8a', 'l8r'), \ 'sex': ('sex0r', 'sexor', 'sexxor', 'sexXor'), \ 'sucks': ('sux', 'suxx0r', 'suxX0r'), \ 'rocks': ('r0x0r', 'r0x', 'rox', 'roxX0r', 'r0xX0r'), \ 'yay': ('w00t', 'woot'), \ 'you': ('u', 'U'), \ 'are': ('r', 'R'), \ 'why': ('y', 'Y'), \ 'be': ('b', 'B'), \ 'see': ('c', 'C'), \ 'okay': ('k', 'K'), \ 'ea': ('ee', '33', '3e', 'e3'), \ 'ee': ('ea', '34', '3a', 'e4'), \ 'love': ('luv', 'lov')} new_list=[] for dic in leet_dic: for char in leet_dic[dic]: wordx = re.subn(dic, char, word) s=0 for x in range(0, wordx[1]): s+=1 check = re.sub(dic, char, word, count=s) if len(check) != 0: new_list.append(check) for spec in check_spec: if spec in char: char = char.replace(spec, ('\\'+spec)) for x in range(1, wordx[1]): s-=1 check = re.sub(char, dic, wordx[0], count=s) if len(check) != 0: new_list.append(check) with open(s_name, 'a') as f: f.write(''.join(new_list)) def leet_con(f_name): with open(f_name[0], 'r') as f: for word in f: mod_list(word, f_name[1]) with open(f_name[1], 'r') as f: for word in f: mod_list(word, f_name[1]) def get_set(): f_name = [raw_input('Open file: ')] f_name.append(raw_input('Save_as: ')) leet_con(f_name) #=====Get Started====== if __name__ == '__main__': get_set()