X-Static Codes
Chat to Us @
SNM Chat
in #X-Static
Home
|
Contact
Login
Register
Search
Scripting
Snippets
Tutorials
Competitions
Links
Memberlist
Pastebin
Affiliates
Contact Admin
Sponsors
Nameless
Official #nameless website
Rooted.in
I got Rooted did you?
Stats
Total Members: 56
Newest User: Nofilicity
Snippets Added: 153
View
my first encrypter
Snippet Author:
threeZ
Rated:
Snippet Description:
ran across this going through some old files. my very first encrypter. look how crappy it is <3
menu * { - [t]encrypt .on:enc on .off:enc off .about:echo -a - made by threeZ aka Sean on May 23, 2005. started at 11:13 finished at 12:17 AM. } alias enc { if ($1 == on) { set %enc $true } else { set %enc $false } } on 1:INPUT:*: { if ($left($1, 1) != /) { if (%enc == $true) { haltdef | set %x $rand(1,37) | .msg $active $+($chr(15), $str($chr(30), %x), $chr(160)) $enc.txt($1-) | echo $target 12-1[12[14encryption12]1]12-5 $+ $me $+ $+ : $1- $+ } } } on ^1:TEXT:*:*: { ; reverses encryption into readable text ; uses the length of the amount of $chr(30)s to determine the decrypt routine if ($chr(30) isin $1) && ($chr(15) isin $1) && ($chr(160) isin $1) { ; uses a group of uncommon characters as a control so it doesn't decrypt text that isn't meant to be haltdef var %s = $calc($len($1) - 2) ; take away $chr(15) and $chr(160) away from the length of the $chr(30)s echo $target 12-1[12[14encryption12]1]12-5 $+ $nick $+ $+ : $dec.txt(%s, $2-) $+ } } alias enc.txt { ; returns encrypted text from $enc.chr(text) var %p = $numtok($1-,32), %i 1 while (%i <= %p) { var %c = $gettok($1-, %i, 32) var %enc.txt = %enc.txt $enc.chr(%c) inc %i 1 } return %enc.txt } alias enc.chr { ; encryption system var %count 1, %c = $1, %n = $len($1) while (%count <= %n) { var %current.val = $mid(%c, %count, 1) var %calc = $calc($asc(%current.val) - %x) var %current.enc = $chr(%calc) var %c.done = %c.done $+ %current.enc inc %count 1 } return %c.done } alias dec.txt { var %dec.n = $1, %i = $numtok($2-, 32), %c = 1 while (%c <= %i) { var %x = $gettok($2-, %c, 32) var %dec.txt = %dec.txt $dec.chr(%dec.n, %x) inc %c 1 } return %dec.txt } alias dec.chr { ; decryption system var %count 1, %dec.n = $1, %c = $2, %n = $len(%c) while (%count <= %n) { var %current.val = $mid(%c, %count, 1) var %calc = $calc($asc(%current.val) + %dec.n) var %current.enc = $chr(%calc) var %c.done = %c.done $+ %current.enc inc %count 1 } return %c.done }
Favorite Script
-
Smilies
Message:
Comments: