Advertisement
westor

Network Scanner v1.2 for Mr_Me

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