weechat- me personal weechat setup đĩđĸ |
git clone git://git.acid.vegas/weechat.git |
Log | Files | Refs | Archive | README |
confuse.py (5079B)
1 # -*- coding: utf-8 -*- 2 # confusables - developed by acidvegas in python (https://git.acid.vegas/random) 3 # adapted as a weechat script by wrk 4 5 ''' 6 This script contains a dictionary of keyboard typable characters unicode variants that are very similar. 7 Other possible variants exist, for now we are only matching the ones that do not "look" like unicode. 8 This can be used to evade spam filtering by replacing characters with their similar unicode variants. 9 10 Todo: 11 - Convert unicode characters into raw codepoints in the dictionary (Example: \u202e) 12 - Add variants for missing typable characters (iIl) 13 - Extend to more variants than already in the database 14 - Set different odds on character replacement for chance feature on the confuse function 15 ''' 16 17 import weechat 18 import random 19 20 def confuse(data, chance=False): 21 '''chance set to True will give each replacable character a 50% chance of being replaced''' 22 confused = str() 23 for char in data: 24 if char in confusable and (not chance or random.choice((True,False))): 25 confused += random.choice(list(confusable[char])) 26 else: 27 confused += char 28 return confused 29 30 confusable = { 31 ' ':'âââââââ', 32 '.':'Üâ¤īŧâĄ', 33 '!':'Įâĩīŧ', 34 '$':'īŧ', 35 '%':'īŧ ', 36 '&':'ę¸īŧ', 37 ':':'Ë˸Ö×ââļęŊęī¸°īŧ', 38 ';':'Ížīŧ', 39 '<':'á¸īŧ', 40 '=':'âšęŋīŧ', 41 '>':'áŗīŧ', 42 '?':'īŧ', 43 '@':'īŧ ', 44 '0':'ßđ°ãđđŦđĒOáđđ¤âĩÕđĸđĸđâ˛ĐÎāŦ đđā§ĻāĻīŧ¯đĢđžęŗđđļđļđļđā¯ĻāąĻāŗĻā´ áááŋá´á´â˛īŧīŊđŦđĒ', 45 '1':'đđđđŖđđˇ', 46 '2':'Ƨáŋīŧđđ¤đŽđ¸', 47 '3':'ÆˇČĐĶ âŗęĒęĢīŧ', 48 '4':'áđđđĻđ°đē', 49 '5':'Æŧīŧ', 50 '6':'ĐąáŽâŗīŧ', 51 '7':'īŧđ', 52 '8':'īŧđđđ đĒđ´', 53 '9':'ā§ā¨âŗęŽīŧ', 54 'A':'ÎĐáĒá á´ęŽęēīŧĄđ ', 55 'B':'ÎĐá´áˇęīŧĸđđĄđđĩđŠđšđĄđđđŊđŠđđđ', 56 'C':'ĐĄááââ âⲤęīŧŖđĸđ', 57 'D':'á ááĒâ Žęę°īŧ¤đđˇđĢđģđŖđđđŋđŗ', 58 'E':'ÎĐáŦâŋâ´šę°ęŧīŧĨđ', 59 'F':'Īá´ęęīŧĻđđĨđ', 60 'G':'ÉĸÔááŗáģęęŽīŧ§đđēđŽđžđĻđđđđļ', 61 'H':'ĘÎĐĐŊáģáŧâ˛ę§īŧ¨đđđģđ¯đ§đđđđŽđ¨đĸđđ', 62 'J':'ÍŋĐáĢáá´ęę˛ęģīŧĒđđŊđąđđŠđđš', 63 'K':'ÎĐáĻáâĒâ˛ęīŧĢ', 64 'L':'ĘááĒâ ŦâŗâŗęĄęŽŽīŧŦđđ', 65 'M':'ÎĪēĐáˇá°áâ ¯â˛ęīŧđ°đđđđ´đđŦđ đđđŧđŗđđ§đĄđ', 66 'N':'É´Îâ˛ę īŧŽ', 67 'O':'OÎĐÕā¯ĻāąĻāŗĻā´ áááŋáá´á´â˛â˛âĩãęŗīŧīŧ¯īŊđđĢđđŦđđĒ', 68 'P':'ÎĄĐ áĸáá´á´Šââ˛ĸęꎲīŧ°đđđđˇđ¯đŖđđđŋđ¸đ˛đŦđĻđ ', 69 'Q':'ââĩīŧąđđđ¸đ°đ¤đđđ', 70 'R':'ÆĻĘáĄáááąęŖęąęŽĸīŧ˛đ´', 71 'S':'Đ Õááęĸīŧŗđđ ', 72 'T':'ΤĐĸŅáĸá´â¤ââ˛Ļęę˛īŧ´đđąđ', 73 'U':'ÕááâĒâę´īŧĩđ', 74 'V':'Ņ´Ų§Ûˇáá¯â ¤â´¸ęĻęīŧļ', 75 'W':'ÔáŗáęĒīŧˇ', 76 'X':'ΧĐĨááˇâ Šâŗâ˛ŦâĩęĢęŗīŧ¸đđ´đđĸ', 77 'Y':'ÎĨĪĐŖŌŽáŠáŊⲨęŦīŧšđ˛', 78 'Z':'Îáęīŧēđĩ', 79 'a':'ÉιаâēīŊđđđđđđēđŽđĸđđđđŧđļđ°đĒ', 80 'b':'ÆĐŦáá˛á¯īŊđđđđđģđ¯đŖđđ', 81 'c':'Ī˛Ņá´â Ŋâ˛ĨęŽ¯īŊđŊđđđđđđŧđ°đ¤đđ', 82 'd':'Ôá§á¯â â žęīŊđđđ đšđđŊđąđĨđđ', 83 'e':'ĐĩŌŊâŽīŊ đđđžđ˛đ', 84 'f':'áēęęŦĩīŊ', 85 'g':'ÆÉĄÖáļīŊđ đđđđđđ´đ¨đđ', 86 'h':'ŌģáâīŊđđđđĩđŠđđ', 87 'j':'ĪŗŅīŊđŖđ', 88 'k':'īŊđ¤đđđđđđ¸đŦđ đ', 89 'm':'mđđĸđēâ ŋ', 90 'n':'Õ¸ÕŧīŊđđģđ¯đŖđ', 91 'o':'OÎĐÕā¯ĻāąĻāŗĻā´ áááŋáá´á´â˛â˛âĩãęŗīŧīŧ¯īŊđđĢđđŦđđĒ', 92 'p':'ĪĪąŅâ´â˛ŖīŊđđĄđđŊđąđĨđđđđđđē', 93 'q':'ÔīŊđĒđĸđđžđ˛đĻđ', 94 'r':'Đŗá´ĻⲠęęŽīŊđĢđđŋđ', 95 's':'ŅęąęŽĒīŊđ', 96 't':'īŊđđ', 97 'u':'ĘĪ ÕŊá´ęīŊđļ', 98 'v':'ÎŊŅĩá´ â ´â¨âꎊīŊ', 99 'w':'ɯŅĄÔÕĄá´ĄęŽīŊ', 100 'x':'ÃŅ â šâ¤Ģâ¤Ŧ⨯īŊđąđĨđđĩđŠđđđ đšđđĄ', 101 'y':'ÉŖÎŗŅŌ¯á§áģŋęīŊ', 102 'z':'á´ĸęŽīŊđ¯á´ĸđđĢęŽđŖđ' 103 } 104 105 106 def cmd_confuse(data, buf, msg): 107 weechat.command(buf, f'/input send {confuse(msg)}') 108 109 return weechat.WEECHAT_RC_OK 110 111 if weechat.register('confuse', 'acidvegas & wrk', '1.0', 'ISC', 'confuse mfers', '', ''): 112 weechat.hook_command('confuse', 'confuse text', '<text>', '', '', 'cmd_confuse', '')