I made an open proxy scanning script.. works well when it's only a few ppls joinin at the same time.. but when chan gets massjoins (floodbots) it doesnt respond for a few secs.. and takes too much time.. any way to fix / get it work faster?
Code: Select all
setudef flag ops
bind join - * bopm:join
bind raw - 302 getip
proc bopm:join {nick host hand chan} {
set chan [string tolower $chan]
if {[isbotnick $nick] || ![channel get $chan ops]|| [matchattr $hand of|fo $chan]} {
return
}
putserv "userhost $nick"
}
proc getip { from key arg} {
global victim_host
set victim_host [lindex [lrange [split $arg "@"] 1 end] 0]
set new_url "http://opm.blitzed.org/proxy?ip=$victim_host"
set sock [egghttp:geturl $new_url bopm]
}
proc bopm {sock} {
global victim_host
set headers [egghttp:headers $sock]
set body [egghttp:data $sock]
egghttp:cleanup $sock
foreach line [split $body \n] {
if {[string match "*The IP address \<tt\>*" $line]} {
set ip_line $line
if {[string match *active* $ip_line] == 1} {
[gline $victim_host]
break
}
}
}
}
proc gline {arg} {
global victim_host admin_chan
putserv "gline add *@$victim_host +3600s open.proxy"
return 0
}