[wp-hackers] wp-denyhost

Kimmo Suominen kimmo at global-wire.fi
Fri Apr 18 07:51:50 GMT 2008


On Fri, Apr 18, 2008 at 09:38:05AM +0200, Per Søderlind wrote:
> Personally, I'm going to use the first three octets e.g. 4.12.32.%, if you
> are in the neighborhood of 4.12.32.1 (i.e. 4.12.32.*) it's your bad. 

Living dangerously, eh?  Delegations smaller than /24 are common, and it
is not possible to freely pick your neighborhood on the Internet like
one can when bying a house.

Since you are parsing IP addresses, I'd like to mention IPv6.  Picking
octets can get a bit tricky with just regular expressions.

    beowulf.gw.com has address 204.80.150.34
    beowulf.gw.com has IPv6 address 2001:14b8:1ee::34

    pyry.gw.com has address 204.80.150.129
    pyry.gw.com has IPv6 address 2001:14b8:1ef:8000::226

> The next version will use = instead of LIKE.

Being deterministic and simple, it is my favorite. :)

Best regards,
+ Kimmo
-- 
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>



More information about the wp-hackers mailing list