#proxyscan off
on *:LOGON:*:{ unset %dns.* }
on *:SNOTICE:Client Connecting on port*:{
prxyscan $9
}
raw 302:*:{
if (%bl_exempt. [ $+ [ $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) ] ]) { return }
else {
inc %dnscount. [ $+ [ $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) ] ] 1
if (%dnscount. [ $+ [ $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) ] ] > 4) { unset %dnscount. [ $+ [ $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) ] ] | set %dns. [ $+ [ $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) ] ] 1 | .timer_rstdns -o 1 900 unset %dns. [ $+ [ $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) ] ] }
if (!%dns. [ $+ [ $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) ] ]) { prxyscan -h $gettok($mid($gettok($2,2,$asc(=)),2),2,$asc(@)) }
}
haltdef
}
#proxyscan end
alias scan { if ($1 == on) { .enable #proxyscan | echo -a *** Proxy scanning enabled } | elseif ($1 == off) { .disable #proxyscan | echo -a *** Proxy scanning disabled } | else { echo -a *** Proxy scanning is currently $group(#proxyscan) } }
alias proxyscan { scan $1- }
alias exempt { set %bl_exempt. [ $+ [ $$1 ] ] 1 | echo -a *** IP/Host $$1 has been added to scan exemption }
alias unexempt { unset %bl_exempt. [ $+ [ $$1 ] ] | echo -a *** IP/Host $$1 has been removed from scan exemption }
alias clearexempts { unset %bl_exempt.* | echo -a *** Scan exemption list has been cleared }
alias prxyscan { set %proxyscan On | .dns $1- }
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;DNS;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:DNS:{
if (%ipscan.status == On) && ($dns(0) != 0) {
var %x = $dns(0)
var %a = 1
while (%a <= %x) {
ipscan $dns(%a).ip
inc %a
}
}
if (%ipscan.status == On) && ($dns(0) == 0) {
ipscan.next
}
if (!%scan) && (%ipscan.status != On) && (%userdns == On) {
if ($dns(0) == 0) && (%ipscan.status != On) {
echo -a $timestamp 12,1 ¥(0,1 $+ Error $+ 15)12,1¥0,1 Unable To Resolve $iif($iaddress,$iaddress,$dns(0).addr)
}
else {
var %numhosts $dns(0), %host = 0
var %hosts
while (%host < %numhosts) {
inc %host 1
set %hosts %hosts $iif($dns(1) == $dns(1).ip,$dns(%host).addr,$dns(%host).ip) $+ $chr(44)
}
if ($dns(1).nick) echo -a $timestamp 12,1 ¥(0,1 $+ DNS $+ 15)12,1¥0,1 $dns(1).nick
if (!$dns(1).nick) echo -a $timestamp 12,1 ¥(0,1 $+ DNS $+ 15)12,1¥0,1 $dns(1)
echo -a $timestamp 12,1 ¥(0,1 $+ DNS $+ 15)12,1¥0,1 Hostname: $dns(1).addr
echo -a $timestamp 12,1 ¥(0,1 $+ DNS $+ 15)12,1¥0,1 IP: $dns(1).ip
echo -a $timestamp 12,1 ¥(0,1 $+ DNS $+ 15)12,1¥0,1 LongIP: $longip($dns(1).ip)
echo -a $timestamp 12,1 ¥(0,1 $+ DNS $+ 15)12,1¥0,1 Time to resolve: $calc(($ticks - %time) / 1000) $+ sec
echo -a $timestamp 12,1 ¥(0,1 $+ DNS $+ 15)12,1¥0,1 End of DNS
}
}
if ($raddress == $null) && ((list.dsbl.org isin $dns(0).addr) || (rbl.efnet.org isin $dns(0).addr) || (ircbl.ahbl.org isin $dns(0).addr) || (dnsbl.njabl.org isin $dns(0).addr) || (dnsbl.sorbs.net isin $dns(0).addr) || (tor.dnsbl.sectoor.de isin $dns(0).addr)) {
haltdef | return
}
elseif ($raddress != $null) && (ircbl.ahbl.org isin $dns(1).addr) {
var %i = 4
while (%i > 0) { var %x_ = %x_ $+ $gettok($dns(1).addr,%i,46) $+ . | dec %i 1 }
var %x_ = $left(%x_,-1)
if (%bl_exempt. [ $+ [ %x_ ] ]) { globops IP address %x_ is listed as an open proxy/infected host in ircbl.ahbl.org DNSBL ( $+ $raddress $+ ), but has been exempted | return }
akill *@ $+ %x_ (ID: $+ $(1,100) $+ A) 12,1 ¥(0,1 $+ PROXY KLINE $+ 15)12,1¥0,1 if you belive your ip isent a proxy contact uremail@yoursite.com
akill *@ $+ %x_ (ID: $+ $(1,100) $+ B) 12,1 ¥(0,1 $+ PROXY KLINE $+ 15)12,1¥0,1 if you belive your ip isent a proxy contact uremail@yoursite.com
return
}
elseif ($raddress != $null) && (dnsbl.njabl.org isin $dns(1).addr) {
var %n = $dns(0)
while (%n > 0) {
if ($dns(%n).ip != 127.0.0.9) { goto njaend }
var %x_ = $null
var %i = 4
while (%i > 0) { var %x_ = %x_ $+ $gettok($dns(%n).addr,%i,46) $+ . | dec %i 1 }
var %x_ = $left(%x_,-1)
if (%bl_exempt. [ $+ [ %x_ ] ]) { globops IP address %x_ is listed as an open proxy in dnsbl.njabl.org DNSBL ( $+ $dns(%n).ip $+ ), but has been exempted | return }
akill *@ $+ %x_ (ID: $+ $(1,100) $+ C) Your IP has been listed as an Open Proxy or Infected IP
:njaend
dec %n 1
}
return
}
elseif ($raddress != $null) && (dnsbl.sorbs.net isin $dns(1).addr) {
var %n = $dns(0)
while (%n > 0) {
if ($dns(%n).ip == 127.0.0.7) || ($dns(%n).ip == 127.0.0.10) || ($dns(%n).ip == 127.0.0.6) { goto sorbsend }
var %x_ = $null
var %i = 4
while (%i > 0) { var %x_ = %x_ $+ $gettok($dns(%n).addr,%i,46) $+ . | dec %i 1 }
var %x_ = $left(%x_,-1)
if (%bl_exempt. [ $+ [ %x_ ] ]) { globops IP address %x_ is listed as an open proxy/infected host in dnsbl.sorbs.net DNSBL ( $+ $dns(%n).ip $+ ), but has been exempted | return }
akill *@ $+ %x_ (ID: $+ $(1,100) $+ D) Your IP has been listed as an Open Proxy or Infected IP
:sorbsend
dec %n 1
}
return
}
elseif ($raddress != $null) && (tor.dnsbl.sectoor.de isin $dns(1).addr) {
var %n = $dns(0)
while (%n > 0) {
if ($dns(%n).ip == 127.0.0.2) { goto torend }
var %x_ = $null
var %i = 4
while (%i > 0) { var %x_ = %x_ $+ $gettok($dns(%n).addr,%i,46) $+ . | dec %i 1 }
var %x_ = $left(%x_,-1)
if (%bl_exempt. [ $+ [ %x_ ] ]) { globops IP address %x_ is listed as a TOR server in tor.dnsbl.sectoor.de DNSBL ( $+ $dns(%n).ip $+ ), but has been exempted | return }
akill *@ $+ %x_ (ID: $+ $(1,100) $+ E) Your IP has been listed as an Open Proxy or Infected IP
:torend
dec %n 1
}
return
}
elseif ($raddress != $null) && (list.dsbl.org isin $dns(1).addr) {
var %n = $dns(0)
while (%n > 0) {
if ($dns(%n).ip != 127.0.0.2) { goto dsblend }
var %x_ = $null
var %i = 4
while (%i > 0) { var %x_ = %x_ $+ $gettok($dns(%n).addr,%i,46) $+ . | dec %i 1 }
var %x_ = $left(%x_,-1)
akill *@ $+ %x_ (ID: $+ $(1,100) $+ F) Your IP has been listed as an Open Proxy or Infected IP
:dsblend
dec %n 1
}
return
}
elseif ($raddress != $null) && (rbl.efnet.org isin $dns(1).addr) {
var %i = 4
while (%i > 0) { var %x_ = %x_ $+ $gettok($dns(1).addr,%i,46) $+ . | dec %i 1 }
var %x_ = $left(%x_,-1)
if (%bl_exempt. [ $+ [ %x_ ] ]) { globops IP address %x_ is listed as an open proxy/infected host in rbl.efnet.org DNSBL ( $+ $raddress $+ ), but has been exempted | return }
akill *@ $+ %x_ (ID: $+ $(1,100) $+ G) Your IP has been listed as an Open Proxy or Infected IP
return
}
elseif ($raddress != $null) && (dnsbl.dronebl.org isin $dns(1).addr) {
var %i = 4
while (%i > 0) { var %x_ = %x_ $+ $gettok($dns(1).addr,%i,46) $+ . | dec %i 1 }
var %x_ = $left(%x_,-1)
if (%bl_exempt. [ $+ [ %x_ ] ]) { globops IP address %x_ is listed as an open proxy/infected host in rbl.efnet.org DNSBL ( $+ $raddress $+ ), but has been exempted | return }
akill *@ $+ %x_ (ID: $+ $(1,100) $+ J) Your IP has been listed as an Open Proxy or Infected IP |
return
}
elseif ((list.dsbl.org !isin $dns(1).addr) && (dnsbl.dronebl.org !isin $dns(1).addr) && (list.dsbl.org !isin $dns(0).addr) && (rbl.efnet.org !isin $dns(1).addr) && (rbl.efnet.org !isin $dns(0).addr) && (ircbl.ahbl.org !isin $dns(1).addr) && (ircbl.ahbl.org !isin $dns(0).addr) && (dnsbl.njabl.org !isin $dns(1).addr) && (dnsbl.njabl.org !isin $dns(0).addr) && (dnsbl.sorbs.net !isin $dns(1).addr) && (dnsbl.sorbs.net !isin $dns(0).addr) && (tor.dnsbl.sectoor.de !isin $dns(1).addr) && (tor.dnsbl.sectoor.de !isin $dns(0).addr)) || ($dns(1).addr == $null) {
if ($raddress == $null) {
var %i = 4
while (%i > 0) { var %x__ = %x__ $+ $gettok($dns(0).ip,%i,46) $+ . | dec %i 1 }
if (%x__ != ....) && (.. !isin %x__) {
prxyscan %x__ $+ rbl.efnet.org
prxyscan %x__ $+ dnsbl.dronebl.org
prxyscan %x__ $+ ircbl.ahbl.org
prxyscan %x__ $+ dnsbl.njabl.org
prxyscan %x__ $+ dnsbl.sorbs.net
prxyscan %x__ $+ tor.dnsbl.sectoor.de
prxyscan %x__ $+ list.dsbl.org
}
}
else {
var %i = 4
while (%i > 0) { var %x__ = %x__ $+ $gettok($dns(1).ip,%i,46) $+ . | dec %i 1 }
if (%x__ != ....) && (.. !isin %x__) {
prxyscan %x__ $+ rbl.efnet.org
prxyscan %x__ $+ ircbl.ahbl.org
prxyscan %x__ $+ dnsbl.dronebl.org
prxyscan %x__ $+ dnsbl.njabl.org
prxyscan %x__ $+ dnsbl.sorbs.net
prxyscan %x__ $+ tor.dnsbl.sectoor.de
prxyscan %x__ $+ list.dsbl.org
}
}
}
haltdef
unset %userdns
}
alias res {
set %userdns On
.dns $1-
set %time $ticks
haltdef
}
alias -l dns {
.dns $1-
}