1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-20 13:19:01 +00:00

Make --open imply --defeat-rst-ratelimit

This commit is contained in:
dmiller
2016-11-28 17:11:01 +00:00
parent 69d44d9738
commit 062d272d0f
3 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
# Nmap Changelog ($Id$); -*-text-*-
o The --open option now implies --defeat-rst-ratelimit. This may result in
inaccuracies in the numbers of "Not shown:" closed and filtered ports, but
only in situations where it also speeds up scan times. [Daniel Miller]
o Fix reverse DNS on Windows which was failing with the message "mass_dns:
warning: Unable to determine any DNS servers." This was because the interface
GUID comparison needed to be done case-insensitive. [Robert Croteau]

View File

@@ -769,6 +769,8 @@ void parse_options(int argc, char **argv) {
error("Warning: You specified a highly aggressive --min-hostgroup.");
} else if (strcmp(long_options[option_index].name, "open") == 0) {
o.setOpenOnly(true);
// If they only want open, don't spend extra time (potentially) distinguishing closed from filtered.
o.defeat_rst_ratelimit = 1;
} else if (strcmp(long_options[option_index].name, "scanflags") == 0) {
o.scanflags = parse_scanflags(optarg);
if (o.scanflags < 0) {

View File

@@ -655,8 +655,12 @@ void printportoutput(Target *currenths, PortList *plist) {
prevstate = istate;
}
if (prevstate != PORT_UNKNOWN)
if (prevstate != PORT_UNKNOWN) {
log_write(LOG_PLAIN, "\n");
if (o.defeat_rst_ratelimit) {
log_write(LOG_PLAIN, "Some closed ports may be reported as filtered due to --defeat-rst-ratelimit\n");
}
}
if (o.reason)
print_state_summary(plist, STATE_REASON_FULL);