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 

flooders
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Mon Jun 13, 2005 2:54 am    Post subject: Reply with quote

I think this should be:
Code:

set vowels [regexp {[aeiouy]} $nick]


this:
Code:

set vowels [regexp -all {[aeiouy]} $nick]

_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Mon Jun 13, 2005 2:59 am    Post subject: Reply with quote

To detect, these types of nicks:

Code:

i556565y (~zlebots@24.3.46.214)
u133194x (~ljfhooqv@213.163.29.5
f639374j (~chvueri@212.103.191.71)


Just use:
Code:

if {[regexp -nocase {^[a-z]{1}[0-9]{6}[a-z]{1}$} $nick] && [string equal "~" [string index [lindex [split $uhost @] 0] 0]] && ([string length [string trimleft [lindex [spit $uhost @] 0] ~]] >= 7)} {



By the way demond, I wanted to ask you, what is the MAXIMUM THRESHOLD for your spam detector proc?

Which is the best and optimal performance threshold? I've seen it set to default on 17 or 18 normally. Any lower or higher than these numbers?
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Mon Jun 13, 2005 3:10 am    Post subject: Reply with quote

demond wrote:
Code:

scan $host {%[^@]} ident
set nick_digits [llength [regexp -all -inline -- {[0-9]} $nick]]
set ident_digits [llength [regexp -all -inline -- {[0-9]} $ident]]
set no_vowels [regexp {[aeiouy]} $nick]
if {$no_vowels && $nick_digits >= 3 && $ident_digits >= 3} {
  # ban it
}


Why do we specifically need to use llength in here with -inline? isn't -all already enough with regexp? Don't you think its a bit extra?

Code:

if {([regexp -all {[0-9]} $nick] >= 3) && ([regexp -all {[0-9]} [lindex [split $uhost @] 0]] >= 3) && ([regexp -all {[aeiouy]} $nick] == 0) && [string equal "~" [string index [lindex [split $uhost @] 0] 0]]} {
  # ban it
}


All we check here if, nick has 3 numbers, if ident has 3 numbers, if nick has no vowels.

Or we could do it like this, for these types of nicks:
i8148 (~e9993@201.22.23.44)

Code:

if {[regexp {^[a-z]{1}[0-9]{4}$} $nick] && [regexp {^[a-z]{1}[0-9]{4}$} [lindex [split $uhost @] 0]] && [string equal "~" [string index [lindex [split $uhost @] 0] 0]] && [string equal "5" [string length $nick]] && [string equal "5" [string length [string trimleft [lindex [split $uhost @] 0] ~]]} {

_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Jun 13, 2005 3:39 am    Post subject: Reply with quote

[regexp -inline] returns a list consisting of matched subexpressions, and we need to know how many of those are there (how many digits in this case), hence the [llength]

as of the maximum sb score, I don't know Razz experiment and find it...
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Jun 13, 2005 8:54 am    Post subject: Reply with quote

but if you use
Code:
regexp -all -- {[0-9]} $nick

it'll return the same result as
Code:
llength [regexp -all -inline -- {[0-9]} $nick]

That's what awyeah meant, and he's right.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Jun 13, 2005 2:06 pm    Post subject: Reply with quote

hmm that appears to be the case

in such case however, the TCL docs are incorrect:
Quote:

NAME
regexp - Match a regular expression against a string
SYNOPSIS
regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?
DESCRIPTION
Determines whether the regular expression exp matches part or all of string and returns 1 if it does, 0 if it doesn't, unless -inline is specified (see below).
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Jun 13, 2005 2:35 pm    Post subject: Reply with quote

Indeed Shocked they have the -all switch explained correctly though.
Quote:
-all
Causes the regular expression to be matched as many times as possible in the string, returning the total number of matches found. If this is specified with match variables, they will contain information for the last match only.

_________________
Follow me on GitHub

- Opposing

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


Joined: 01 Jul 2004
Posts: 78

PostPosted: Tue Jun 14, 2005 9:40 pm    Post subject: Reply with quote

Thanks everyone.

Demond, your procedure is working great, thank you.

I was wondering if it's possible in that procedure to ignore these special chracters or make them less sensitive _(underscore), brackets like [], {} , `[] ,\ because flooders don't use them, all they use random nick and idents.

thanks again
_________________
MM
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Jun 14, 2005 9:56 pm    Post subject: Reply with quote

this will lessen the weight of those punctuation chars:

Code:

proc sb:score {str} {
   set score 0
   set vowel "aeiouy"
   set cnant "bcdfghjklmnpqrstvwxz"
   set other "{}\\\[\\\]-_^`|\\\\"
   set digit "0123456789"
   set str [string tolower $str]
   incr score [regexp -all \[$vowel\]{3,} $str] ;# 3 and more adjacent vowels
   incr score [regexp -all \[$cnant\]{3,} $str] ;# 3 and more adjacent consonants
   incr score [regexp -all \[$other\]{3,} $str] ;# 3 and more adjacent punctuation chars
   incr score [regexp -all \[$digit\]{2,} $str] ;# 2 and more adjacent digits
   incr score [regexp -all \[$vowel$other\]{4,} $str] ;# 4 or more adjacent vowel/punctuation chars
   incr score [regexp -all \[$cnant$other\]{4,} $str] ;# 4 or more adjacent consonant/punctuation chars
   incr score [regexp -all \[$vowel$digit\]{4,} $str] ;# 4 or more adjacent vowel/digits
   incr score [regexp -all \[$cnant$digit\]{4,} $str] ;# 4 or more adjacent consonant/digits
   incr score [regexp -all \[$other$digit\]{3,} $str] ;# 3 or more adjacent puncuation/digits
   incr score $score ;# double the score
}


Last edited by demond on Tue Jun 14, 2005 10:04 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Jun 14, 2005 10:00 pm    Post subject: Reply with quote

if you wish to eliminate those chars completely, use this:

Code:

proc sb:score {str} {
   set score 0
   set vowel "aeiouy"
   set cnant "bcdfghjklmnpqrstvwxz"
   set digit "0123456789"
   set str [string tolower $str]
   incr score [regexp -all \[$vowel\]{3,} $str] ;# 3 and more adjacent vowels
   incr score [regexp -all \[$cnant\]{3,} $str] ;# 3 and more adjacent consonants
   incr score [regexp -all \[$digit\]{2,} $str] ;# 2 and more adjacent digits
   incr score [regexp -all \[$vowel$digit\]{4,} $str] ;# 4 or more adjacent vowel/digits
   incr score [regexp -all \[$cnant$digit\]{4,} $str] ;# 4 or more adjacent consonant/digits
   incr score $score ;# double the score
}


Last edited by demond on Tue Jun 14, 2005 10:05 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Jun 14, 2005 10:02 pm    Post subject: Reply with quote

oops... correction, see above
Back to top
View user's profile Send private message Visit poster's website
mm
Halfop


Joined: 01 Jul 2004
Posts: 78

PostPosted: Tue Jun 14, 2005 11:11 pm    Post subject: Reply with quote

thank you so much for your help and time
_________________
MM
Back to top
View user's profile Send private message
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Sun Feb 12, 2006 1:35 am    Post subject: Reply with quote

wcntgony is ~cpnhm@host217.200-45-47.telecom.net.ar
cxkyxkzt is ~asrbkjiu@host179.201-252-186.telecom.net.ar


can that script ban clones/drones who hav thse kind of nick and ident?
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Feb 12, 2006 2:44 am    Post subject: Reply with quote

xchannel can
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Sun Feb 12, 2006 10:13 am    Post subject: Reply with quote

whats the use of that x:whois ???
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3  Next
Page 2 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