Achim, On Thu, Jan 22, 2009 at 5:25 AM, Achim Hoffmann <a...@securenet.de> wrote: > !! I WANT to match '10.1.1.2' in '123_10.1.1.2a'! I'm sorry if I gave you > !! a wrong idea. > !! What I DON'T want to match is '10.1.1.222' in '10.1.1.2222', do you > !! get the slight difference? > > And how about: ad...@10.1.1.2 > or <!-- mailto:"admin" <some...@10.42.42.42> --> > and many more. > > So I'd at least allow the IP to be prefixed by [/@<"'] and suffixed by > [/>"'\s] > It's still not a 100% match ...
Right now all those cases are working, because the regex says something like: "be an ip address, and do not start/end with a digit or a dot", so... all of these match: - <10.10.10.10> - a...@10.10.10.10 - 10.10.10.10!! And these don't: - 10.10.10.1000 - 10.10.10.10. > Just my 2 pence > Achim > > !! > !! > We might try this as > !! > > [\s/]((?:(?:10|127)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|192\.168|169\.254|172\.0?(?:1[6-9]|2[0-9]|3[01]))(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2})[\s/] > > -- Andres Riancho http://w3af.sourceforge.net/ Web Application Attack and Audit Framework ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ W3af-develop mailing list W3af-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/w3af-develop