This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Make this script not freeze/work faster?

Old posts that have not been replied to for several years.
Locked
f
feroz
Voice
Posts: 25
Joined: Wed Aug 04, 2004 11:59 am

Make this script not freeze/work faster?

Post by feroz »

Hello,

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
		}
And other question.. is there anythin in eggdrops similar to the "notify" feature on mIRC?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

As for the code, it looks fine for me. You cannot make it go faster. As you know clones and floodbots join within milliseconds of each other and they are hard to detect.

Moreover egghttp.tcl which you are using will request the http server to pass information and retreive it back which takes time, if that process can be speeded up or say if the http response is faster then you can get replies faster. Moreover the best way to tackle with this is to first lock the channel to specific modes, when you detect flood bots and then check and g:line them, this will prevent flooding on the channel and the bots will be glined ofcourse, but it would take a bit of time.

The best you can do here is:

Replace the codes:

Code: Select all

   putserv "userhost $nick"
   putserv "gline add *@$victim_host +3600s open.proxy"  
With the codes:

Code: Select all

  putquick "userhost $nick" -next
  putquick "gline add *@$victim_host +3600s open.proxy" -next
It all mainly depends upon the response of the http, as it might be a bit slow.

As for the notification yes there is a raw which you can bind to, basically it is for SIGNON and SIGNOFF which mIRC also uses as notify. SIGNON when user has connected to the client server and is on IRC and SIGNOFF when user has left/disconnected from the client server.

Take a look at some of these threads for the notify you can get some idea.
http://forum.egghelp.org/viewtopic.php?t=5807
http://forum.egghelp.org/viewtopic.php?t=2396
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
f
feroz
Voice
Posts: 25
Joined: Wed Aug 04, 2004 11:59 am

Post by feroz »

Thx for replyin awyeah :)

Ok, i'll try to add a massjoin detect thinggy, it will probably be better has you said..

And thx for those post, i got my notify script workin i think. :mrgreen:

Thx.
Locked