article on blocking by subnets
David Relson
relson at osagesoftware.com
Tue Dec 3 02:43:12 CET 2002
At 08:26 PM 12/2/02, Barry Gould wrote:
>At 04:51 PM 12/2/2002, you wrote:
> >Have you the expertise to write the code? Would you care to?
>
>I'm not sure... it's been a LONG time since I've written any C.
>
>However, I'd be happy to suggest an algorithm:
>
>if (token is an IP address (in form a.b.c.d) )
>{
> create a new token for each of:
> class C net (a.b.c.0)
> class B net (a.b.0.0)
> class A net (a.0.0.0) (dunno if this is a good idea or not)
>
> and Evaluate or Store/Update them as appropriate, in addition to
> the original IP
>}
>
>things to beware of:
>mail agent/daemon version numbers can look like IP's
>
>Is it possible to use Regular Expressions, or would that involve
>non-standard C libraries?
>
>I'll try to see if I can come up with some numbers from my corpora as to
>whether this would be worthwhile.
Actually, I took a look at lexer.l. It already recognizes URL's and the
distribution code has the beginnings of code for returning multiple tokens
(or subtokens) from 1 call to the lexer. Apparently I thought of doing
something with URL's at on time, because my private copy of bogofilter has
some relevant code.
If we can figure out what is wanted, I can code it. However, I'm very
willing to leave the testing to others. Do I have any volunteers?
David
More information about the Bogofilter
mailing list