egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Removing Spamming bots with strange nicks
Goto page Previous  1, 2, 3
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Jul 25, 2003 6:45 pm    Post subject: Reply with quote

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

like if regexp [split... $uhost ....] or somethin like that ?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Papillon
Owner


Joined: 15 Feb 2002
Posts: 724
Location: *.no

PostPosted: Sat Jul 26, 2003 4:02 am    Post subject: Reply with quote

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

Code:
set ident [lindex [split $uhost @] 0]

then do the if-test again on the $ident
_________________
Elen sila lúmenn' omentielvo
Back to top
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jul 26, 2003 5:35 am    Post subject: Reply with quote

thank You again Smile Wink Razz
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
TsT
Voice


Joined: 04 Mar 2003
Posts: 16
Location: Strasbourg, France

PostPosted: Sat Jul 26, 2003 6:59 am    Post subject: Reply with quote

Papillon wrote:
Code:
set ident [lindex [split $uhost @] 0]


Or with regexp:
Code:
regexp {^([^@]+)} $uhost _ ident



TsT, the regexp lover.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Papillon
Owner


Joined: 15 Feb 2002
Posts: 724
Location: *.no

PostPosted: Sat Jul 26, 2003 7:43 am    Post subject: Reply with quote

hehe
TsT, the regexp lover Smile
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
Back to top
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jul 26, 2003 8:13 am    Post subject: Reply with quote

Oh, I see Razz then there must be a faster way right ?? lol
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
EEggy
Op


Joined: 26 Sep 2002
Posts: 122

PostPosted: Sat Jul 26, 2003 1:25 pm    Post subject: Reply with quote

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

thank you
_________________
EEggy
Back to top
View user's profile Send private message
TsT
Voice


Joined: 04 Mar 2003
Posts: 16
Location: Strasbourg, France

PostPosted: Sun Jul 27, 2003 10:06 am    Post subject: Reply with quote

Papillon wrote:
hehe
TsT, the regexp lover Smile
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 Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Papillon
Owner


Joined: 15 Feb 2002
Posts: 724
Location: *.no

PostPosted: Sun Jul 27, 2003 3:23 pm    Post subject: Reply with quote

well, I'm not talkin about seconds... although with enough regexp's it will be Wink
You can test the difference with the time command
Code:
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 Smile
_________________
Elen sila lúmenn' omentielvo
Back to top
View user's profile Send private message MSN Messenger
TsT
Voice


Joined: 04 Mar 2003
Posts: 16
Location: Strasbourg, France

PostPosted: Mon Jul 28, 2003 5:43 am    Post subject: Reply with quote

It's true, I got proc1 is 3x more slower than proc2:
Quote:
% 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 Razz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Papillon
Owner


Joined: 15 Feb 2002
Posts: 724
Location: *.no

PostPosted: Mon Jul 28, 2003 5:56 am    Post subject: Reply with quote

hehe, add a string match then and try again Wink
_________________
Elen sila lúmenn' omentielvo
Back to top
View user's profile Send private message MSN Messenger
Fisherman
Guest





PostPosted: Sat Aug 30, 2003 10:28 am    Post subject: Reply with quote

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 Smile ... can someone tell a tcl of that if exists?
Back to top
EEggy
Op


Joined: 26 Sep 2002
Posts: 122

PostPosted: Sat Feb 14, 2004 10:24 pm    Post subject: Reply with quote

Hi Sir_Fz,

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

advance thanks
_________________
EEggy
Back to top
View user's profile Send private message
TALES
Halfop


Joined: 09 Nov 2003
Posts: 59
Location: Netherlands

PostPosted: Tue Feb 17, 2004 3:34 pm    Post subject: Reply with quote

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 Wink )

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)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber