home *** CD-ROM | disk | FTP | other *** search
- ############################################################################
- #
- # This is a script which decrypts most, if not all, other encryption schemes
- # Found in IRC scripts. Most of this done by MegaFred, with mucho help from
- # zoro-a. I tried to keep this as commented as possible, just lemme know if
- # you rip any of my code so I can hurt you.
- #
- # MegaFred
- #
- ############################################################################
-
- @ cryptver = [v2.3]
-
- @ TXTDECODE = [ON]
- @ NITEDECODE = [ON]
- @ NEWDECODE = [ON]
- @ OLDDECODE = [ON]
- @ DLCMDECODE = [ON]
- @ PLCMDECODE = [ON]
- @ DISDECODE = [ON]
- @ VENDECODE = [ON]
-
- @ lcm.in = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890./,]
- @ lcm.out =[zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA/98765432.01,]
-
- @ venomcode.in = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890./,]
- @ venomcode.out = [DEFGHIJKLMNOPQRSTUVWXYZABCxyzabcdefghijklmnopqrstuvw214365,/09.87]
- @ discus.in = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890./,]
- @ discus.out = [DEFGHIJKLMNOPQRSTUVWXYZABCxyzabcdefghijklmnopqrstuvw214365,/09.87]
-
- alias qsend {
- quote PRIVMSG $0 :$1-
- }
-
- alias usecho {
- ^xecho -window Main *** [26CRYPT00] USAGE: $*
- }
-
- alias cecho {
- ^xecho -window Main *** [26CRYPT00] $*
- }
-
- alias cxecho {
- ^xecho -window Crypt [26CRYPT00] $*
- }
-
- alias flip {
- @ str = [ $*]
- @ str.end = [$@str]
- @ rev.str = []
- while (str.end > 0) {
- @ rev.str = [$rev.str]##[$mid($str.end 1 $str)]
- @ str.end = str.end - 1
- }
- @ function_return = [$rev.str]
- ^assign -str;^assign -rev.str;^assign -str.end
- }
-
- alias lcm {
- @ line = [$*]
- @ len = [$@line]
- @ new = []
- @ cnt = 0
- while (cnt <= len) {
- @ ind = index($mid($cnt 1 $line) $lcm.in)
- if (ind > -1)
- {@ new = new ## mid($ind 1 $lcm.out)}
- {@ new = new ## mid($cnt 1 $line)}
- @ cnt = cnt + 1
- }
- @ function_return = [$new]
- ^assign -cnt ;^assign -new ;^assign -ind ;^assign -line;^assign -len
- }
-
- alias discus {
- @ r3.line = [$*]
- @ r3.len = @r3.line
- @ r3.new = []
- @ r3.cnt = 0
- while (r3.cnt < r3.len)
- {
- @ r3.ind = index($mid($r3.cnt 1 $r3.line) $discus.in)
- if (r3.ind > -1) {
- @r3.new = r3.new ## mid($r3.ind 1 $discus.out)
- }{
- @r3.new = r3.new ## mid($r3.cnt 1 $r3.line)
- }
- @r3.cnt = r3.cnt + 1
- }
- @ function_return = r3.new
- ^assign -r3.cnt ;^assign -r3.new ;^assign -r3.ind ;^assign -r3.line
- ^assign -r3.len
- }
-
- alias venomcode {
- @ r3.line = [$*]
- @ r3.len = @r3.line
- @ r3.new = []
- @ r3.cnt = 0
- while (r3.cnt < r3.len)
- {
- @ r3.ind = index($mid($r3.cnt 1 $r3.line) $venomcode.in)
- if (r3.ind > -1)
- {
- @r3.new = r3.new ## mid($r3.ind 1 $venomcode.out)
- }{
- @r3.new = r3.new ## mid($r3.cnt 1 $r3.line)
- }
- @r3.cnt = r3.cnt + 1
- }
- @ function_return = r3.new
- ^assign -r3.cnt ;^assign -r3.new ;^assign -r3.ind ;^assign -r3.line
- ^assign -r3.len
- }
-
- alias rem_v {
- @ _pattern = rmatch($0 $1-) - 1
- if (_pattern != -1) {@ function_return = notv($_pattern $1-)}
- {@ function_return = [$1-]}
- }
-
- alias notv {
- if ([$0]) {@ _pad = [ ]}
- {@ _pad = []}
- @ _words = [$1-]
- @ function_return = [$leftw($0 $1-)] ## [$_pad] ## [$restw(${[$0]+1} $1-)]
- }
-
- alias newenc @ function_return = [$encode($flip($encode($0-)))]
- alias newdec @ function_return = [$decode($flip($decode($0-)))]
-
- alias lcmn @ function_return = [$encode($flip($clean($0-)))]
- alias olddec @ function_return = [$decode($decode($0-))]
- alias oldenc @ function_return = [$encode($encode($0-))]
-
- alias leftw {@ function_return = [$(1-$0)]}
- alias restw {@ function_return = [$(${[$0]+1}-)]}
-
- # PING stuff
-
- ^on ^NOTICE "% 26CRYPT00 PING" {
- eval cxecho $0 checked to see if you're running 2600CRYPT.
- eval MSG $0 26CRYPT00 PONG $cryptver
- }
-
- ^on ^MSG "% 26CRYPT00 PONG*" {
- eval cxecho $0 is Running 2600Crypt $3-
- }
-
- # LCM public POP/DEF stuff
-
- ^on ^raw_irc "% PRIVMSG #% :*" {
- if ([$DLCMDECODE]==[On]) {
- @ mystr = [$fix1w($3-)]
- @ newstr = [$clean($(${3 ## [-] ## mystr}))]
- @ whodat = [$nonly($0)]
- if ([$2]==[$C]) {
- xecho -window Crypt <$whodat\/dLCM> $lcm($newstr)
- }{
- xecho -window Crypt <$whodat\:$2\/dLCM> $lcm($newstr)
- }
- ^assign -mystr;^assign -newstr;^assign -whodat
- }
- }
-
- ^on ^raw_irc "% PRIVMSG #% :*" {
- if ([$PLCMDDECODE]==[On]) {
- @ whodat = [$nonly($0)]
- @ themsg = [$flip($clean($decode($4-)))]
- if ([$2]==[$C]) {
- xecho -window Crypt <\$whodat\/pLCM> $themsg
- }{
- xecho -window Crypt <\$whodat\:$2\/pLCM> $themsg
- }
- ^assign -themsg;^assign -whodat
- }
- }
-
- # NiGHT decryption stuff.. it REALLY sucks. Just a simple encrypt.
-
- ^on ^raw_irc "% PRIVMSG #% :<N>*" {
- if ([$NITEDECODE]==[ON]) {
- @whodat = [$nonly($0)]
- ^assign nsay $decode($4-)
- if ([$2]==[$C]) {
- eval xecho -window Crypt <\$whodat\/NiTE> $nsay
- }{
- eval xecho -window Crypt <\$whodat\/:$1\NiTE> $nsay
- }
- assign -whodat;
- }
- }
-
- on ^msg "% <N>*" {
- if ([$NITEDECODE]==[ON]) {
- ^assign nmsg $decode($2)
- eval xecho -window Crypt \[$0\/NiTE] $nmsg
- assign -nmsg
- }
- }
-
- # TextBox decryption - Medicore - encrypt only, but make people think there's
- # a key by the 2 stray chars.
-
- ^on ^raw_irc "% PRIVMSG #% :* ?? -+ TEXT +-" {
- if ([$TXTDECODE] == [ON]) {
- @whodat = [$nonly($0)]
- if ([$2] == [$C]) {
- eval xecho -window Crypt <\$whodat\/TEXT> $strip( $decode($strip(: $left($index(" $3-) $3-))))
- }{
- eval xecho -window Crypt <$whodat:$2/TEXT> $strip( $decode($strip(: $left($index(" $3-) $3-))))
- }
- assign -whodat
- }
- }
-
- ^on ^msg "% * ?? -+ TEXT +-" {
- if ([$TXTDECODE] == [ON]) {
- eval xecho -window Crypt \[$0\/TEXT] $strip( $decode($left($index(" $1-) $1-)))
- }
- }
-
- # My latest 2600Crypt scheme.. best yet. encrypt,flip,encrypt.
-
- ^on ^raw_irc "% PRIVMSG #% :[ENCRYPTED]*" {
- if ([$NEWDECODE] == [ON]) {
- @whodat = [$nonly($0)]
- if ([$2]==[$C]) {
- eval xecho -window Crypt <\$whodat\/ENC> $newdec($4-)
- }{
- eval xecho -window Crypt <\$whodat\:$1/ENC> $newdec($4-)
- }
- ^assign -whodat;
- }
- }
-
- ^on ^MSG "% [ENCRYPTED]*" {
- if ([$NEWDECODE] == [ON]) {
- eval xecho -window Crypt [$0/ENC] $newdec($2-)
- }
- }
-
- # Older 2600crypt by Zoro-a. Not too bad, double encrypt.
-
- ^on ^raw_irc "% PRIVMSG #% :[ENCRYPTED]*" {
- if ([$OLDDECODE] == [ON]) {
- @whodat = [$nonly($0)]
- if ([$2]==[$C]) {
- eval xecho -window Crypt <\$whodat\/oENC> $olddec($4-)
- }{
- eval xecho -window Crypt <\$whodat\:$2\/oENC> $olddec($4-)
- }
- ^assign -whodat;
- }
- }
-
- ^on ^MSG "% [ENCRYPTED]*" {
- if ([$OLDDECODE] == [ON]) {
- eval xecho -window Crypt [$0/oENC] $olddec($2-)
- }
- }
-
- # Venom Stuff
-
- ^on ^raw_irc "% PRIVMSG #% :*-<!VeNoM!>-" {
- if ([$VENDECODE]==[ON]) {
- @ whodat = [$nonly($0)]
- @ mystr = [$3-]
- @ newstr = [$(${3 ## [-] ## mystr})]
- @ newstr = [$rem_v(-<!VeNoM!>- $newstr)]
- if ([$2]==[$C]) {
- xecho -window Crypt <\$whodat\/VENOM> $venomcode($newstr)
- }{
- xecho -window Crypt <\$whodat\:$2\/VENOM> $venomcode($newstr)
- }
- ^assign -mystr;^assign -newstr;^assign -whodat;
- }
- }
-
- # DiSCUS stuff
-
- ^on ^raw_irc "% PRIVMSG #% :*- DiSCUS -" {
- if ([$DISCDECODE]==[ON]) {
- @ mystr = [$3-]
- @ newstr = [$(${3 ## [-] ## mystr})]
- @ whodat = [$nonly($0)]
- ^assign code $discus($newstr)
- if ([$2]==[$C]) {
- eval xecho -window Crypt <\$whodat\/DiSCUS> $code
- }{
- eval xecho -window Crypt <\$whodat\:$2\/DiSCUS> $code
- }
- ^assign -mystr;^assign -newstr;^assign -whodat;
- }
- }
-
- ## Begin User Commands.
-
- # New 2600Crypt stuff
-
- alias enc if ([$0]) {
- eval qsend $C [ENCRYPTED] $newenc($0-)
- eval xecho -window Crypt <\$N\/ENC> $0-
- }{/usecho /sec [string]}
-
- alias penc if ([$1]) {
- eval qsend $0 [ENCRYPTED] $newenc( $1- )
- eval xecho -window Crypt >[\$0\/ENC] $1-
- }{/usecho /psec [nick] [string]}
-
- # Old 2600Crypt stuff
-
- alias oenc if ([$0]) {
- eval qsend $C [ENCRYPTED] $oldenc($0-)
- eval xecho -window Crypt <\$N\/oENC> $0-
- }{/usecho /oldsec [string]}
-
- alias openc if ([$1]) {
- eval qsend $0 [ENCRYPTED] $oldenc($1-)
- eval xecho -window Crypt >[\$0\/oENC] $1-
- }{/usecho /oldpspec [nick] [string]}
-
- # TextBox crypt stuff
-
- alias text if ([$0]) {
- eval qsend $C $encode($0-)" 2C -+ TEXT +-
- eval xecho -window Crypt <\$N\/TEXT> $0-
- }{usecho /text [text]}
-
- alias ptext if ([$1]) {
- eval qsend $0 $encode($1-)" 2C -+ TEXT +-
- eval xecho -window Crypt >[\$0\/TEXT] $1-
- }{usecho /ptext [nick] [text]}
-
- # NiGHT Crypt stuff
-
- alias nite if ([$0]) {
- eval qsend $C <N> $encode($0-) <N>
- eval xecho -window Crypt <\$N\/NiTE> $0-
- }{usecho /nite [text]}
-
- alias pnite if ([$1]) {
- eval qsend $0 <N> $encode($1-) <N>
- eval xecho -window Crypt >[\$0\/NiTE] $1-
- }{usecho /pnite [nick] [text]}
-
- # LCM def/pop stuff
-
- alias lcmd if ([$0]) {
- eval qsend $C $lcm($0-)
- xecho -window Crypt <${N}/dLCM> $0-
- }{usecho /lcmd [string]}
-
- alias lcmp if ([$0]) {
- eval qsend $C $lcmn($0-)
- xecho -window Crypt <${N}/pLCM> $0-
- }{usecho /lcmp [string]}
-
- # Venom stuff
-
- alias ven if ([$0]) {
- eval qsend $C $venomcode($0-) -<!VeNoM!>-
- eval xecho -window Crypt <\$N\/VENON> $0-
- }{usecho /ven [text]}
-
- # DiSCUS stuff
-
- alias disc if ([$0]) {
- eval qsend $C $discus($0-) - DiSCUS -
- eval xecho -window Crypt <\$N\/DiSC> $0-
- }{usecho /disc [text]}
-
- # Window stuff
-
- alias cw if ([$openwin]==[0]) {
- ^window new
- ^window scroll on
- ^window shrink 5
- ^window level public
- ^window name Crypt
- ^set hold_mode off
- ^window refnum Crypt
- ^window goto 2
- @ openwin = 1
- }{
- ^window refnum Crypt
- ^wait -cmd window kill
- ^window goto 1
- @ openwin = 0
- }
-
- alias pingenc if ([$0]) {
- eval notice $0 26CRYPT00 PING
- eval cxecho Sent PINGENC query to $0
- }{usecho /pingenc [nick/chan]}
-
- # Encryption Ignore/Remember stuff
-
- alias noenc {
- ^Assign $TXTDECODE OFF
- ^Assign $NEWDECODE OFF
- ^Assign $OLDDECODE OFF
- ^Assign $NITEDECODE OFF
- ^Assign $DLCMDECODE OFF
- ^Assign $PLCMDECODE OFF
- ^assign $VENDECODE OFF
- ^Assign $DISDECODE OFF
- if ([$openwin]==[1]) {
- /cw
- }
- }
-
- alias yesenc {
- ^Assign $TXTDECODE ON
- ^Assign $NEWDECODE ON
- ^Assign $OLDDECODE ON
- ^Assign $NITEDECODE ON
- ^Assign $DLCMDECODE ON
- ^Assign $PLCMDECODE ON
- ^Assign $VENDECODE ON
- ^Assign $DISDECODE ON
- if ([$openwin]==[0]) {
- /cw
- }
- }
-
- alias nonite {
- ^assign $NITEDECODE OFF
- }
-
- alias yesnite {
- ^assign $NITEDECODE ON
- }
-
- alias notext {
- ^assign $TXTDECODE OFF
- }
-
- alias yestext {
- ^assign $TXTDECODE ON
- }
-
- alias noold {
- ^assign $OLDDECODE OFF
- }
-
- alias yesold {
- ^assign $OLDDECODE ON
- }
-
- alias no2600 {
- ^assign $NEWDECODE OFF
- }
-
- alias yes2600 {
- ^assign $NEWDECODE ON
- }
-
- alias yesplcm {
- ^assign $PLCMDECODE ON
- }
-
- alias yesdlcm {
- ^assign $DLCMDECODE ON
- }
-
- alias nodis {
- ^assign $DISDECODE OFF
- }
-
- alias yesdis {
- ^assign $DISDECODE OFF
- }
-
- alias noven {
- ^assign $VENDECODE OFF
- }
-
- alias yesven {
- ^assign $VENDECODE OFF
- }
-
- # Help stuff
-
- alias sechelp {
- cecho +-------------------------------------------------------+
- eval cecho | #2600 elite Encryption Engine $cryptver by MegaFred |
- cecho +-------------------------------------------------------+
- cecho | /nitehelp - Info on NiGHT encryption/decryption |
- cecho | /texthelp - Info on TextBox encryption/decryption |
- cecho | /2600help - Info on New2600 encryption/decryption |
- cecho | /oldhelp - Info on Old2600 encryption/decryption |
- cecho | /lcmhelp - Info on LCM encryption/decryption |
- cecho | /misc - Info on misc. 2600crypt Commands |
- cecho | /disc - Send public DiSCUS coded message |
- cecho | /ven - Send public VENOM coded message |
- cecho +-------------------------------------------------------+
- }
-
- alias nitehelp {
- cecho +-------------------------------------------------------+
- eval cecho | #2600 elite Encryption Engine $cryptver by MegaFred |
- cecho +-------------------------------------------------------+
- cecho | NiGHT is an IRC script done by ReT and pyrm. Overall, |
- cecho | a somewhat mediocre script. Worst of it being it's |
- cecho | encryption scheme. All it uses is one call to encode |
- cecho | which is a pretty unsafe scheme. |
- cecho | |
- cecho | /nite [text] - Send coded [text] to channel |
- cecho | /pnite [nick] [text] - Send [text] to [nick] only |
- cecho | /nonite - Stop recieving NiGHT text |
- cecho | /yesnite - Resume recieving NiGHT text |
- cecho +-------------------------------------------------------+
- }
-
- alias texthelp {
- cecho +-------------------------------------------------------+
- eval cecho | #2600 elite Encryption Engine $cryptver by MegaFred |
- cecho +-------------------------------------------------------+
- cecho | TextBox is an IRC script that was done by CKeeper. At |
- cecho | its time, it was a good script. Its encryption scheme |
- cecho | is a bit mediocre, using one call to encode, but also |
- cecho | having two random chars that seemed to be a key. |
- cecho | |
- cecho | /text [text] - Send coded [text] to channel |
- cecho | /ptext [nick] [text] - Send [text] to [nick] only |
- cecho | /notext - Stop recieving TextBox text |
- cecho | /yestext - Resume recieving TextBox text |
- cecho +-------------------------------------------------------+
- }
-
- alias 2600help {
- cecho +-------------------------------------------------------+
- eval cecho | #2600 elite Encryption Engine $cryptver by MegaFred |
- cecho +-------------------------------------------------------+
- cecho | The 2600 encryption algorithm was my first attempt at |
- cecho | doing an encryption scheme. It's a very good scheme, |
- cecho | as it takes the text, encodes it, flips the encrypted |
- cecho | string, and encodes again. Inspired by LCM by SrFrog. |
- cecho | |
- cecho | /enc [text] - Send coded [text] to channel |
- cecho | /penc [nick] [text] - Send [text] to [nick] only |
- cecho | /no2600 - Stop recieving 2600 text |
- cecho | /yes2600 - Resume recieving 2600 text |
- cecho +-------------------------------------------------------+
- }
-
- alias oldhelp {
- cecho +-------------------------------------------------------+
- eval cecho | #2600 elite Encryption Engine $cryptver by MegaFred |
- cecho +-------------------------------------------------------+
- cecho | The old 2600 encryption scheme was zoro-a's first try |
- cecho | at doing an encryption algorithm. Not a bad scheme, |
- cecho | it uses 2 calls to encode, but at it's first release, |
- cecho | it didn't have any ctrl-codes in its trigger. |
- cecho | |
- cecho | /oenc [text] - Send coded [text] to channel |
- cecho | /openc [nick] [text] - Send [text] to [nick] only |
- cecho | /noold - Stop recieving Old2600 text |
- cecho | /yesold - Resume recieving Old2600 text |
- cecho +-------------------------------------------------------+
- }
-
- alias lcmhelp {
- cecho +-------------------------------------------------------+
- eval cecho | #2600 elite Encryption Engine $cryptver by MegaFred |
- cecho +-------------------------------------------------------+
- cecho | The LCM encryption scheme is probably the best one in |
- cecho | the scripting scene. It has two protocols to it, DEF |
- cecho | and POP. It works by sending a checksum before the |
- cecho | message itself. Does not have private message coding. |
- cecho | |
- cecho | /lcmp [text] - Send POP protocol [text] to channel |
- cecho | /lcmd [text] - Send DEF protocol [text] to channel |
- cecho | /nodlcm - Stop recieving DEF lcm text |
- cecho | /noplcm - Stop recieving POP lcm text |
- cecho | /yesdlcm - Resume recieving DEF lcm text |
- cecho | /yesplcm - Resume recieving POP lcm text |
- cecho +-------------------------------------------------------+
- }
-
- alias misc {
- cecho +-------------------------------------------------------+
- eval cecho | #2600 elite Encryption Engine $cryptver by MegaFred |
- cecho +-------------------------------------------------------+
- cecho | Here are some miscallaneous commands you can use with |
- cecho | this script. |
- cecho | |
- cecho | /cw - Turn encryption window on/off |
- cecho | /noenc - Turn off all auto-decryption |
- cecho | /yesenc - Turn on all auto-decryption |
- cecho | /pingenc [nick/chan] - Finds out if [nick] is running |
- cecho | 2600Crypt. (v2.2 or later) |
- cecho +-------------------------------------------------------+
- }
-
- # Stuff done when script is finished loading.
-
- if ([$openwin]==[0]) {cw}
-
- eval @oldmsg = [$oldenc($N has loaded 2600crypt $cryptver by MegaFred)]
- eval qsend $C [ENCRYPTED] $oldmsg
-
- eval cxecho 2600Crypt $cryptver by MegaFred Installed.
- eval cxecho Type /sechelp for help.
-
-
-