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 

Melts NickChecker against flood bots
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Oct 29, 2004 6:08 pm    Post subject: Reply with quote

[R] wrote:
dont be nasty

No one is being "nasty", we're just getting a little frustrated with your apparent unwillingness to comprehend anything. I have discussed with you on more than one occassion in many earlier posts about READING what is posted and what is contained in scripts and I have also told you that we will help those that will help themselves first! These forums exist to assist people who are making an effort to learn and it's expected they have tried all alternatives before asking for assistance. You have been pointed in the right direction so many times I've lost count and yet there's no evidence of any effort on your part.

With some scripts, if there is an actual error, then contacting the script author is always the best option and should be done before posting on the eggdrop forums.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Sat Oct 30, 2004 9:07 am    Post subject: Reply with quote


If you can't make yourself one, don't blame others scripts for being worthless, atleast they put effort to build them, but as we can clearly see you don't seem to do that as well. If your reply is "I DON'T KNOW HOW TO SCRIPT TCL", neither did I a year ago, but I learned from seeing other scripts and by gaining knowledge by reading manuals and seeing tutorials.


Since you seem to be criticizing other people's fine codes too much and do not have worth yourself to make one, here try mine:

(It's not released publicly so there is nothing a user can set or do, neither it is in the best shape of code, so make use if it, if you can!)

Code:

#Set channels to activate drone-nick kick on.
set dronechans "#mychan1 #mychan2"

#Set the time to ban the drone for.
set dronebantime "30"

bind join - * drone:nick

proc drone:nick {nick uhost hand chan} {
 global botnick dronechans dronebantime
  if {([lsearch -exact [split [string tolower $dronechans]] [string tolower $chan]] != -1)} {
  if {([string length [string trimleft [string tolower [lindex [split $uhost "@"] 0]] "~"]] >= 4) && ([string length $nick] >= 6) && ([string length $nick] <= 12) && (![regexp -nocase "a" $nick] && ![regexp -nocase "e" $nick] && ![regexp -nocase "i" $nick] && ![regexp -nocase "o" $nick] && ![regexp -nocase "u" $nick] && ![regexp -nocase "mrs" $nick] && ![regexp -nocase "mr" $nick] && ![regexp -nocase "xyz" $nick] && ![regexp -nocase "dj" $nick] && ![regexp -nocase "chr" $nick] && ![regexp -nocase "fr" $nick] && ![regexp -nocase "msn" $nick] && ![regexp -nocase "dr" $nick]) && (([regexp {^[^aeiou_^-`]+$} $nick] && [regexp {[^0-9]?$} $nick]) || [regexp {^[A-z][0-9]{1,}$} $nick] || [regexp {^(\w){3}(\d){2}\w(\d){3}$} $nick] || [regexp "_\[0-9\]\[0-9\]$" $nick] || [regexp "^\[a-z\]\[a-z\]-" $nick] || [regexp "\[0-9\]\[0-9\]\[0-9\]$" $nick] || [regexp -nocase "gv" $nick] || [regexp -nocase "gz" $nick] || [regexp -nocase "qb" $nick] || [regexp -nocase "qc" $nick] || [regexp -nocase "qd" $nick] || [regexp -nocase "qf" $nick] || [regexp -nocase "qg" $nick] || [regexp -nocase "qh" $nick] || [regexp -nocase "qk" $nick] || [regexp -nocase "qm" $nick] || [regexp -nocase "qn" $nick] || [regexp -nocase "qp" $nick] || [regexp -nocase "qj" $nick] || [regexp -nocase "qr" $nick] || [regexp -nocase "qs" $nick] || [regexp -nocase "qt" $nick] || [regexp -nocase "qw" $nick] || [regexp -nocase "qv" $nick] || [regexp -nocase "qx" $nick] || [regexp -nocase "qz" $nick] || [regexp -nocase "xd" $nick] || [regexp -nocase "xf" $nick] || [regexp -nocase "xg" $nick] || [regexp -nocase "xh" $nick] || [regexp -nocase "xk" $nick] || [regexp -nocase "xm" $nick] || [regexp -nocase "xn" $nick] || [regexp -nocase "xq" $nick] || [regexp -nocase "xr" $nick] || [regexp -nocase "xt" $nick] || [regexp -nocase "xv" $nick] || [regexp -nocase "xz" $nick] || [regexp -nocase "zb" $nick] || [regexp -nocase "zc" $nick] || [regexp -nocase "zd" $nick] || [regexp -nocase "zf" $nick] || [regexp -nocase "zh" $nick] || [regexp -nocase "zm" $nick] || [regexp -nocase "zq" $nick] || [regexp -nocase "zr" $nick] || [regexp -nocase "zt" $nick] || [regexp -nocase "zv" $nick] || [regexp -nocase "zx" $nick] || [regexp -nocase "kz" $nick] || [regexp -nocase "lx" $nick] || [regexp -nocase "vb" $nick] || [regexp -nocase "vf" $nick] || [regexp -nocase "vg" $nick] || [regexp -nocase "vh" $nick] || [regexp -nocase "vk" $nick] || [regexp -nocase "vm" $nick] || [regexp -nocase "vn" $nick] || [regexp -nocase "vq" $nick] || [regexp -nocase "vx" $nick] || [regexp -nocase "vw" $nick] || [regexp -nocase "wj" $nick] || [regexp -nocase "jwm" $nick] || [regexp -nocase "ql" $nick] || [regexp -nocase "qy" $nick] || [regexp -nocase "xb" $nick] || [regexp -nocase "xc" $nick] || [regexp -nocase "xj" $nick] || [regexp -nocase "xl" $nick] || [regexp -nocase "xp" $nick] || [regexp -nocase "xs" $nick] || [regexp -nocase "xw" $nick] || [regexp -nocase "zg" $nick] || [regexp -nocase "zj" $nick] || [regexp -nocase "zk" $nick] || [regexp -nocase "zl" $nick] || [regexp -nocase "zn" $nick] || [regexp -nocase "zp" $nick] || [regexp -nocase "zs" $nick] || [regexp -nocase "zw" $nick] || [regexp -nocase "zx" $nick] || [regexp -nocase "zy" $nick] || [regexp -nocase "vc" $nick] || [regexp -nocase "vd" $nick] || [regexp -nocase "wx" $nick] || [regexp -nocase "vp" $nick] || [regexp -nocase "vs" $nick] || [regexp -nocase "vt" $nick] || [regexp -nocase "vp" $nick] || [regexp -nocase "vy" $nick] || [regexp -nocase "vz" $nick] || [regexp -nocase "wq" $nick] || [regexp -nocase "wx" $nick] || [regexp -nocase "wz" $nick]) > 0} {
    if {[botisop $chan] && (![isbotnick $nick]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand mnof|mnof $chan])} {
      putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]" -next
      putquick "KICK $chan $nick :0,1 Random/Drone Nick Kick 12,0 - Possbile 2Spam/Trojan/Virus/Worm 12infected drone or a 2Botnet/Spambot/Floodbot/Clonebot 12detected."
      timer $dronebantime "pushmode $chan -b *!*@[lindex [split $uhost @] 1]"
      }
    }
  }
}

_________________
·­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
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sat Oct 30, 2004 7:55 pm    Post subject: Reply with quote

/me calls the regexp police
Back to top
View user's profile Send private message Send e-mail
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Sat Oct 30, 2004 7:55 pm    Post subject: Reply with quote

Regardless of what he (I'm talking about [R] user) said is it's opinion on things, which should be kept for yourself not expressed in public, at least not in that way. Anyway, don't start an argue on this! Evil or Very Mad

@ awyeah:
Man, you got a lot of regexp'es wich can be replaced with just a bigger one which will at least speed it a bit. Also, IMHO there is no point of the "(![isop $nick $chan]) && (![isvoice $nick $chan]) " since as I've said before is an on-join check. Mr. Green
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Sun Oct 31, 2004 11:41 am    Post subject: Reply with quote

That's why I said caesar, ITS NOT IN THE BEST OF SHAPE.

Btw how do I add multiple regexp's like combine these ones to fit into one? I was rather thinking to set the patterns as a list and do a string match with a foreach loop for each element in the list. Wouldn't that be better you say? string match is also faster. Plus I can also match numbers, regexp doesn't give me the choice to match specific numbers (0-9).

Like this?

Code:

if {[regexp -nocase {qx} {wz} {br} $text]} {

_________________
·­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
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sun Oct 31, 2004 1:49 pm    Post subject: Reply with quote

You can use | as a seperator.
And you can search for specific numbers, you do that the same way you would search for any other char, or if you want a number within a range, use, say [3-9], if you want to check for a number between 3-9.
Code:
regexp -nocase {qx|wz|br|1|[7-9]} $text

will return 1 if there is 'qx', 'wz', 'br', or the numbers 1, 7, 8 or 9 in $text.
Back to top
View user's profile Send private message Send e-mail
Stealthx
Halfop


Joined: 01 Oct 2004
Posts: 68
Location: StealthBox

PostPosted: Mon Nov 01, 2004 1:35 am    Post subject: Reply with quote

- awyeah

How does your code (the code with lots of regexp) works? It's base on the drone random nick name and if it matched, it does a ban on the particular drone's IP?
_________________
+ Stealth Box +
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Mon Nov 01, 2004 12:33 pm    Post subject: Reply with quote

Stealthx:
If it doesn't work I wouldn't be pasting it over here now, would I? Read the code and you will understand. It matches words between the " "'s in the regexp's but has a threshold for matching as well.

gb:
I was pertaining to:

if {[regexp -nocase "xyz0" $text]} {
#Will give an error

However [0-9] will not give an error, but here I want to match a specific number, not any number within a given range.
_________________
·­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
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Mon Nov 01, 2004 1:15 pm    Post subject: Reply with quote

Quote:
regexp -nocase "xyz0" $text

works just fine here
Quote:
% set bleh abcxyz0abc
abcxyz0abc
% regexp -nocase "xyz0" $bleh
1

I even tested it on 3 different tcl versions (8.0.5, 8.3.5 and 8.4.6).

And if you look at my example it bot matches a single digit, 1, and a range, 7-9.
Back to top
View user's profile Send private message Send e-mail
demond
Revered One


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

PostPosted: Mon Nov 01, 2004 1:56 pm    Post subject: Reply with quote

random nick drone flood would be more effectively detected & prevented if all that regexp stuff is implemented in a module

in C you have regcomp() and regexec() which compile & respectively execute a regexp; that means you only have to regcomp() once and then repeatedly to regexec(); in TCL you don't have separate compile & execute functions and every time you do a [regexp] it gets compiled again, slowing down the check-on-join process which would have a significant performance impact during drone join/part flood (I can only imagine the CPU usage of awyeah's solution Razz no offense; mine should be faster, but nevertheless still far less effective compared to an equivalent C module)
Back to top
View user's profile Send private message Visit poster's website
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Mon Nov 01, 2004 2:15 pm    Post subject: Reply with quote

Modules are faster than tcl scripts and that's a proved fact. But since not all users know how to make a c module they stick with either they (think or realy do) know or others that can help, like tcl scripting. Mr. Green
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Nov 03, 2004 9:19 am    Post subject: Reply with quote

Wish I was good in C, unfortunately am not.
_________________
·­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: Sun Apr 10, 2005 3:02 pm    Post subject: Reply with quote

I was wondering if there could be a way to minimize this and combine all these regexps into one maybe, hence time can be saved especially if we are dealing with fast onjoin flood bots with random nicks and so.

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 [llength [regexp -all -inline \[$vowel\]{3,} $str]]
   incr score [llength [regexp -all -inline \[$cnant\]{3,} $str]]
   incr score [llength [regexp -all -inline \[$other\]{2,} $str]]
   incr score [llength [regexp -all -inline \[$digit\]{2,} $str]]
   incr score [llength [regexp -all -inline \[$vowel$other\]{4,} $str]]
   incr score [llength [regexp -all -inline \[$cnant$other\]{4,} $str]]
   incr score [llength [regexp -all -inline \[$vowel$digit\]{4,} $str]]
   incr score [llength [regexp -all -inline \[$cnant$digit\]{4,} $str]]
   incr score [llength [regexp -all -inline \[$other$digit\]{3,} $str]]
   incr score $score
}


For the first four, something like this maybe could do it:
Code:

   incr score [llength [regexp -all -inline {\[$vowel\]{3,} \[$cnant\]{3,} \[$other\]{2,} \[$digit\]{2,}} [string tolower $str]]]

_________________
·­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
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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