mIRC Home    About    Download    Register    News    Help

Print Thread
#8349 26/01/03 12:55 AM
Joined: Jan 2003
Posts: 10
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Jan 2003
Posts: 10
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


[irc://irc.mircx.com:6667/] - #Scripts, #Gmforum.cjb.net
#8350 26/01/03 01:38 AM
Joined: Jan 2003
Posts: 94
S
Babel fish
Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
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))
  }
}


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#8351 26/01/03 04:00 AM
Joined: Jan 2003
Posts: 94
S
Babel fish
Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
bah forgot to enter the snytax:

/enc Text Here
/dnc Encripted Text Here


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#8352 26/01/03 02:25 PM
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
You can always download blowfish.dll from mircscripts.org or use $md5 for one-way hashing wink


Link Copied to Clipboard