Bryan Drewery пре 23 година
родитељ
комит
236e7e58ce
5 измењених фајлова са 188 додато и 0 уклоњено
  1. 24 0
      scripts/BitchX/README
  2. 59 0
      scripts/BitchX/w.bx
  3. BIN
      scripts/mIRC/md5.dll
  4. 10 0
      scripts/mIRC/readme.txt
  5. 95 0
      scripts/mIRC/wraith.mrc

+ 24 - 0
scripts/BitchX/README

@@ -0,0 +1,24 @@
+wraith bx auth script 1.0
+
+This script is lame.
+
+It will improve over time to be as effecient as the mIRC script.
+
+
+Compile the md5 binary and place: $HOME/.BitchX/md5
+Edit the w.bx file and change the path near the top.
+
+To load: /load /path/to/w.bx
+
+You will have to /setauth pass secpass authkey, everytime you load the script, I will fix this in future versions.
+
+to auth over IRC:
+/msg bot auth?
+They will reply with "auth. botname"
+then:
+/msg bot auth yourpass
+then it will msg back that +Auth line, the script takes it from here.
+
+DCC chat is similar, enter pass, then +Auth is sent and script takes over.
+
+Send all improvements to bryan, thanks.

+ 59 - 0
scripts/BitchX/w.bx

@@ -0,0 +1,59 @@
+# wraith authorization script 1.0
+# By bryan
+#
+# This expects the md5 executable in $cspath/.BitchX
+# $botnick is the current nick of the bot.
+# You must /setauth 
+# If you chat a diff bot, you must do that command first.
+# $pass is the DEFPASS setting from your pack.cfg
+
+#change this to your homedir.
+assign wpath /home/admin/bryan
+
+#put the 'md5' binary in $HOME/.BitchX/md5 
+
+
+#        if ($2 == "") {
+#        }
+
+alias setauth {
+        if ([$2] == "") {
+          ^eval echo /setauth password secpass authkey <botnick>
+        }          
+        ^assign wpass $0
+        ^assign wsecpass $1
+        ^assign wauthkey $2
+        ^assign wbotnick $3
+}
+
+alias auth {
+        ^assign blah $1$wsecpass$wauthkey
+     
+        ^exec -name secauth $wpath/.BitchX/md5 "-s$blah"
+	^on ^exec "secauth *" {
+          ^eval echo +Auth $1
+        }
+
+}
+
+alias secauth {
+        ^assign blah $1$wsecpass$wauthkey
+        ^eval echo Returning hash to $0
+        ^exec -name secauth2 $wpath/.BitchX/md5 "-s$blah"
+
+	^on ^exec "secauth2 *" {
+           send +Auth $1
+        }
+}
+
+on ^dcc_chat "% -Auth *" {
+         query =$0
+         secauth $0 $2
+}
+
+on ^msg "% -Auth *" {
+         query $0
+         secauth $0 $2
+}
+
+^eval xecho -bwraith Authorization Module Loaded.

BIN
scripts/mIRC/md5.dll


+ 10 - 0
scripts/mIRC/readme.txt

@@ -0,0 +1,10 @@
+These two files need to be located in the same directory.
+ie: c:\mIRC\scripts
+once that is completed, /load -rs c:\path\to\files\wraith.mrc
+
+Currently the script supports 5.80 and up.
+
+type /helpauth once it is loaded.
+
+
+-bryan

+ 95 - 0
scripts/mIRC/wraith.mrc

@@ -0,0 +1,95 @@
+ON *:LOAD:{ echo -a Wraith authorization script, for mIRC 5.8 and up, by bryan loaded (MSG/DCC/Psybnc support). type /setauth }
+
+alias helpauth {
+  echo -a Type /setauth
+  echo -a /auth -Auth string <botnick> <- That will return the md5 hash. (use for telnet possibly)
+}
+
+alias setauth {
+  if (!$3) {
+    echo -a usage: /setauth password secpass authkey <botnick>
+    echo -a <botnick> is optional if the authkey specified is for that bot only...
+  }
+  else {
+    if ($4) {
+      set %w.pass. $+ $4 $1
+      set %w.secpass. $+ $4 $2
+      set %w.authkey. $+ $4 $3 
+    }
+    else {
+      set %w.pass $1
+      set %w.secpass $2
+      set %w.authkey $3
+    }
+    echo -a set!
+  }
+}
+
+ON *:CHAT:*:{
+  var %c = %auth. [ $+ [ $nick ] ]
+  if (($1 === -Auth || $1 === ÿû-Auth) && $len($2) == 50) {
+    msg =$nick +Auth $wmd5($2 $+ $wsecpass($3) $+ $wauthkey($3))
+  }
+}
+ON *:TEXT:auth*:?:{
+  var %c = %auth. [ $+ [ $nick ] ]
+  if (!$2) {
+    ;if this is a MSG not psybnc DCC, and we arent cleared to auth with them, IGNORE.
+    if ($left($nick,1) != $chr(40) && !%c) {
+      return
+    }
+    if ($right($1,1) == . && %c) {
+      msg $nick auth $wpass($iif($2,$2,$nick))
+    } 
+    elseif ($right($1,1) == ! && %c) {
+      msg $nick auth $wpass($iif($2,$2,$nick)) %myuser
+    }
+  }
+}
+ON *:TEXT:*:?:{ 
+  var %c = %auth. [ $+ [ $nick ] ]
+  if ($left($nick,1) != $chr(40) && !%c) { return }
+  if (($1 === -Auth || $1 === ÿû-Auth) && $len($2) == 50) {
+    msg $nick +Auth $wmd5($2 $+ $wsecpass($3) $+ $wauthkey($3))
+  }
+}
+ALIAS -l wraith {
+  if ($eval(% $+ $1 $+ . $+ $2,2)) {
+    return $ifmatch
+  }
+  else {
+    return $eval(% $+ $1,2)
+  }
+}
+
+alias -l wauthkey { return $wraith(w.authkey,$1) }
+alias -l wpass { return $wraith(w.pass,$1) }
+alias -l wsecpass { return $wraith(w.secpass,$1) }
+
+alias -l wmd5 {
+  if ($version < 5.8) {
+    echo 8 -a This script will only work for mIRC 5.8 and up.
+  }
+  if ($version >= 6.03) {
+    return $md5($1)
+  } 
+  else {
+    if (!$exists($nofile($script) $+ /md5.dll)) { 
+      echo 4 -a You need to place md5.dll in $nofile($script) for this to work.
+      halt
+    }
+    return $dll($nofile($script) $+ /md5.dll,md5,$1)
+  }
+}
+
+ALIAS auth { 
+  if ($1 != -Auth || !$2) { echo 8 -a Usage: /auth -Auth string botname | echo 8 -a botname is optional. }
+  else {
+    echo +Auth $md5($2 $+ $wsecpass($3) $+ $wauthkey($3))
+  }
+}
+ALIAS msg { 
+  if ($1 !ischan && $2 === auth? && $left($1,1) != $chr(40)) { set -u30 %auth. $+ $1 1 }
+  msg $1-
+}
+ON *:INPUT:?:{ if ($1 === auth? && $left($target,1) != $chr(40)) { set -u30 %auth. $+ $target 1 } }