# Proxy / TOR koruma sistemi (Eggdrop TCL)
# Gereksinimler: proxy.txt (engelli IP listesi), DNSBL destekli
setudef flag proxyblock
# DNSBL listesi (örnek)
set dnsbllist {
"dnsbl.dronebl.org"
"tor.dnsbl.sectoor.de"
"rbl.efnetrbl.org"
}
# Client bağlandığında IP kontrol
bind evnt - init-server check_proxy_init
proc check_proxy_init {type} {
bind raw - "001" check_proxy_load
}
# Kullanıcı listesi yüklendiğinde başla
proc check_proxy_load {from keyword text} {
unbind raw - "001" check_proxy_load
utimer 3 start_proxy_scan
}
# Bağlı kullanıcıları kontrol et
proc start_proxy_scan {} {
foreach user [handlist] {
set ip [getuser $user XTRA:ip]
if {[string length $ip] > 6} {
check_dnsbl $user $ip
}
}
}
# DNSBL sorgusu başlat
proc check_dnsbl {nick ip} {
foreach bl $::dnsbllist {
set reversed_ip [join [lreverse [split $ip "."]] "."]
set query "$reversed_ip.$bl"
dnslookup -t a $query [list dnsbl_result $nick $ip $bl]
}
}
# DNSBL sonucu
proc dnsbl_result {nick ip bl status result} {
if {$status == 0 && $result ne ""} {
putlog "Proxy/TOR Tespit: $nick ($ip) $bl tarafından listelenmiş."
putserv "PRIVMSG $nick :Sunucu koruması: IP adresiniz $bl DNSBL listesinde bulunuyor (Proxy/TOR). Bağlantınız engellenebilir."
putserv "KILL $nick :[random_reason]"
# AKILL sistemi varsa ekle:
# putserv "OPERSPY AKILL ADD $ip 1d TOR/Proxy IP engellendi."
}
}
# Rasgele sebep üretici
proc random_reason {} {
set reasons {
"Proxy kullanımı yasaktır."
"Güvenlik nedeniyle bağlantınız reddedildi."
"TOR ağı tespit edildi."
"Sunucu kurallarını ihlal ettiniz."
}
return [lindex $reasons [rand [llength $reasons]]]
}