Advertisement
westor

DNSBL FIX for Mr_Me v1.0

Dec 31st, 2019
1,081
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.04 KB | None | 0 0
  1. ON *:TEXT:*:#: {
  2.   tokenize 32 $strip($1-)
  3.  
  4.   if ($1 == !ipinfo) || ($1 == !iplookup) || ($1 == !ip) {
  5.     if (!$2) { msg $chan ( $+ $nick $+ ): Error, Specify an IP! | return }
  6.     if (!$check_ipv4($2)) { msg $chan ( $+ $nick $+ ): Error, Specify a valid IP! | return }
  7.  
  8.     msg $chan $col(7,Checking IP) $col(14,:) $col(9,$2) $col(7,address in) $col(6,$numtok($rbls,32)) $col(7,RBLs $+ $chr(44) Please wait...)
  9.  
  10.     set -eu30 %dnsblchan $chan
  11.  
  12.     rbl_ip_dns $2
  13.   }
  14. }
  15.  
  16. alias -l col { return $+($chr(3),$1,$chr(2),$chr(2),$2-,$chr(2),$chr(2),$chr(3)) }
  17. alias -l rbls { return dnsbl.dronebl.org rbl.efnet.org dnsbl.proxybl.org tor.dnsbl.sectoor tor.dan.me.uk dnsbl.njabl.org virbl.dnsbl.bit.nl dnsbl.ahbl.org rbl.faynticrbl.org dnsbl.ipocalypse.net dnsbl.rizon.net dnsbl.swiftbl.org dnsbl.libirc.so dnsbl.bnc4free.in dnsbl.sorbs.net }
  18. alias -l revip { tokenize 46 $1 | return $+($4, ., $3, ., $2, ., $1) }
  19. alias -l check_ipv4 {
  20.   if (!$1) { return 0 }
  21.  
  22.   if ($regex($1,/^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})$/Sx)) && ($iptype($1) == ipv4) { return 1 }
  23.  
  24.   return 0
  25. }
  26.  
  27. alias rbl_ip_dns {
  28.   if (!$1) { return }
  29.  
  30.   var %t = $numtok($rbls,32)
  31.   var %i = 1
  32.  
  33.   while (%i <= %t) {
  34.     var %r = $gettok($rbls,%i,32)
  35.     var %n = $revip($1) $+ . $+ %r
  36.  
  37.     .dns %n
  38.  
  39.     inc %i
  40.   }
  41. }
  42.  
  43. ON *:DNS: {
  44.   if (!%dnsblchan) { return }
  45.  
  46.   var %t = $dns(0)
  47.  
  48.   ; echo 12 -a IS: $dns(0) ----- $dns(1) -- $dns(1).ip -- $dns(1).addr
  49.  
  50.   while (%t) {
  51.     var %d = $dns(%t)
  52.     var %a = $dns(%t).addr
  53.     var %i = $dns(%t).ip
  54.     var %s = $gettok(%i,4,46)
  55.     var %r = $gettok(%d,5-,46)
  56.     var %ip = $gettok(%d,1-4,46)
  57.  
  58.     ; echo 4 -a IS: %d -- %a -- %i -- %r -- %ip
  59.  
  60.     if (%d) && (%i) && ($istok($rbls,%r,32)) {
  61.       set -eu30 $+(%,%ip $+ . $+ %r) $addtok($evalnext($+(%,%ip $+ . $+ %r)),%s,32)
  62.       .timer[MSG_ $+ %d $+ _NOW] 1 1 msg %dnsblchan $col(7,[[) $col(4,DNSBL) $col(7,]]) $col(4,The IP) $col(14,:) $col(9,$revip(%ip)) $col(4,has been found in BL zone) $col(13,%r) with $col(5,$evalnext($+(%,%ip $+ . $+ %r))) reply.
  63.     }
  64.  
  65.     dec %t
  66.   }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement