mIRC Homepage
Posted By: LTK_sNiPe Simple Encoding System - 26/01/03 12:55 AM
Hey. I'd like to make some encoding system, and this is what i've thought out for it. You type something like /enc and it will first change each letter you enter to its corresponding character (ie. the period would be 46) and you separate each number by periods. Then you encode the text with mIRC's $encode system. I need someone to help me write this. I think I should use a while command. Maybe i can generate a number, $rand(1,99) and add that to each chr so it would be harder to crack? Well if this is a good idea, gimme your input, and please show me how to make this. Thanks. smirk
Posted By: Sabby Re: Simple Encoding System - 26/01/03 01:38 AM
I dont see why this would be usefull but from what you stated it would be something like this:

Code:
alias enc {
  if (!$1) echo -a ** /enc: Error
  else {
    var %i = 1,%t = $replace($1-,$chr(32),$chr(160))
    while (%i <= $len(%t)) {
      var %x = $+($iif(%x,$+(%x,.)),$encode( [ $mid(%t,%i,1) ] ))
      inc %i
    }
    echo -a %x
  }
}


and if ya want a decoder it would be something like this:

Code:
alias dnc {
  if (!$1) echo -a ** /dnc: Error
  else {
    var %i = 1
    while ($gettok($1-,%i,46)) {
      var %x = $iif(%x,%x) $+ $decode( [ $ifmatch ] )
      inc %i
    }
    echo -a $replace(%x,$chr(160),$chr(32))
  }
}
Posted By: Sabby Re: Simple Encoding System - 26/01/03 04:00 AM
bah forgot to enter the snytax:

/enc Text Here
/dnc Encripted Text Here
Posted By: MonoSex Re: Simple Encoding System - 26/01/03 02:25 PM
You can always download blowfish.dll from mircscripts.org or use $md5 for one-way hashing wink
© mIRC Discussion Forums