random- collection of un-sorted bollocks |
git clone git://git.acid.vegas/random.git |
Log | Files | Refs | Archive |
confusables.py (4149B)
1 #!/usr/bin/env python 2 # confusables - developed by acidvegas in python (https://git.acid.vegas/random) 3 4 ''' 5 This script contains a dictionary of keyboard typable characters unicode variants that are very similar. 6 Other possible variants exist, for now we are only matching the ones that do not "look" like unicode. 7 This can be used to evade spam filtering by replacing characters with their similar unicode variants. 8 9 Todo: 10 - Convert unicode characters into raw codepoints in the dictionary (Example: \u202e) 11 - Add variants for missing typable characters (iIl) 12 - Extend to more variants than already in the database 13 - Set different odds on character replacement for chance feature on the confuse function 14 ''' 15 16 import random 17 18 def confuse(data, chance=False): 19 '''chance set to True will give each replacable character a 50% chance of being replaced''' 20 confused = str() 21 for char in data: 22 if char in confusable and (not chance or random.choice((True,False))): 23 confused += random.choice(list(confusable[char])) 24 else: 25 confused += char 26 return confused 27 28 confusable = { 29 ' ':' ', 30 '.':'܂․.⡀', 31 '!':'ǃⵑ!', 32 '$':'$', 33 '%':'%', 34 '&':'ꝸ&', 35 ':':'ː˸։׃⁚∶ꓽ꞉︰:', 36 ';':';;', 37 '<':'ᐸ<', 38 '=':'⹀꓿=', 39 '>':'ᐳ>', 40 '?':'?', 41 '@':'@', 42 '0':'߀𝛰〇𐊒𝟬𝜪Oዐ𝞞𝝤ⵔՕ𝟢𝗢𝘖ⲞОΟଠ𝟎𝐎০୦O𐊫𝙾ꓳ𐐄𝟶𝑶𝚶𐓂௦౦೦ഠဝ၀ჿᴏᴑⲟ0o𐐬𐓪', 43 '1':'𝚕𝟏𝟙𝟣𝟭𝟷', 44 '2':'Ƨᒿ2𝟐𝟤𝟮𝟸', 45 '3':'ƷȜЗӠⳌꝪꞫ3', 46 '4':'Ꮞ𝟒𝟜𝟦𝟰𝟺', 47 '5':'Ƽ5', 48 '6':'бᏮⳒ6', 49 '7':'7𐓒', 50 '8':'8𐌚𝟖𝟠𝟪𝟴', 51 '9':'৭୨ⳊꝮ9', 52 'A':'ΑАᎪᗅᴀꓮꭺA𐊠', 53 'B':'ΒВᏴᗷꓐB𐊂𐊡𝐁𝐵𝑩𝔹𝖡𝗕𝘉𝘽𝚩𝜝𝝗𝞑', 54 'C':'СᏟᑕℂⅭ⊂ⲤꓚC𐊢𐐕', 55 'D':'ᎠᗞᗪⅮꓓꭰD𝐃𝐷𝑫𝔻𝖣𝗗𝘋𝘿𝙳', 56 'E':'ΕЕᎬ⋿ⴹꓰꭼE𐊆', 57 'F':'ϜᖴꓝꞘF𐊇𐊥𝟋', 58 'G':'ɢԌᏀᏳᏻꓖꮐG𝐆𝐺𝑮𝔾𝖦𝗚𝘎𝙂𝙶', 59 'H':'ʜΗНнᎻᕼⲎꓧH𐋏𝐇𝐻𝑯𝖧𝗛𝘏𝙃𝚮𝛨𝜢𝝜𝞖', 60 'J':'ͿЈᎫᒍᴊꓙꞲꭻJ𝐉𝐽𝑱𝕁𝖩𝗝𝙹', 61 'K':'ΚКᏦᛕKⲔꓗK', 62 'L':'ʟᏞᒪⅬⳐⳑꓡꮮL𐐛𐑃', 63 'M':'ΜϺМᎷᗰᛖⅯⲘꓟM𐊰𐌑𝐌𝑀𝑴𝕄𝖬𝗠𝘔𝙈𝙼𝚳𝛭𝜧𝝡𝞛', 64 'N':'ɴΝⲚꓠN', 65 'O':'OΟОՕ௦౦೦ഠဝ၀ჿዐᴏᴑⲞⲟⵔ〇ꓳ0Oo𐊒𐊫𐐄𐐬𐓂𐓪', 66 'P':'ΡРᏢᑭᴘᴩℙⲢꓑꮲP𐊕𝐏𝑃𝑷𝖯𝗣𝘗𝙋𝙿𝚸𝛲𝜬𝝦𝞠', 67 'Q':'ℚⵕQ𝐐𝑄𝑸𝖰𝗤𝘘𝙌𝚀', 68 'R':'ƦʀᎡᏒᖇᚱꓣꭱꮢR𐒴', 69 'S':'ЅՏᏕᏚꓢS𐊖𐐠', 70 'T':'ΤТтᎢᴛ⊤⟙ⲦꓔꭲT𐊗𐊱𐌕', 71 'U':'Սሀᑌ∪⋃ꓴU𐓎', 72 'V':'Ѵ٧۷ᏙᐯⅤⴸꓦꛟV', 73 'W':'ԜᎳᏔꓪW', 74 'X':'ΧХ᙭ᚷⅩ╳ⲬⵝꓫꞳX𐊐𐊴𐌗𐌢', 75 'Y':'ΥϒУҮᎩᎽⲨꓬY𐊲', 76 'Z':'ΖᏃꓜZ𐋵', 77 'a':'ɑαа⍺a𝐚𝑎𝒂𝕒𝖆𝖺𝗮𝘢𝙖𝚊𝛂𝛼𝜶𝝰𝞪', 78 'b':'ƄЬᏏᑲᖯb𝐛𝑏𝒃𝖇𝖻𝗯𝘣𝙗𝚋', 79 'c':'ϲсᴄⅽⲥꮯc𐐽𝐜𝑐𝒄𝕔𝖈𝖼𝗰𝘤𝙘𝚌', 80 'd':'ԁᏧᑯⅆⅾꓒd𝐝𝑑𝒅𝒹𝓭𝖽𝗱𝘥𝙙𝚍', 81 'e':'еҽ℮e𝐞𝕖𝖾𝗲𝚎', 82 'f':'ẝꞙꬵf', 83 'g':'ƍɡցᶃg𝐠𝑔𝒈𝕘𝖌𝗀𝗴𝘨𝙜𝚐', 84 'h':'һᏂℎh𝒉𝕙𝗁𝗵𝘩𝙝𝚑', 85 'j':'ϳјj𝐣𝚓', 86 'k':'k𝐤𝑘𝒌𝕜𝖐𝗄𝗸𝘬𝙠𝚔', 87 'm':'m𝕞𝙢𝗺ⅿ', 88 'n':'ոռn𝗇𝗻𝘯𝙣𝚗', 89 'o':'OΟОՕ௦౦೦ഠဝ၀ჿዐᴏᴑⲞⲟⵔ〇ꓳ0Oo𐊒𐊫𐐄𐐬𐓂𐓪', 90 'p':'ρϱр⍴ⲣp𝑝𝕡𝗉𝗽𝘱𝙥𝚙𝛒𝜌𝝆𝞀𝞺', 91 'q':'ԛq𝐪𝕢𝗊𝗾𝘲𝙦𝚚', 92 'r':'гᴦⲅꭈꮁr𝐫𝗋𝗿𝚛', 93 's':'ѕꜱꮪs𐑈', 94 't':'t𝘁𝚝', 95 'u':'ʋυսᴜꭒu𐓶', 96 'v':'νѵᴠⅴ∨⋁ꮩv', 97 'w':'ɯѡԝաᴡꮃw', 98 'x':'×хⅹ⤫⤬⨯x𝐱𝑥𝒙𝔵𝕩𝖝𝗑𝘅𝘹𝙭𝚡', 99 'y':'ɣγуүყỿꭚy', 100 'z':'ᴢꮓz', 101 'z':'𝙯ᴢ𝗓𝕫ꮓ𝚣𝒛' 102 } 103 104 for i in range(30): 105 print(confuse('facebook'))