if (host.startsWith("smb://")) host = host.substring(6);
final int p = host.indexOf('/',0);
if (p >= 0) host = host.substring(0, p);
ia.add(Domains.dnsResolve(host));
}
final Scanner scanner = new Scanner(ia, CONCURRENT_RUNNER, timeout);
if (post.get("scanftp", "").equals("on")) scanner.addFTP(bigrange);
if (post.get("scanhttp", "").equals("on")) scanner.addHTTP(bigrange);
if (post.get("scanhttps", "").equals("on")) scanner.addHTTPS(bigrange);
if (post.get("scansmb", "").equals("on")) scanner.addSMB(bigrange);
scanner.start();
scanner.terminate();
if ("on".equals(post.get("accumulatescancache", "")) && !"scheduler".equals(post.get("rescan", ""))) {
Scanner.scancacheExtend(scanner, validTime);
} else {
Scanner.scancacheReplace(scanner, validTime);
}
}
if (post.containsKey("scan") && "intranet".equals(post.get("source", ""))) {
final Scanner scanner = new Scanner(Domains.myIntranetIPs(), CONCURRENT_RUNNER, timeout);
if ("on".equals(post.get("scanftp", ""))) scanner.addFTP(bigrange);
if ("on".equals(post.get("scanhttp", ""))) scanner.addHTTP(bigrange);
if ("on".equals(post.get("scanhttps", ""))) scanner.addHTTPS(bigrange);
if ("on".equals(post.get("scansmb", ""))) scanner.addSMB(bigrange);
scanner.start();
scanner.terminate();
if ("on".equals(post.get("accumulatescancache", "")) && !"scheduler".equals(post.get("rescan", ""))) {
Scanner.scancacheExtend(scanner, validTime);
} else {
Scanner.scancacheReplace(scanner, validTime);
}