| View previous topic :: View next topic |
| Author |
Message |
rvicentiu

Joined: 16 Sep 2006 Posts: 15 Location: Romania
|
Posted: Mon Feb 05, 2007 4:22 pm Post subject: forbid with PCRE - C plugin for aquila |
|
|
Here's the patch file I've been using(worked with 0.1.9, didn't test with 0.1.10)
http://pub.netbyte.ro/patch-aq-forbid2
After applying the patch you'll have to generate the .configure script again and the makefiles (run aclocal autoconf automake autoheader etc...), there might be an easier way to do this but I haven't done much programming on linux...
Here's just the source code of the plugin, if the patch doesn't work you'll have to manually add it to aquila...
http://pub.netbyte.ro/pi_forbid.c
The plugin needs libPCRE for complete functionality (perl regular expression support) but should work without although it will only do strstr matches. I've been using it without problems on my aquila 0.1.9 and previous versions for a few months now.
A few regexps:
((25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]?\d?\d)
catches IPs
([\w-]+\.)+[a-zA-Z]{2,4}([^a-zA-Z]|$)
catches web addresses(a bit too generic)
(\b.+\b) (\1 ){4}|(.{1,6})\3{13}
should catch lame flood attempts |
|
| Back to top |
|
 |
Jove Site Admin

Joined: 02 Jan 2006 Posts: 134
|
Posted: Wed Mar 07, 2007 1:10 am Post subject: |
|
|
cool
will test the patch on 0.1.11 and apply if it seems stable. |
|
| Back to top |
|
 |
rvicentiu

Joined: 16 Sep 2006 Posts: 15 Location: Romania
|
Posted: Thu Mar 08, 2007 5:04 pm Post subject: |
|
|
thanks
I would have posted it sooner but I didn't think there would be much interest in it. I wrote it because I really don't like lua and it's a lot faster .
As far as I know there aren't any bugs. There may be a few too many DPRINTF that I forgot in there and can be removed (they may generate too much text on debug versions...). |
|
| Back to top |
|
 |
|