i have make a exemp ip.list with hashtable where i add the real Ip client On Client Connecting to be check read and avoided every real ip on exempt ip.list i use this command to add/del/list

example on connect client ip is 104.100.23.45 , /ipadd *@104.100*
so this ip go to exempt ip.list to not be banned from dnsbl
but need to be recognized the full ip with the ip i add on exempt ip.list


i need the ip client to be check it from dnsbl and the dns to resolve the LongIp and simple Ip in the right way like /dns
and whwat ip is not on ip.list to be banned with command gline
can anyone help me to rewrite the right code where is wrong on this script



on *:SNOTICE:*client connecting*:{
proxycheck $9
}

if ($hfind(ip.list,$9,1,w)).data
var %ip.exemp $9
;if $hfind(ip.list,$9,1,W).data {
var %ip = 1
while ($($ $+ %ip, 2) != $null) {
var %ip = $strip($v1)
if ($hfind(ip,%ip,$9,1,W).data) {
var %:ip $token($token($10,2,64),1,41)
elseif ($6 == at && . isin $7) { /proxycheck $gettok($gettok($9,2,64),1,41)) }
elseif ($6-7 == on port) { /proxycheck $gettok($gettok($10,2,64),1,41)) }
.proxycheck %:ip
}
}
alias ProxyCheck {
if ($1 == $null) {
}
elseif ($1 == localhost) {
proxycheck:process $ProxyCheck:RevIP($ip)
}
elseif ($longIP($1)) {
proxycheck:Process $ProxyCheck:RevIP($1)
}
}
alias -l ProxyCheck:Revip {
tokenize 46 $1
return $+($4, ., $3, ., $2, ., $1)
}
alias -l ProxyCheck:BL {
return $&
.drone.dnsbl.org $&

}

alias -l ProxyCheck:Process {
var %ip = $1
var %x = 1
tokenize 32 $ProxyCheck:BL
set -e $+(%,ProxyCheck:,%ip) $0
while ($(,$ $+ %x)) {
.dns %ip $+ $v1
inc %x
}
}

on *:DNS:{

var %ip = $gettok($address,1-4,46)
var %zone = $gettok($address,5-,46)

if (%zone && $($+(%,ProxyCheck:,%ip),2)) {
$iif($v1 == 1,unset,dec) $+(%,ProxyCheck:,%ip)
if ($dns(0)) { /echo -as /gline *@ $+ $ProxyCheck:RevIP(%ip) 4PROXY }
Halt
}
}

Last edited by Tano; 22/05/18 05:21 PM.