YCODE encrypt/decrypter

By _Dean_ on Jan 28, 2011

well this is kinda a different script here

• copy and paste it to a new remote window alt+r
• right click on channel, then click on YCODE

put the text you want to encrypt then click ''encrypt''

you can choose a key to encrypt your text
even $chr(32) = space is accepted

ASCII code has 256 characters, and all this characters its accepted as Key, and could generate like 1.099.511.627.776 trillion of different combinations

example:

lets encrypt word ''test'' with key abcde
it will result ''‡x†‡''

but now changing, ''e'' to ''f''
''ˆy‡ˆ'' without the ''''

dialog ycode {
  title "YCODE"
  size -1 -1 165 110
  option dbu
  edit "", 1, 8 14 146 28, multi autohs autovs
  text "Text:", 2, 9 4 25 8
  edit "", 3, 8 58 145 27, multi autohs autovs
  text "Decrypt:", 4, 9 49 37 8
  edit "", 5, 108 95 50 10, limit 5
  text "Key:", 6, 108 85 25 8
  button "Encrypt", 7, 60 93 37 12
  button "Decode", 8, 16 93 37 12
}

alias ycode { dialog -m ycode ycode }
menu channel { 
  YCODE:{ 
    ycode
  }
}

on *:dialog:ycode:sclick:*:{
  if (($did == 7) && ($did(5) != $null)) {
    var %x = 1  
    did -r ycode 3
    while ($mid($did(1).text, %x, 1)) { 
      did -a ycode 3 $iif($mid($did(1).text,%x,1) == $chr(32), $chr(0160), $chr($calc($asc($mid($did(1).text, %x, 1)) + $cn($did(5).text))))
      inc %x
    }
  }
  if (($did == 8) && ($did(5) != $null)) {
    var %x = 1 
    did -r ycode 3
    while ($mid($did(1).text, %x, 1)) { 
      did -a ycode 3 $iif($mid($did(1).text,%x,1) == $chr(0160), $chr(0160), $chr($calc($asc($mid($did(1).text, %x, 1)) - $cn($did(5).text))))
      inc %x
    }
  }
  if (($did == 7) && ($did(5) == $null)) {
    var %x = 1  
    did -r ycode 3
    while ($mid($did(1).text, %x, 1)) { 
      did -a ycode 3 $iif($mid($did(1).text,%x,1) == $chr(32), $chr(0160), $chr($calc($asc($mid($did(1).text, %x, 1)) + 100)))
      inc %x
    }
  }
  if (($did == 8) && ($did(5) == $null)) {
    var %x = 1 
    did -r ycode 3
    while ($mid($did(1).text, %x, 1)) { 
      did -a ycode 3 $iif($mid($did(1).text,%x,1) == $chr(0160), $chr(0160), $chr($calc($asc($mid($did(1).text, %x, 1)) - 100)))
      inc %x
    }
  }
}

alias cn { 
  var %x = 1 | var %y = ""
  while ($mid($1, %x, 1)) {
    %y = %y $+ $calc($asc($mid($1-, %x, 1)) - 10)
    inc %x
  }
  return %y
}

Comments

Sign in to comment.
_Dean_   -  Jan 29, 2011

Thanks chorao, e valeu pelo like =)

 Respond  
chorao   -  Jan 29, 2011

Nice! o/

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.