Encoder/Decoder for mIRC
It also autodecode message in chan/query.
22:46:38 <@Scarecrow> DmNq
vq%4%7%6
menu menubar,status,channel,query {
Encoder
.Dialog:dmn.enc
.Set encryption key $+([,%enc.key,]):dmn.setkey $$?="Insert Number"
}
alias dmn.enc { if ($dialog(encoding)) { dialog -x encoding } | dialog -m encoding encoding }
alias code { msg $active DmN` $dmn.code(%enc.key,$1-) }
alias -l dmn.code {
if (!%enc.key) { set %enc.key 5 }
if ($isid) { var %iz = $1 | return $regsubex($2-,/(.)/g,$chr($xor($asc(\t),%iz))) }
else { var %iz = $2 | echo $1 $+(,$color(info),* Decode:,$color(normal)) $regsubex($3-,/(.)/g,$chr($xor($asc(\t),%iz))) }
}
alias -l dmn.setkey { if ($1 isnum) { set %enc.key $1 } }
#autodecode on
on *:TEXT:*:#: { if ($1 === DmN`) { dmn.code $chan %enc.key $2- } }
on *:TEXT:*:?: { if ($1 === DmN`) { dmn.code $nick %enc.key $2- } }
#autodecode end
dialog encoding {
title "Encoder [/dmn.enc]"
size -1 -1 220 155
check "Enable Auto-Decoding" 111, 5 5 180 15
text "Encryption key:" 7, 5 27 89 15
edit "" 8,95 25 20 20
box "Encode/Decode" 112, 5 45 210 80
edit "TEXT" 1, 10 60 200 20,autohs center
button "Clear" 2, 20 80 50 20
button "Encode/Decode" 3, 80 80 120 20
edit "....." 4, 10 100 200 20,autohs center read
button "+ Info" 5, 5 130 60 20
button "ok" 6, 165 130 50 20, ok
text "- To encode a text type '/code TEXT'" 113, 5 165 210 30
text "- The Encryption key is a secret number for encoding\decoding text." 115, 5 195 210 30
}
on *:dialog:encoding:*:*:{
if ($devent == init) {
if ($group(#autodecode) = on) { did -cf encoding 111 }
did -ar $dname 8 %enc.key
}
if ($devent == sclick) {
if ($did = 2) { did -r encoding 1,4 }
if ($did = 3) { did -ar encoding 4 $dmn.code(%enc.key,$did(1)) }
if ($did = 111) { if ($group(#autodecode) = off) { .enable #autodecode } | else { .disable #autodecode } }
if ($did = 5) { if ($did(5).text = - Info) { did -ra encoding 5 + Info | dialog -s encoding $dialog(encoding).x $dialog(encoding).y 220 155 } | elseif ($did(5).text = + Info) { did -ra encoding 5 - Info | dialog -s encoding $dialog(encoding).x $dialog(encoding).y 220 225 } }
}
if ($devent == edit) && ($did = 8) { dmn.setkey $did(8).text }
}
on *:load:{ set %enc.key 5 }
on *:unload:{ unset %enc.key }
Sunny does have a point.
t116uy
y88op0
foobar
Could all be the same thing, just a simple replace, but after a while of seeing encrypted chatter people could gather enough of a database of it, and reference common cryptography information to crack it pretty quickly.
One solution would be to constantly switch the key, but it would have to be communicated to the person(s) you're speaking to, which would require a private/semi-private conversation with them anyway where the public could not discover the key.
it's a replace of characters, but if you don't know the right decryption key (a number) you can't decode it