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.

Melts NickChecker against flood bots

Support & discussion of released scripts, and announcements of new releases.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

[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
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »


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: Select all

#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.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

/me calls the regexp police
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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:

@ 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. :mrgreen:
Once the game is over, the king and the pawn go back in the same box.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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: Select all

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.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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: Select all

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.
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

- 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 +
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

regexp -nocase "xyz0" $text
works just fine here
% 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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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 :P no offense; mine should be faster, but nevertheless still far less effective compared to an equivalent C module)
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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. :mrgreen:
Once the game is over, the king and the pawn go back in the same box.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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: Select all

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: Select all

   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.
==================================
Post Reply