Advertisement
westor

Network Scanner v1.4 for Mr_Me

Feb 8th, 2016
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 6.51 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 $$chan $$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) { scanick $chan $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) $+ ] ->  $+ %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 -tc i $chan [Network Scanner]: Error, The IAL is NOT enabled! | linesep -a | return }
  87.   if (!$1) { linesep -a | echo -tc i $chan [Network Scanner]: Error, Not enough parameters, enter the channel! | linesep -a | return }
  88.   if (!$2) { linesep -a | echo -tc i $chan [Network Scanner]: Error, Not enough parameters, enter the nickname! | linesep -a | return }
  89.   if ($status !== connected) { linesep -a | echo -c i $chan [Network Scanner]: Error, You are NOT connected to the server! | linesep -a | return }
  90.   if ($scon(0) == 1) { linesep -a | echo -c i $chan [Network Scanner]: Error, You are NOT on any other network connected! | linesep -a | return }
  91.   if (!$address($me,2)) { linesep -a | echo -c i $chan [Network Scanner]: Error, Your IAL lis is not updated, please use: /scon -a who * to update it and retry! | linesep -a | return }
  92.   var %myaddr = $address($me,2)
  93.   var %host_temp = $mask($ial($2,1),2)
  94.   if (%host_temp) {
  95.     var %tt = $scon(0)
  96.     var %ii = 1
  97.     while (%ii <= %tt) {
  98.       var %net = $scon(%ii).network
  99.       if (!$istok(%nets,%net,32)) && ($network !== %net) {
  100.         var %cid = $scon(%ii).cid
  101.         var %nets = $addtok(%nets,%net,32)
  102.         var %chans = $scon(%ii).allchans
  103.         var %iii = 1
  104.         while (%iii <= $numtok(%chans,44)) {
  105.           var %cc = $gettok(%chans,%iii,44)
  106.           var %tot = $tot_nick(%cid,%cc)
  107.           if (!%tot) || (%tot == 1) { goto next }
  108.           var %iiii = 1
  109.           while (%iiii <= %tot) {
  110.             var %mn = $gt_me_nick(%cid)
  111.             var %mh = $gt_me_host(%cid)
  112.             var %nn = $gt_nick(%cid,%cc,%iiii)
  113.             var %hh = $gt_host(%cid,%nn,%cc)
  114.             if ($istok(%host_temp,%hh,32)) && (%nn !== %mn) && (%hh !== %mh) && (%hh !== %myaddr) { echo -t $1 [Network Scanner]:  $+ %nn $+  ( $+ $iif(%hh,$v1,N/A) $+ ) is online on  $+ %net $+  network on  $+ %cc $+  channel! }
  115.             inc %iiii
  116.           }
  117.           :next
  118.           inc %iii
  119.         }
  120.       }
  121.       inc %ii
  122.     }
  123.   }
  124. }
  125.  
  126. alias -l _safe { return $!decode( $encode($1-,m) ,m) }
  127. alias -l allchans {
  128.   var %t = $chan(0)
  129.   var %i = 1
  130.   while (%i <= %t) {
  131.     var %c = $chan(%i)
  132.     if ($me ison %c) { var %tot = $addtok(%tot,%c,44) }
  133.     inc %i
  134.   }
  135.   return $iif(%tot,$v1,0)
  136. }
  137.  
  138. alias -l tot_nick {
  139.   if (!$1) { return 0 }
  140.   scid $1
  141.   return $nick($2,0)
  142. }
  143. alias -l gt_nick {
  144.   if (!$1) { return N/A }
  145.   scid $1
  146.   return $nick($2,$3)
  147. }
  148. alias -l gt_host {
  149.   if (!$1) { return N/A }
  150.   scid $1
  151.   return $iif($mask($ialchan($2,$3,1),2),$v1,N/A)
  152. }
  153. alias -l gt_me_host {
  154.   if (!$1) { return N/A }
  155.   scid $1
  156.   return $iif($address($me,2),$v1,N/A)
  157. }
  158. alias -l gt_me_nick {
  159.   if (!$1) { return N/A }
  160.   scid $1
  161.   return $me
  162. }
  163.  
  164. #adv_raw off
  165. raw 352:*: { haltdef }
  166. raw 315:*: { haltdef | .disable #adv_raw }
  167. #adv_raw end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement