Mercurial > dnsbl
diff src/scanner.cpp @ 143:ecb40aa3eaa5 stable-5-23
require two periods for ip addresses
author | carl |
---|---|
date | Tue, 10 Oct 2006 19:12:16 -0700 |
parents | df355d117199 |
children | 812c80305f26 |
line wrap: on
line diff
--- a/src/scanner.cpp Thu Sep 28 08:43:32 2006 -0700 +++ b/src/scanner.cpp Tue Oct 10 19:12:16 2006 -0700 @@ -1,6 +1,6 @@ /* -Copyright (c) 2004 Carl Byington - 510 Software Group, released under +Copyright (c) 2006 Carl Byington - 510 Software Group, released under the GPL version 2 or any later version at your choice available at http://www.fsf.org/licenses/gpl.txt @@ -1215,7 +1215,8 @@ // have a period, so at least two components, and no empty components in_addr ip; if (inet_aton((const char*)pending, &ip)) - memory->new_url((char*)pending); + // have an ip address if at least two periods + if (p1 != p2) memory->new_url((char*)pending); else { for (int i=0; i<count; i++) pending[i] = tolower(pending[i]); // is last component a tld?