Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 21st, 2012  |  syntax: mIRC  |  size: 25.34 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ;; thanks sky for the new server + some of his auth codes
  2. ;;  thanks eXonyte for  your binary sockread auth thanks!
  3. alias findsip return 209.222.27.63
  4. alias findsprt return 6667
  5. alias -l IRCV  return IRCVERS IRC9 IRC7!
  6. alias -l AUTHINIT { return $+(AUTH GateKeeper, $iif( $left( $me, 1 ) != >, Passport, $chr(32) ) I GKSSP\0\0\0, $chr(3), \0\0\0, $chr(1), \0\0\0) }
  7. alias -l passform return $+($base($len(%ticket),10,16,8),%ticket,$base($len(%profile),10,16,8),%profile)
  8. alias m.gate.random {
  9.   var %a = 1,%b
  10.   while (%a <= 90) { %b = %b $+ $rand(a,z)  | inc %a }
  11.   return %b
  12. }
  13.  
  14. alias rkey return $+($r(1,9),$r(a,z),$r(1,9),$r(a,z))
  15. alias connex return IRCX
  16. alias Con {
  17.   CloseDirectory
  18.   CloseChatSocks
  19.   OpenmIRCConnection
  20.   Connect2Directory $findsip $findsprt
  21. }
  22. alias -l Connect2Directory {
  23.   sockopen fx.finds $1-2
  24.   sockmark fx.finds null
  25. }
  26. alias -l Connect2Chat {
  27.   var %sNc $+(fx.Chats_,$r(1111,9999),$r(a,z))
  28.   sockopen %sNc $1-2
  29.   sockmark %sNc $3
  30.   set %onjointime. [ $+ [ $3 ] ] $ticks
  31. }
  32. alias -l OpenmIRCConnection {
  33.   var %mp $r(1300,8000)
  34.   while (!$portfree(%mp)) { var %mp $r(1300,8000) }
  35.   socklisten start %mp
  36.   server 127.0.0.1 %mp
  37. }
  38. alias -l WriteDebug {
  39.   if ($!window(@debug)) {
  40.     window -e0 @debug
  41.   }
  42.   echo @debug $1-
  43. }
  44. alias -l CloseDirectory {
  45.   sockclose fx.finds
  46. }
  47.  
  48. alias -l CloseChatSocks {
  49.   var %snL 1
  50.   while (%snL <= $sock(fx.Chats_*,0)) {
  51.     var %snCs  $sock(fx.Chats_*,%snL)
  52.     sockclose %snCs
  53.     inc %snL
  54.   }
  55. }
  56. alias -l getChatSock {
  57.   var %snC $1
  58.   var %snL 1
  59.   while (%snL <= $sock(fx.Chats_*,0)) {
  60.     var %snCs  $sock(fx.Chats_*,%snL)
  61.     if ($sock(%snCs).mark == $1) { return %snCs }
  62.     inc %snL
  63.   }
  64. }
  65. alias -l CreateCloneSocks {
  66.   var %snL 1
  67.   while (%snL <= $sock(fx.Chats_*,0)) {
  68.     var %snCs $sock(fx.Chats_*,%snL)
  69.     sockopen $+(fx.Clone_,$gettok(%snCs,2,$asc(_))) $sock(%snCs).ip $sock(%snCs).port
  70.     sockmark $+(fx.Clone_,$gettok(%snCs,2,$asc(_))) $1 $sock(%snCs).mark
  71.     inc %snL 1
  72.   }
  73.   set %CloneSockList $sock(fx.Chats_*,0)
  74. }
  75. alias -l CloneSocksJoin {
  76.   var %snL $sock(fx.Clone_*,0)
  77.   while ($sock(fx.Clone_*,%snL) != 0) {
  78.     var %snCs $sock(fx.Clone_*,%snL)
  79.     var %snCm $sock(%snCs).mark
  80.     send2mirc $+(:,$me,!) PART $gettok(%snCm,2,32)
  81.     sockclose $replace(%snCs,Clone,Chats)
  82.     sockrename %snCs $replace(%snCs,Clone,Chats)
  83.     sockwrite -n $replace(%snCs,Clone,Chats) JOIN $gettok(%snCm,2,32)
  84.     sockmark $replace(%snCs,Clone,Chats) $gettok(%snCm,2,32)
  85.     dec %snL
  86.   }
  87. }  
  88. alias -l Send2mIRC {
  89.   sockwrite -n fx.lhost $1-
  90. }
  91. alias -l Send2ChatServers {
  92.   var %snL 1
  93.   while (%snL <= $sock(fx.Chats_*,0)) {
  94.     var %snCs  $sock(fx.Chats_*,%snL)
  95.     sockwrite -n %snCS $1-
  96.     inc %snL
  97.   }
  98. }
  99. alias -l Send2Directory {
  100.   var %snC fx.finds
  101.   if ($sock(%snC)) {
  102.     sockwrite -n %snC $replace($1,JOIN,FINDS) $2-
  103.     sockmark %snC $2
  104.   }
  105.   else {
  106.     sockopen %snC $findsip $findsprt
  107.     sockmark %snC $1-
  108.   }
  109. }
  110. ;fx.Clone_0001s
  111. ;fx.Chats_0001s
  112. ;fx.Finds
  113. ;fx.lhost
  114. on *:sockopen:fx.?????*:{
  115.   var %snCs $gettoK($gettok($sockname,2,$asc(.)),1,$asc(_))
  116.   if (%snCs == finds) {
  117.     .timerKeepFinds 0 8 sockwrite -n $+(fx.,%snCs) $crlf
  118.     sockwrite -n $sockname $+( NICK $me,$crlf,$AUTHINIT,$crlf,$IRCV)
  119.     ;sockwrite -n $sockname $authinit
  120.   }
  121.   elseif (%snCs == Chats) {
  122.     sockwrite -n $sockname $+( NICK $me,$crlf,$AUTHINIT,$crlf,$IRCV)
  123.   }
  124.   elseif (%snCs == Clone) {
  125.     sockwrite -n $sockname $+( NICK $gettok($sock($sockname).mark,1,32),$crlf,$AUTHINIT,$crlf,$IRCV)
  126.   }  
  127. }
  128.  
  129. on *:Sockread:fx.?????*:{
  130.   var %snCs $gettoK($gettok($sockname,2,$asc(.)),1,$asc(_)) | .var %read | .sockread %read | .tokenize 32 %read
  131.   WriteDebug $sockname :: %read
  132.   if (%snCs == finds) {
  133.     if ($1 == AUTH) {
  134.       if ($3 == S) && ($4 != :OK) {    
  135.         var %x, %re = AUTH GateKeeper.* S :GKSSP\\0.*\\0\\0.*\\0\\0(.*), %y = $regsub($1-,%re,,%x)
  136.         echo -s $sky.tobin($1-3 $+(:GKSSP\0\0\0,$chr(2),\0\0\0,$chr(3),\0\0\0) $+ $msnx.hash($regml(1) $+ $sock($sockname).ip) $+ $crlf)
  137.         bset &authout 1 $sky.tobin($1-3 $+(:GKSSP\0\0\0,$chr(2),\0\0\0,$chr(3),\0\0\0) $+ $msnx.hash($regml(1) $+ $sock($sockname).ip) $+ $crlf)
  138.         sockwrite -n $sockname &authout
  139.  
  140.       }
  141.       elseif (($3 == S) && ($4 == :OK)) { sockwrite -n $sockname AUTH GateKeeperPassport S $+(:,$passform) $lf user * * * $connex }
  142.     }
  143.     elseif ($2 == 613) {
  144.       echo -s $remove($4,:) $5 $sock($sockname).mark
  145.       Connect2Chat $remove($4,:) $5 $sock($sockname).mark
  146.     }
  147.     elseif ($2 == 702) {
  148.       %key = $r(1,999)
  149.       sockwrite -n $sockname CREATE CP $sock($sockname).mark H4X l $+ 1337 en-us %key 0
  150.     }
  151.     ; else { sockwrite -n fx.lhost $1- }
  152.   }
  153.   elseif (%snCs == Chats) {
  154.     if ($1 == AUTH) {
  155.       if ($3 == S) && ($4 != :OK) {    
  156.         var %x, %re = AUTH GateKeeper.* S :GKSSP\\0.*\\0\\0.*\\0\\0(.*), %y = $regsub($1-,%re,,%x)
  157.         bset &authout 1 $sky.tobin($1-3 $+(:GKSSP\0\0\0,$chr(2),\0\0\0,$chr(3),\0\0\0) $+ $msnx.hash($regml(1) $+ $sock($sockname).ip) $+ $crlf)
  158.         sockwrite -n $sockname &authout
  159.  
  160.       }
  161.       elseif (($3 == S) && ($4 == :OK)) { sockwrite -n $sockname AUTH GateKeeperPassport S $+(:,$passform) $lf user * * * $connex $lf JOIN $sock($sockname).mark  }
  162.       elseif ($3 == *) {
  163.         sockwrite -n $sockname user * * * $connex $lf JOIN $sock($sockname).mark
  164.       }
  165.     }
  166.     elseif ($2 == 910) { echo -s authentication failed | var %x.sn $sockname | var %x.sip $sock($sockname).ip | var %x.sprt $sock($sockname).port | var %x.smrk $sock($sockname).mark | sockclose $sockname | sockopen %x.sn %x.sip %x.sprt | sockmark %x.sn %x.smrtk }
  167.     elseif ($2 == JOIN) {
  168.       sockwrite -n fx.lhost $deltok($1-,3,32)
  169.       if ($right($3,1) isin .@+) { sockwrite -tn fx.lhost :IRC7 MODE $remove($4,:) + $+ $replace($ifmatch,.,q,@,o,+,v) $remove($gettok($1,1,$asc(!)),:)  }
  170.     }
  171.     elseif ($2 == MODE) {
  172.       sockwrite -n fx.lhost $1-
  173.       if ($4-5 == -q $me) {
  174.         if ($remove($gettok($1,1,33),:) != $me) {
  175.           if (!%no-q. [ $+ [ $3 ] ]) {
  176.             set -u3 %no-q. [ $+ [ $3 ] ] $true
  177.             sockwrite -n $sockname mode $me +h $hget(keys,$3) $lf mode $3 -q $right($gettok($1,1,33),-1) $lf prop $3 ownerkey $msn.pass(10) $lf access $3 clear owner $lf access $3 add owner $ial($me).addr
  178.           }
  179.         }
  180.       }
  181.       elseif ($4-5 == +q $me) {
  182.         if (!%noq. [ $+ [ $3 ] ]) {
  183.           set -u3 %noq. [ $+ [ $3 ] ] $true
  184.           sockwrite -n $sockname PROP $3 ownerkey $msn.pass(10) $lf access $3 add owner $ial($me).addr
  185.         }
  186.       }
  187.     }
  188.     elseif ($2 == PROP) {
  189.       sockwrite -n fx.lhost $1-
  190.       if ($4 == OWNERKEY) {
  191.         if ($remove($5,:) == $null) {
  192.           if ($remove($gettok($1,1,33),:) != $me) {
  193.             sockwrite -tn $sockname mode $3 -q $right($gettok($1,1,33),-1) $lf prop $3 ownerkey $msn.pass(10) $lf access $3 clear owner $lf access $3 add owner $ial($me).addr
  194.           }
  195.         }
  196.         else { hadd keys $3 $remove($5,:) | hsave -o keys $qt($scriptdirkeys.dat) }
  197.       }
  198.     }
  199.     elseif ($1 == PING) { sockwrite -tn $sockname PONG $2 |  sockwrite -n fx.lhost $1- }
  200.     elseif ($2 == 403) { sockclose $sockname }
  201.     elseif ($2 == 004) { sockwrite -n fx.lhost $1- $lf :TK2CHATCHATA01 005 $me IRCX NAMESX CHANTYPES=% PREFIX=(qov).@+ CHANMODES=b,k,l,defhimnprstuwWx NETWORK=IRC7 CHARSET=utf-8 are supported by this server }
  202.     elseif ($2 = 353) { var %x = 5, %y | while (%x < $numtok($1-,32)) { inc %x  | %y = %y $gettok($gettok($1-,%x,32),-1,44) } | sockwrite -n fx.lhost $1-5 : $+ %y | halt }
  203.  
  204.     else {
  205.       sockwrite -n fx.lhost $1-
  206.     }
  207.   }
  208.   elseif (%snCs == Clone) {
  209.     if ($1 == AUTH) {
  210.       if ($3 == S) && ($4 != :OK) {    
  211.         var %x, %re = AUTH GateKeeper.* S :GKSSP\\0.*\\0\\0.*\\0\\0(.*), %y = $regsub($1-,%re,,%x)
  212.         bset &authout 1 $sky.tobin($1-3 $+(:GKSSP\0\0\0,$chr(2),\0\0\0,$chr(3),\0\0\0) $+ $msnx.hash($regml(1) $+ $sock($sockname).ip) $+ $crlf)
  213.         sockwrite -n $sockname &authout
  214.  
  215.       }
  216.       elseif (($3 == S) && ($4 == :OK)) {
  217.         sockwrite -n $sockname AUTH GateKeeperPassport S $+(:,$passform) $lf user * * * $connex
  218.         if (%CloneSocklist > 1) {  dec %CloneSocklist    }
  219.  
  220.         else {
  221.           unset %CloneSocklist
  222.           Send2mIRC $+(:,$me) NICK $gettok($sock($sockname).mark,1,32)
  223.           CloneSocksJoin
  224.         }
  225.       }
  226.     }
  227.     elseif (910 == $2) { echo -s authentication failed | var %x.sn $sockname | var %x.sip $sock($sockname).ip | var %x.sprt $sock($sockname).port | var %x.smrk $sock($sockname).mark | sockclose $sockname | sockopen %x.sn %x.sip %x.sprt | sockmark %x.sn %x.smrk }
  228.   }
  229.   elseif (%snCs == lhost) {
  230.     if ($1 == JOIN) {
  231.       if ($getChatSock($2)) { sockwrite -n $getChatSock($2) $1-   }
  232.       else {
  233.         Send2Directory $1-2
  234.       }
  235.     }
  236.     elseif ($1 == PRIVMSG) {
  237.       if ($getChatSock($2)) {
  238.         sockwrite -n $getChatSock($2) $1-
  239.       }
  240.       else {
  241.         sockwrite -n $getChatSock($comchan($2,1)) $1-
  242.       }
  243.     }
  244.     elseif ($1 == MODE) {
  245.       if ($getChatSock($2))  {
  246.         sockwrite -n $getChatSock($2) $1-
  247.       }
  248.       else {
  249.         Send2ChatServers $1-
  250.       }
  251.     }
  252.     elseif ($1 == findu) {
  253.       Send2Directory $1-2
  254.     }    
  255.     elseif ($1 == nick) && ($comchan($me,1)) {
  256.       Send2ChatServers NICK $2
  257.     }
  258.     elseif ($1 == WHO) {
  259.       if (* == $2) {
  260.         Send2ChatServers $1-
  261.       }
  262.       else { sockwrite -n $getChatSock($2) $1- }
  263.     }
  264.     elseif ($1 == PING) {  
  265.       Send2ChatServers $1-
  266.     }
  267.     elseif ($1 == CLONE) { CreateCloneSocks $2 }
  268.     elseif ($getChatSock($2))  {
  269.       sockwrite -n $getChatSock($2) $1-
  270.     }
  271.     elseif ($getChatSock($comchan($2,1))) {
  272.       sockwrite -n $getChatSock($comchan($2,1)) $1-
  273.     }
  274.     else {
  275.       Send2ChatServers $1-
  276.     }
  277.   }
  278. }
  279. on *:socklisten:start: {
  280.   sockaccept fx.lhost
  281.   send2mirc :IRCX 001 $me :Welcome to the $connex connection.
  282.   send2mirc :IRCX 004 $me : $+ $connex aiox abcdefhiklmnoprstuvxy
  283.   send2mirc :IRCX 800 $me 1 0 GateKeeper,NTLM 512 *
  284.   sockclose $sockname
  285. }
  286. on 1:LOAD:{
  287.   CreateSettings emails
  288.   CreateSettings ConnectionSettings
  289.   CreateSettings CloneSettings
  290.   CreateSettings RoomCreationSettings
  291.   CreateSettings ownerkeys
  292.   CreateSettings Hostkeys
  293.   SetSetting ConnectionSettings Debug 1
  294.   SetSetting ConnectionSettings Invisible 1
  295.   SetSetting ConnectionSettings AutoJoin 0
  296.   SetSetting CloneSettings QuitMessage 0
  297.   SetSetting RoomCreationSettings RoomModes wWtns
  298.   SetSetting RoomCreationSettings Limit 31337
  299.   SetSetting RoomCreationSettings Key Generate
  300.   SetSetting RoomCreationSettings CustomKey CustomKey
  301. }
  302.  
  303. on 1:START:{
  304.   LoadSettings emails
  305.   LoadSettings ConnectionSettings
  306.   LoadSettings CloneSettings
  307.   LoadSettings RoomCreationSettings
  308.   LoadSettings ownerkeys
  309.   LoadSettings Hostkeys
  310. }
  311. alias CreateSettings {
  312.   if (!$hget($1)) {
  313.     hmake $1 100
  314.   }
  315. }
  316. alias LoadSettings {
  317.   if (!$hget($1)) {
  318.     hmake $1 100
  319.   }
  320.   hload -i $1 $+($scriptdir,settings.ini) $1
  321. }
  322. alias UnLoadSettings {
  323.   hsave -i $1 $+($scriptdir,settings.ini) $1
  324.   hfree $1
  325. }
  326. alias SetSetting { hadd -m $1 $2- }
  327. on 1:EXIT:{
  328.   UnLoadSettings emails
  329.   UnLoadSettings ConnectionSettings
  330.   UnLoadSettings CloneSettings
  331.   UnLoadSettings RoomCreationSettings
  332.   UnLoadSettings ownerkeys
  333.   UnLoadSettings Hostkeys
  334. }
  335. ;hsave -i emails $+($scriptdir,settings.ini) emails
  336. alias loademails {
  337.   if ($1 == -d) {
  338.     did -r FXDialog 57
  339.     if ($hget(emails,0).item > 0) {
  340.       var %x $hget(emails,0).item
  341.       while (%x) {
  342.         did -a FXDialog 57 $hget(emails,%x).item
  343.         dec %x
  344.       }
  345.     }
  346.   }
  347. }
  348. alias OpenFXDialog { dialog -m FXDialog FXDialog }
  349. alias loadSettings2Dialog {
  350.   loademails -d
  351.   if ($hget(ConnectionSettings,Invisible) == 1) { did -c FXDialog 16 }
  352.   if ($hget(ConnectionSettings,Debug) == 1) { did -c FXDialog 18 }
  353.   if ($hget(ConnectionSettings,AutoJoin) == 1) { did -c FXDialog 15 }
  354.   if (%Fx.AutoJoin) { did -r FXDialog 17 | did -a FXDialog 17 %Fx.AutoJoin }
  355.   if ($hget(CloneSettings,QuitMessage) == 1) { did -c FXDialog 26 }
  356.   if (%FX.CloneQuit) { did -r FXDialog 27 | did -a FXDialog 27 %Fx.CloneQuit }
  357.   if ($hget(RoomCreationSettings,Key) == Generate) { did -c FXDialog 51 | did -r FXDialog 49 | did -a FXDialog 49 $rkey }
  358.   if ($hget(RoomCreationSettings,Key) == CustomKey) { did -c FXDialog 52 | did -r FXDialog 49 | did -a FXDialog 49 $iif(%Fx.Qkey,%Fx.Qkey,CustomKey) }
  359.   if ($hget(RoomCreationSettings,RoomModes)) {
  360.     if (w isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 38 }
  361.     if (W isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 39 }
  362.     if (t isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 46 }
  363.     if (m isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 40 }
  364.     if (i isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 41 }
  365.     if (n isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 45 }
  366.     if (h isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 43 }
  367.     if (p isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 42 }
  368.     if (s isincs $hget(RoomCreationSettings,RoomModes)) { did -c FXDialog 44 }
  369.   }
  370.   if ($hget(RoomCreationSettings,Limit)) { did -r FXDialog 37 | did -a FXDialog 37 $hget(RoomCreationSettings,Limit) }
  371.   if (%settings.CreateTopic) { did -r FXDialog 32 | did -a FXDialog 32 %settings.CreateTopic }
  372.   did -r fxDialog 21 | did -a fxDialog 21 $me
  373.   did -r fxDialog 58 | did -a fxDialog 58 $me
  374.   did -r fxDialog 47 | did -a fxDialog 47 $+(+,$iif($hget(RoomCreationSettings,RoomModes),$hget(RoomCreationSettings,RoomModes)),l) $iif($hget(RoomCreationSettings,Limit),$hget(RoomCreationSettings,Limit),$did(fxDialog,37))
  375. }
  376. on 1:dialog:FXDialog:init:0: {
  377.   loadSettings2Dialog
  378. }
  379.  
  380. on 1:dialog:FXDialog:sclick:*: {
  381.   if ($did == 5) { dialog -c FxDialog FxDialog }
  382.   elseif ($did == 4) { dialog -c FxDialog FxDialog }
  383.   elseif ($did == 24) {
  384.     if ($did(FXDialog,22)) { clone $did(FXDialog,22) }
  385.   }
  386.   elseif ($did == 42) { did -u FXDialog 43 | did -u FXDialog 44 }
  387.   elseif ($did == 43) { did -u FXDialog 42 | did -u FXDialog 44 }
  388.   elseif ($did == 44) { did -u FXDIalog 42 | did -u FXDialog 43 }
  389.   elseif ($did == 51) { did -r FXDialog 49 | did -a FXDialog 49 $rkey }
  390.   elseif ($did == 52) { did -r FXDialog 49 | did -a FXDialog 49 CustomKeyHere }
  391.   elseif ($did == 69) {
  392.     SetSetting emails $did(FXDialog,57) $did(FXDialog,11)  
  393.     echo -s $input("Successfully Added email $did(FXDialog,57) $+ ",o)
  394.   }
  395.   elseif ($did == 57) { did -r FXDialog 11 | did -a FXDialog 11 $hget(emails,$did(fxDialog,57).seltext) }
  396. }
  397.  
  398. dialog FXDialog {
  399.   title "fx Connection Dialog"
  400.   size -1 -1 438 134
  401.   option dbu
  402.   button "Close", 5, 350 118 37 12
  403.   button "Save && Close", 4, 309 118 39 12
  404.   tab "Connect", 6, 2 5 434 105
  405.   box "Update Email", 7, 1 22 151 81, tab 6
  406.   text "Email", 9, 3 36 28 8, tab 6 center
  407.   box "Connection Options", 13, 152 22 170 81, tab 6
  408.   button "Connect", 14, 271 85 44 12, tab 6
  409.   check "Invisible (+i)", 16, 157 57 43 10, tab 6 flat
  410.   edit "", 11, 31 55 117 10, tab 6 pass
  411.   text "password", 10, 3 55 28 8, tab 6 center
  412.   button "Update", 12, 116 69 32 14, tab 6
  413.   check "Auto Join", 15, 157 74 36 10, tab 6 flat
  414.   edit "%#test,%#lobby", 17, 198 74 119 10, tab 6
  415.   check "@debug", 18, 206 58 36 10, tab 6 flat
  416.   combo 57, 31 34 117 32, tab 6 size edit drop
  417.   text "Nick", 31, 157 44 37 7, tab 6 center
  418.   edit "", 58, 197 44 118 10, tab 6
  419.   button "Add email", 69, 77 69 37 14, tab 6
  420.   tab "Clone Settings", 3
  421.   box "Nick Changes", 19, 7 24 134 81, tab 3
  422.   text "Nick", 20, 15 34 25 10, tab 3 center
  423.   edit "", 21, 44 34 90 10, tab 3 read
  424.   edit "", 22, 44 49 89 10, tab 3
  425.   button "Clone Hop", 24, 94 67 37 12, tab 3
  426.   box "Settings", 25, 144 24 241 39, tab 3
  427.   check "Quit Message", 26, 149 37 50 10, tab 3 flat
  428.   text "Clone", 23, 15 48 25 10, tab 3 center
  429.   box "Data", 53, 144 65 241 41, tab 3
  430.   list 54, 180 73 197 27, tab 3 size vsbar
  431.   combo 8, 198 37 141 25, tab 3 size edit drop
  432.   button "Save Quit Msg", 70, 345 36 37 12, tab 3
  433.   tab "Room Creation", 28
  434.   box "Create a Room", 29, 6 21 199 81, tab 28
  435.   text "Room Name", 30, 12 32 40 11, tab 28 center
  436.   edit "A place 2 Chat.", 32, 62 47 134 10, tab 28
  437.   box "Room Modes", 34, 207 21 221 81, tab 28
  438.   button "Create", 35, 161 86 37 13, tab 28
  439.   text "+l (Limit)", 36, 222 73 27 9, tab 28 center
  440.   edit "1337", 37, 253 73 33 10, tab 28
  441.   check "+w (no Whispers)", 38, 215 32 62 10, tab 28 flat
  442.   text "Topic", 33, 12 47 40 11, tab 28 center
  443.   check "+W (no Guest Whispers)", 39, 276 32 71 10, tab 28 flat
  444.   check "+m (moderate)", 40, 215 44 50 10, tab 28 flat
  445.   check "+i invite only", 41, 276 44 50 10, tab 28 flat
  446.   check "+p (Private Room)", 42, 276 56 58 10, tab 28 flat
  447.   check "+h (Hidden Room)", 43, 215 56 55 10, tab 28 flat
  448.   check "+s (Secret Room)", 44, 354 57 54 10, tab 28 flat
  449.   check "+n (No external)", 45, 354 45 54 10, tab 28 flat
  450.   check "+t (topic Lock)", 46, 354 32 50 10, tab 28 flat
  451.   edit "", 47, 333 73 73 10, disable tab 28
  452.   text "Modes Set", 48, 298 73 32 8, tab 28 center
  453.   edit "", 49, 62 62 134 10, tab 28
  454.   text "OwnerKey", 50, 12 62 40 11, tab 28 center
  455.   radio "Generate Key", 51, 62 76 50 10, tab 28
  456.   radio "Custom Key", 52, 116 76 50 10, tab 28
  457.   button "Save Settings", 71, 121 87 37 12, tab 28
  458.   edit "", 27, 62 32 134 10, tab 28
  459.   tab "Chatroom Settings", 55
  460.   box "Chatroom Properties", 56, 4 23 429 84, tab 55
  461.   combo 59, 41 35 138 27, tab 55 size edit drop
  462.   text "Chatroom", 60, 10 35 28 8, tab 55 center
  463.   list 61, 247 49 176 50, tab 55 size vsbar
  464.   check "enable Aop", 62, 41 49 38 10, tab 55 flat
  465.   check "Deowner/Dehost", 64, 85 63 56 10, tab 55 flat
  466.   check "Add Access", 65, 41 63 40 10, tab 55 flat
  467.   check "Access Prot", 66, 146 78 44 10, tab 55 flat
  468.   check "-q Prot", 67, 85 78 50 10, tab 55 flat
  469.   check "enable Banlist", 63, 85 49 46 10, tab 55 flat
  470.   check "Kick Prot", 68, 41 78 39 10, tab 55 flat
  471.   button "Save Settings", 72, 183 35 40 12, tab 55
  472.   menu "Menu", 1
  473.   item "Item2", 2, 1
  474. }
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484. ## EXO & SKY'S AUTHENTICATION STUFF
  485. alias neko.hash {
  486.   if (*:GKSSP* iswm $1-) { var %x, %re = .*:GKSSP\\0.*\\0\\0.*\\0\\0(.*), %y = $regsub($1-,%re,,%x) | tokenize 32 $regml(1) }
  487.   var %m
  488.   bset &h1 1 101 100 112 123 125 101 124 119 120 114 100 115 101 125 125 117 $str(54 $+ $chr(32),48) $esc2dec($neko.chr2dec($1-))
  489.   bset &h2 1 15 14 26 17 23 15 22 29 18 24 14 25 15 23 23 31 $str(92 $+ $chr(32),48) $neko.hex2bin($md5(&h1,1))
  490.   return $neko.hex2chr($neko.hex2esc($md5(&h2,1)))
  491. }
  492. alias neko.chr2dec return $regsubex($1,/(.{1})/g,$asc(\1) $+ $chr(32))
  493. alias neko.hex2chr return $regsubex($1,/([0-9A-Fa-f]{2})/g,$chr($base(\1,16,10)))
  494. alias neko.hex2bin return $regsubex($1,/([0-9A-Fa-f]{2})/g,$base(\1,16,10) $+ $chr(32))
  495. alias neko.hex2esc return $regsubex($1,/([0-9A-Fa-f]{2})/g,$hex2esc(\1))
  496. alias hex2esc return $replacex($1,5C,5C5C,00,5C30,0A,5C6E,0D,5C72,2C,5C63,09,5C74,20,5C62)
  497. alias esc2dec return $replacex($1,92 48, 0, 92 116, 9, 92 110, 10, 92 114, 13, 92 98, 32, 92 99, 44, 92 92, 92)
  498. ;elseif ($4 != :OK) sockwrite $sockname $+($hget(GKSSP,AUTHS),$GKSSP($4,$sock($sockname).ip).challenge,$SelectGateKeeper,$lf)
  499. alias gkssp_form {
  500.   var %output,%hex,%x = $1,%i = 1
  501.   ;seq=7,5,3,1,11,9,15,13,17
  502.   if ($len($1) < 32) { %x = $+($str(0,$calc(32 - $len($ifmatch)),$ifmatch) }
  503.   %x = $mid(%x,7,2) $+ $mid(%x,5,2) $+ $mid(%x,3,2) $+ $mid(%x,1,2) $+ $mid(%x,11,2) $+ $mid(%x,9,2) $+ $mid(%x,15,2) $+ $mid(%x,13,2) $+ $right(%x,-16)
  504.   return $__tochr($__hexbin(%x,NULL))
  505. }
  506. alias __tochr {
  507.   var %o,%i = 1
  508.   while (%i <= $numtok($1-,32)) {
  509.     %o = %o $+ $chr($gettok($1-,%i,32))
  510.     inc %i
  511.   }
  512.   return %o
  513. }
  514. alias __hexbin {
  515.   var %o,%i = 1,%hex,%switch
  516.   if (!$2) {
  517.     ;Excluding Escape Char
  518.     while (%i <= $len($1)) {
  519.       %o = %o $base($mid($1,%i,2),16,10)
  520.       inc %i 2
  521.     }
  522.     return %o
  523.   }
  524.   else {
  525.     ;Including Escaps Char (0=00,t=09,n=0A,r=0D,b=20,c=2C,\=5C)
  526.     while (%i <= $len($1)) {
  527.       %switch = $mid($1,%i,2)
  528.       if (%switch == 00) { %o = %o 92 48 }
  529.       elseif (%switch == 09) { %o = %o 92 116 }
  530.       elseif (%switch == 0A) { %o = %o 92 110 }
  531.       elseif (%switch == 0D) { %o = %o 92 114 }
  532.       elseif (%switch == 20) { %o = %o 92 98 }
  533.       elseif (%switch == 2C) { %o = %o 92 99 }
  534.       elseif (%switch == 5C) { %o = %o 92 92 }
  535.       else { %o = %o $base(%switch,16,10) }
  536.       inc %i 2
  537.     }
  538.     return %o
  539.   }
  540. }
  541.  
  542. alias SelectGateKeeper { return $gkssp_form($iif(%GATEKEEPER,$ifmatch,$binary_gate)) }
  543.  
  544.  
  545. alias binary_gate {
  546.   var %i = 1, %o
  547.   while (%i <= 16) {
  548.     %o = %o $+ $base($rand(0,3),10,2,2)
  549.     inc %i
  550.   }
  551.   return %o
  552. }
  553. alias hex_gate {
  554.   var %i = 1, %o
  555.   while (%i <= 16) {
  556.     %o = %o $+ $base($rand(0,255),10,16,2)
  557.     inc %i
  558.   }
  559.   return %o
  560. }
  561. ####EXO####
  562. alias sky.tobin { return $regsubex($1-,/(*UTF8)(.)/g,$asc(\1) $+ $chr(32)) }
  563. alias msnx.hex2bin { return $regsubex($1,/([0-9A-Fa-f]{2})/g,$base(\1,16,10) $+ $chr(32)) }
  564. alias msnx.tobin { return $regsubex($1,/(*UTF8)(\\?.)/g,$iif(\* iswm \1,$replacex(\1,\ $+ 0,0,\ $+ t,9,\ $+ n,10,\ $+ r,13,\ $+ b,32,\ $+ c,44,\ $+ \,92),$asc(\1)) $+ $chr(32)) }
  565. alias msnx.hash { bset &h1 1 101 100 112 123 125 101 124 119 120 114 100 115 101 125 125 117 $str(54 $+ $chr(32),48) $msnx.tobin($1-) | bset &h2 1 15 14 26 17 23 15 22 29 18 24 14 25 15 23 23 31 $str(92 $+ $chr(32),48) $msnx.hex2bin($md5(&h1,1)) | return $msnx.unehex($md5(&h2,1)) }
  566. alias msnx.unehex { return $regsubex($1, /(..)/g, $iif((\1 isin 00 09 0A 0D 20 2C 5C),\ $+ $replace(\1, 00, 0, 09, t, 0A, n, 0D, r, 20, b, 2C, c, 5C, \),$chr($base(\1, 16, 10)))) }
  567.  
  568. alias msn.gatekey return $mid($1,7,2) $+ $mid($1,5,2) $+ $mid($1,3,2) $+ $left($1,2) $+ $mid($1,11,2) $+ $mid($1,9,2) $+ $mid($1,15,2) $+ $mid($1,13,2) $+ $right($1,16)
  569.  
  570. ###EXO END###
  571.  
  572. ##### LUKES PASSPORT UPDATER #######
  573. ##### EVERYONE THANK LUKE ######
  574. alias ud>File return "Logs\Update.ini"
  575.  
  576. alias sPre return $+($$1,>,$r(A,Z),$r(1,9999))
  577. alias ud var %s = $sPre(UD>S1) | sockopen %s login.live.com 80 | sockmark %s $$1 $$2
  578. alias bF return $bfind($$1,1,$$2)
  579. on *:SOCKOPEN:UD>*:{
  580.   var %s = $sockname, %sm = $sock(%s).mark, %stg = $gettok(%s,2,62), %sw = sockwrite -n %s | tokenize 32 %sm
  581.   echo -a %stg - %sm
  582.   if (%stg == S1) { %sw GET /wlogin.srf?appid=000000004C04B301&alg=wsignin1.0 $+(HTTP/1.1,$crlf,Host: login.live.com,$crlf,User-Agent: root,$crlf,Cookie: MUID=DFD2582018CB460B91F4707517868FF8,$crlf,$crlf) }
  583.   if (%stg == S2) { var %str = login= $+ $replace($1,@,$chr(37) $+ 40) $+ &passwd= $+ $2 $+ &SI=Sign+in&PPFT= $+ $hget(PPFT,$1) | %sw POST /ppsecure/post.srf?appid=000000004C04B301&alg=wsignin1.0&bk= $+ $ctime $+(HTTP/1.1,$crlf,Host: login.live.com,$crlf,Content-Length: $len(%str),$crlf,User-Agent: Root,$crlf,Content-Type: application/x-www-form-urlencoded,$crlf,Cookie: MSPOK=,$hget(MSPOK,$1),$crlf,$crlf,%str) | echo 04 #data sent }
  584.   if (%stg == S3) { var %dat = stoken= $+ $replace($replace($3,$chr(37) $+ 2,$chr(37) $+ 252),$chr(37) $+ 3D,$chr(37) $+ 253D) $+ &action=login | %sw POST /webauth-handler.aspx $+(HTTP/1.1,$crlf,Host: irc7.com,$crlf,Content-Length: $len(%dat),$crlf,User-Agent: Root,$crlf,Content-Type: application/x-www-form-urlencoded,$crlf,Accept: */*,$crlf,$crlf,%dat) }
  585.   if (%stg == S4) { %sw GET /RenderChat.aspx $+(HTTP/1.1,$crlf,Host: irc7.com,$crlf,User-Agent: Root,$crlf,Accept: */*,$crlf,Cookie: $3-,$crlf,$crlf) }
  586. }
  587.  
  588. on *:SOCKREAD:UD>*:{
  589.   sockread &a | tokenize 32 $sock($sockname).mark
  590.   var %s = $sockname, %sm = $sock(%s).mark, %stg = $gettok(%s,2,62)
  591.   ; echo -a %s - %stg - $1-
  592.   if (%stg == S1) {
  593.     var %nig = $bfind(&a,1,MSPOK=) | if (%nig > 0) { hadd -m MSPOK $1 $gettok($gettok($mid($bvar(&a,1-).text,%nig),1,59),2,61) }
  594.     var %nig = $bfind(&a,1,name="PPFT") | if (%nig > 0) { hadd -m PPFT $1 $gettok($gettok($mid($bvar(&a,1-).text,%nig),4,61),1,34) | var %sck = $sPre(UD>S2) | sockopen -e %sck login.live.com 443 | sockmark %sck %sm }
  595.  
  596.   }
  597.   if (%stg == S2) {
  598.     var %nig = $bfind(&a,1,stoken) | if (%nig > 0) { echo 04Now getting ticket & profile for $gettok(%sm,1,32) | var %s = $sPre(UD>S3) | sockopen %s irc7.com 80 | sockmark %s $$1- $gettok($mid($bvar(&a,1-).text,%nig),5,34) $gettok(%sm,1-2,32) }
  599.     var %nig = $bfind(&a,1,WLWorkflow) | if (%nig > 0) { echo 04Not a live account | sockclose $sockname }
  600.     ; echo -a er $bvar(&a,1-).text
  601.   }
  602.   if (%stg == S3) {
  603.     echo -a Stage 3 DONE
  604.     var %nig = $bfind(&a,1,webauthtoken=) | if (%nig > 0) { sockmark $sockname $1 $3 $gettok($mid($bvar(&a,1-).text,%nig),1,59) }
  605.     var %nig = $bfind(&a,1,MSPAuth=) | if (%nig > 0) { sockmark $sockname $sock($sockname).mark $+ ; $gettok($mid($bvar(&a,1-).text,%nig),1,59) }
  606.     var %nig = $bfind(&a,1,MSPProf=) | if (%nig > 0) { sockmark $sockname $sock($sockname).mark $+ ; $gettok($mid($bvar(&a,1-).text,%nig),1,59) }
  607.     var %s = $sPre(UD>S4) | sockopen %s irc7.com 80 | sockmark %s $sock($sockname).mark
  608.   }
  609.  
  610.   if (%stg == S4) {
  611.     var %w = writeini -n $ud>File $$1
  612.     var %nig = $bfind(&a,1,<UniqueUserID>) | if (%nig > 0) { var %u = $gettok($gettok($mid($bvar(&a,1-).text,%nig),2,62),1,60) | echo -a $1 UID %u  | %w UID %u }
  613.     var %nig = $bfind(&a,1,<PassportTicket>) | if (%nig > 0) { var %t = $gettok($gettok($mid($bvar(&a,1-).text,%nig),2,62),1,60) | echo $1 Ticket %t | %w Ticket %t | set %ticket %t }
  614.     var %nig = $bfind(&a,1,<PassportProfile>) | if (%nig > 0) { var %p = $gettok($gettok($mid($bvar(&a,1-).text,%nig),2,62),1,60) | echo $1 Profile %p | %w Profile %p | set %profile %p }
  615.   }
  616. }
clone this paste RAW Paste Data