Advertisement
westor

Network Scanner v1.3 for Mr_Me

Feb 8th, 2016
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 6.38 KB | None | 0 0
  1. ;;;INFO
  2. ;;;/scanchan <#channel> = This will scan the channel and will give information if anyone on the channel is online on any other network and channel that you are on.
  3. ;;;
  4. ;;;/scanick <nickname> = This will scan the nickname if is online on any other network channel that you are on.
  5.  
  6. Menu nicklist  {
  7.   $iif(%advmode == on,Scan $$1 For Host Clones):scanick $$1
  8.   -
  9. }
  10.  
  11. menu channel  {
  12.   $iif(%advmode == on,Scan $chan For Host Clones): { .enable #adv_raw | .who $chan | scanchan $chan }
  13.   -
  14. }
  15.  
  16. ON *:JOIN:#: {
  17.   if ($nick == $me) {
  18.     .enable #adv_raw
  19.     .who $chan
  20.     .timer[SCAN_CHAN_ $+ $chan $+ ] 1 1 scanchan $_safe($chan)
  21.   }
  22.   elseif ($nick !== $me) { .timer[SCAN_NICK_ $+ $nick $+ ] 1 3 scanick $_safe($nick) }
  23. }
  24.  
  25. alias scanchan {
  26.   if (!$1) { linesep -a | echo -ac i [Network Scanner]: Error, Not enough parameters, enter the channel! | linesep -a | return }
  27.   if ($status !== connected) { linesep -a | echo -ac i [Network Scanner]: Error, You are NOT connected to the server! | linesep -a | return }
  28.   if ($me !ison $1) { linesep -a | echo -ac i [Network Scanner]: Error, You are NOT on the $1 channel! | linesep -a | return }
  29.   if (!$ial) { echo $1 [Network Scanner]: Error, The IAL is NOT enabled, use /ial on and retry! | return }
  30.   if ($scon(0) == 1) { echo $1 [Network Scanner]: Error, You are NOT on any other network connected! | return }
  31.   if (!$nick($1,0)) { echo $1 [Network Scanner]: Error, There are NOT any users on the $1 channel! | return }
  32.   if ($nick($1,0) == 1) { echo $1 [Network Scanner]: Error, There must be more than 1 user(s) on the $1 channel to scan! | return }
  33.   if (!$address($me,2)) { echo $1 [Network Scanner]: Error, Your IAL lis is not updated, please use: /scon -a who * to update it and retry! | return }
  34.   echo $1 [Network Scanner]: Scanning now on all the network(s) and all the channel(s) for same host on $1 channel, Please wait...
  35.   var %myaddr = $address($me,2)
  36.   var %mycid = $cid
  37.   var %t = $nick($1,0)
  38.   var %i = 1
  39.   while (%i <= %t) {
  40.     var %n = $nick($1,%i)
  41.     var %h = $mask($ialchan(%n,$1,1),2)
  42.     if (%h) && (%h !== %myaddr) { hadd -m SCANCLONE_HOSTS %h 1 }
  43.     hadd -m SCANCLONE_NICKS %h %n
  44.     inc %i
  45.   }
  46.   if ($hget(SCANCLONE_HOSTS,0).data) {
  47.     var %tt = $scon(0)
  48.     var %ii = 1
  49.     while (%ii <= %tt) {
  50.       var %net = $scon(%ii).network
  51.       if (!$istok(%nets,%net,32)) && ($network !== %net) {
  52.         var %cid = $scon(%ii).cid
  53.         var %nets = $addtok(%nets,%net,32)
  54.         var %chans = $scon(%ii).allchans
  55.         var %iii = 1
  56.         while (%iii <= $numtok(%chans,44)) {
  57.           var %cc = $gettok(%chans,%iii,44)
  58.           var %tot = $tot_nick(%cid,%cc)
  59.           if (!%tot) || (%tot == 1) { goto next }
  60.           var %iiii = 1
  61.           while (%iiii <= %tot) {
  62.             var %mn = $gt_me_nick(%cid)
  63.             var %mh = $gt_me_host(%cid)
  64.             var %nn = $gt_nick(%cid,%cc,%iiii)
  65.             var %hh = $gt_host(%cid,%nn,%cc)
  66.             if ($hget(SCANCLONE_NICKS,%hh)) { var %fn = $hget(SCANCLONE_NICKS,%hh) }
  67.             if ($hget(SCANCLONE_HOSTS,%hh)) && (%nn !== %mn) && (%hh !== %myaddr) && (%hh !== %mh) {
  68.               echo $1 [Network Scanner]: [ $+ $iif(%fn,$v1,N/A) $+ ] -> The  $+ %nn $+  ( $+ $iif(%hh,$v1,N/A) $+ ) is online on  $+ %net $+  network on  $+ %cc $+  channel!
  69.               var %total = $calc(%total +1)
  70.             }
  71.             inc %iiii
  72.           }
  73.           :next
  74.           inc %iii
  75.         }
  76.       }
  77.       inc %ii
  78.     }
  79.   }
  80.   echo $1 [Network Scanner]: End of the Network Scanner Scan. - (Total:  $+ $iif(%total,$v1,0) $+ )
  81.   if ($hget(SCANCLONE_HOSTS)) { hfree SCANCLONE_HOSTS }
  82.   if ($hget(SCANCLONE_NICKS)) { hfree SCANCLONE_NICKS }
  83. }
  84.  
  85. alias scanick {
  86.   if (!$ial) { linesep -a | echo -ac i [Network Scanner]: Error, The IAL is NOT enabled! | linesep -a | return }
  87.   if (!$1) { linesep -a | echo -ac i [Network Scanner]: Error, Not enough parameters, enter the channel! | linesep -a | return }
  88.   if ($status !== connected) { linesep -a | echo -ac i [Network Scanner]: Error, You are NOT connected to the server! | linesep -a | return }
  89.   if ($scon(0) == 1) { linesep -a | echo -ac i [Network Scanner]: Error, You are NOT on any other network connected! | linesep -a | return }
  90.   if (!$address($me,2)) { linesep -a | echo -ac i [Network Scanner]: Error, Your IAL lis is not updated, please use: /scon -a who * to update it and retry! | linesep -a | return }
  91.   var %myaddr = $address($me,2)
  92.   var %host_temp = $mask($ial($1,1),2)
  93.   if (%host_temp) {
  94.     var %tt = $scon(0)
  95.     var %ii = 1
  96.     while (%ii <= %tt) {
  97.       var %net = $scon(%ii).network
  98.       if (!$istok(%nets,%net,32)) && ($network !== %net) {
  99.         var %cid = $scon(%ii).cid
  100.         var %nets = $addtok(%nets,%net,32)
  101.         var %chans = $scon(%ii).allchans
  102.         var %iii = 1
  103.         while (%iii <= $numtok(%chans,44)) {
  104.           var %cc = $gettok(%chans,%iii,44)
  105.           var %tot = $tot_nick(%cid,%cc)
  106.           if (!%tot) || (%tot == 1) { goto next }
  107.           var %iiii = 1
  108.           while (%iiii <= %tot) {
  109.             var %mn = $gt_me_nick(%cid)
  110.             var %mh = $gt_me_host(%cid)
  111.             var %nn = $gt_nick(%cid,%cc,%iiii)
  112.             var %hh = $gt_host(%cid,%nn,%cc)
  113.             if ($istok(%host_temp,%hh,32)) && (%nn !== %mn) && (%hh !== %mh) && (%hh !== %myaddr) { echo -a [Network Scanner]: The  $+ %nn $+  ( $+ $iif(%hh,$v1,N/A) $+ ) is online on  $+ %net $+  network on  $+ %cc $+  channel! }
  114.             inc %iiii
  115.           }
  116.           :next
  117.           inc %iii
  118.         }
  119.       }
  120.       inc %ii
  121.     }
  122.   }
  123. }
  124.  
  125. alias -l _safe { return $!decode( $encode($1-,m) ,m) }
  126. alias -l allchans {
  127.   var %t = $chan(0)
  128.   var %i = 1
  129.   while (%i <= %t) {
  130.     var %c = $chan(%i)
  131.     if ($me ison %c) { var %tot = $addtok(%tot,%c,44) }
  132.     inc %i
  133.   }
  134.   return $iif(%tot,$v1,0)
  135. }
  136.  
  137. alias -l tot_nick {
  138.   if (!$1) { return 0 }
  139.   scid $1
  140.   return $nick($2,0)
  141. }
  142. alias -l gt_nick {
  143.   if (!$1) { return N/A }
  144.   scid $1
  145.   return $nick($2,$3)
  146. }
  147. alias -l gt_host {
  148.   if (!$1) { return N/A }
  149.   scid $1
  150.   return $iif($mask($ialchan($2,$3,1),2),$v1,N/A)
  151. }
  152. alias -l gt_me_host {
  153.   if (!$1) { return N/A }
  154.   scid $1
  155.   return $iif($address($me,2),$v1,N/A)
  156. }
  157. alias -l gt_me_nick {
  158.   if (!$1) { return N/A }
  159.   scid $1
  160.   return $me
  161. }
  162.  
  163. #adv_raw off
  164. raw 352:*: { haltdef }
  165. raw 315:*: { haltdef | .disable #adv_raw }
  166. #adv_raw end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement