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.

Removing Spamming bots with strange nicks

Old posts that have not been replied to for several years.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

well, that would be a bot slow. isn't there a faster way ?

like if regexp [split... $uhost ....] or somethin like that ?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

lol
please hit me someone! :oops:
.... and gimme a cup of coffee!

Code: Select all

set ident [lindex [split $uhost @] 0]
then do the if-test again on the $ident
Elen sila lúmenn' omentielvo
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

thank You again :) :wink: :P
T
TsT
Voice
Posts: 16
Joined: Tue Mar 04, 2003 11:03 am
Location: Strasbourg, France
Contact:

Post by TsT »

Papillon wrote:

Code: Select all

set ident [lindex [split $uhost @] 0]
Or with regexp:

Code: Select all

regexp {^([^@]+)} $uhost _ ident

TsT, the regexp lover.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

hehe
TsT, the regexp lover :)
I'm sorry to dissapoint you but regexp is slow, if you care about every millisecond then you should avoid regexp whenever possible
Elen sila lúmenn' omentielvo
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Oh, I see :P then there must be a faster way right ?? lol
E
EEggy
Op
Posts: 122
Joined: Thu Sep 26, 2002 11:46 pm

Post by EEggy »

Hi, so can you please paste the complete working script??

thank you
EEggy
T
TsT
Voice
Posts: 16
Joined: Tue Mar 04, 2003 11:03 am
Location: Strasbourg, France
Contact:

Post by TsT »

Papillon wrote:hehe
TsT, the regexp lover :)
I'm sorry to dissapoint you but regexp is slow, if you care about every millisecond then you should avoid regexp whenever possible
I just saw this for the fun.
Regexp is sometime more usefull to split lot of part of one string in one line, like:
set nickuserhost "foo!bar@one.two.isp.com"

set nick ... (foo)
set user ... (bar)
set subdom ... (one.two)
set dom ... (isp)
set tld ... (com)

if {[regexp {^([^!]+)!([^@]+)@(.*)[.]{0,1}([^.]+).([^.]+)$} $nickuserhost _ nick user subdom dom tld]} {
#not matching...
}

And i'm agree regexp is slower than split/lindex ... but have you some check or statistique to see more the difference ?

I use very often regexp and i never see the difference :D
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

well, I'm not talkin about seconds... although with enough regexp's it will be ;)
You can test the difference with the time command

Code: Select all

bind dcc - test testproc
proc testproc {hand idx arg} { 
	putlog [time proc1] 
	putlog [time proc2] 
}
proc proc1 {} {
	set host "papillon!papillon@is.a.rabid.chickenkiller.com"
	set data [regexp {^([^!]+)!([^@]+)@(.*)[.]{0,1}([^.]+).([^.]+)$} $host _ nick user subdom dom tld]
}
proc proc2 {} {
	set host "papillon!papillon@is.a.rabid.chickenkiller.com"
	set nick [lindex [split $host !] 0]
	set user [lindex [split [lindex [split $host @] 0] !] 1]
	set subdom [join [lrange [split [lindex [split $host @] 1] .] 0 end-1] .]
	set dom [lindex [split $host .] end]
}
or load this to your bot
if you have tcl installed on your machine you can use tclsh/wish to test the difference :)
Elen sila lúmenn' omentielvo
T
TsT
Voice
Posts: 16
Joined: Tue Mar 04, 2003 11:03 am
Location: Strasbourg, France
Contact:

Post by TsT »

It's true, I got proc1 is 3x more slower than proc2:
% time proc1
306 microseconds per iteration
% time proc2
103 microseconds per iteration
BUT there are not really equivalent because proc1 provide a matching result...
proc2 need string match to check if data is valid :P
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

hehe, add a string match then and try again ;)
Elen sila lúmenn' omentielvo
F
Fisherman

Post by Fisherman »

spamming bots has been a problem lately.. i have been looking for a tcl to ban the spam bots who sits in the channels.. and put out some webpage address when u say hi..

so far i havent found any..

the thing now i am doing is just use MIRC script to msg the bots and find out if they are one of those and remotely send a message to the bot to ban that user.. a tcl of this kind may help i think :) ... can someone tell a tcl of that if exists?
E
EEggy
Op
Posts: 122
Joined: Thu Sep 26, 2002 11:46 pm

Post by EEggy »

Hi Sir_Fz,

is it possible if you can paste the working codes please, because i have no luck.

advance thanks
EEggy
User avatar
TALES
Halfop
Posts: 59
Joined: Sun Nov 09, 2003 8:45 am
Location: Netherlands
Contact:

Post by TALES »

i have made 1 script for weird nicks could do some modification for your needs ?? i think that your talking about the virii FYLE i have found the source of FYLE that has some intresting thinks:

1 realname (always some domein name like .net .com etc..)
2 nick register with email *@hotmail.com (got this from BarkerJr)
3 nick is random (everybody knows this ;) )

the scan i have made scans on the realname an the random nicks have to build in the if nick is register with email *@hotmail.com

the script i have so fare are on http://www.cb3rob.net/~tales in the tcl section bad2pack.zip

the realname scanner has not been made by me but made a little modification for the FYLE bots (original code by Papillon modified and adjusted by caesar)
Locked