Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:TEXT:*:#: {
- tokenize 32 $strip($1-)
- if ($1 == !ipinfo) || ($1 == !iplookup) || ($1 == !ip) {
- if (!$2) { msg $chan ( $+ $nick $+ ): Error, Specify an IP! | return }
- if (!$check_ipv4($2)) { msg $chan ( $+ $nick $+ ): Error, Specify a valid IP! | return }
- 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...)
- set -eu30 %dnsblchan $chan
- rbl_ip_dns $2
- }
- }
- alias -l col { return $+($chr(3),$1,$chr(2),$chr(2),$2-,$chr(2),$chr(2),$chr(3)) }
- 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 }
- alias -l revip { tokenize 46 $1 | return $+($4, ., $3, ., $2, ., $1) }
- alias -l check_ipv4 {
- if (!$1) { return 0 }
- if ($regex($1,/^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})$/Sx)) && ($iptype($1) == ipv4) { return 1 }
- return 0
- }
- alias rbl_ip_dns {
- if (!$1) { return }
- var %t = $numtok($rbls,32)
- var %i = 1
- while (%i <= %t) {
- var %r = $gettok($rbls,%i,32)
- var %n = $revip($1) $+ . $+ %r
- .dns %n
- inc %i
- }
- }
- ON *:DNS: {
- if (!%dnsblchan) { return }
- var %t = $dns(0)
- ; echo 12 -a IS: $dns(0) ----- $dns(1) -- $dns(1).ip -- $dns(1).addr
- while (%t) {
- var %d = $dns(%t)
- var %a = $dns(%t).addr
- var %i = $dns(%t).ip
- var %s = $gettok(%i,4,46)
- var %r = $gettok(%d,5-,46)
- var %ip = $gettok(%d,1-4,46)
- ; echo 4 -a IS: %d -- %a -- %i -- %r -- %ip
- if (%d) && (%i) && ($istok($rbls,%r,32)) {
- set -eu30 $+(%,%ip $+ . $+ %r) $addtok($evalnext($+(%,%ip $+ . $+ %r)),%s,32)
- .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.
- }
- dec %t
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement