those of you with mirc...

fury

Administrator
Staff member
Here's a couple binary decoder/encoder aliases... just cut/paste them to mirc's aliases section (Alt+A from mirc to get there) and type /bin [text] and it will convert to binary... /unbin [space-separated binary like that which is outputted by /bin text] to convert back to text.

Code:
bin {
  set -u0 %i 0
  set -u0 %binary.len $len($$1-)
  set -u0 %binary.temp $$1-
  :loop
  inc %i 1
  set -u0 %binary.out %binary.out $base($asc($left(%binary.temp,1)),10,2)
  set -u0 %binary.temp $right(%binary.temp,$calc(%binary.len - %i))
  if (%i < 57) { goto loop } 
  echo -a %binary.out
}
unbin {
  set -u0 %i 0
  set -u0 %unbinary.len $len($$1-)
  set -u0 %unbinary.temp $$1-
  :loop
  inc %i 1
  set -u0 %unbinary.out %unbinary.out $+ $chr($base($gettok(%unbinary.temp,%i,32),2,10))
  if (%i < 57) { goto loop }
  echo -a %unbinary.out
}

Enjoy :spin:
 
Top