From c79f687110df9c5bc3361e7b2d503ce71fd83515 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 9 Jul 2013 11:42:13 +0200 Subject: [PATCH] enhanced the network scanner: find more hosts automatically by removal of common subdomains before application of protocol-specific prefix --- htroot/CrawlStartScanner_p.html | 8 ++++---- htroot/CrawlStartScanner_p.java | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/htroot/CrawlStartScanner_p.html b/htroot/CrawlStartScanner_p.html index 501a7e07b..ba8b6e191 100644 --- a/htroot/CrawlStartScanner_p.html +++ b/htroot/CrawlStartScanner_p.html @@ -77,15 +77,15 @@ again and add new sites automatically to indexer.
     Sites that do not appear during a scheduled scan period will be excluded from search results. diff --git a/htroot/CrawlStartScanner_p.java b/htroot/CrawlStartScanner_p.java index bbddf487a..22a15b001 100644 --- a/htroot/CrawlStartScanner_p.java +++ b/htroot/CrawlStartScanner_p.java @@ -155,6 +155,16 @@ public class CrawlStartScanner_p Collection scanbase = new ArrayList(); if (host.length() > 0) { ip = Domains.dnsResolve(host); if (ip != null) scanbase.add(ip); + if (host.startsWith("ftp.") || host.startsWith("www.") || + host.startsWith("blog.") || host.startsWith("wiki.") || + host.startsWith("forum.") || host.startsWith("forums.") || + host.startsWith("events.") || host.startsWith("bugs.")) { + host = host.substring(host.indexOf('.') + 1); + if (!hostSet.contains(host)) { + ip = Domains.dnsResolve(host); + if (ip != null) scanbase.add(ip); + } + } if (scanftp && !hostSet.contains("ftp." + host)) { ip = Domains.dnsResolve("ftp." + host); if (ip != null) scanbase.add(ip);