Aquila
Licat volare si super tergum Aquila volat
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

forbid with PCRE - C plugin for aquila

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Aquila Forum Index -> Patches
View previous topic :: View next topic  
Author Message
rvicentiu



Joined: 16 Sep 2006
Posts: 15
Location: Romania

PostPosted: Mon Feb 05, 2007 4:22 pm    Post subject: forbid with PCRE - C plugin for aquila Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Jove
Site Admin


Joined: 02 Jan 2006
Posts: 134

PostPosted: Wed Mar 07, 2007 1:10 am    Post subject: Reply with quote

cool Smile

will test the patch on 0.1.11 and apply if it seems stable.
Back to top
View user's profile Send private message Send e-mail
rvicentiu



Joined: 16 Sep 2006
Posts: 15
Location: Romania

PostPosted: Thu Mar 08, 2007 5:04 pm    Post subject: Reply with quote

thanks Smile

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 Very Happy .

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
View user's profile Send private message Visit poster's website Yahoo Messenger
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.    Aquila Forum Index -> Patches All times are GMT
Page 1 of 1

 
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


Powered by phpBB © 2001, 2005 phpBB Group
Views