This is the flag for the -R option. "always" is more appropriate than
"all," since "resolveall.nse" does something different, and there is a
"resolve_all" function that does that thing as well, unrelated to the -R
option.
Fixed a discrepancy between the number of targets selected with -iR and
the number of hosts scanned. Because "up" hosts did not count towards
the number of hosts in a hostgroup, Nmap would run an extra Ping scan
phase on that number of new targets before scanning. Those extra targets
in the last hostgroup would result in output like "Nmap done: 1056 IP
addresses" when the user specified -iR 1000.
https://security.stackexchange.com/questions/138150/scans-more-ips-than-asked
On reading 'T', 'U', 'S', or 'P', getpts_aux would unconditionally
consume the character before checking to see whether it was followed by
a ':'. You could insert 'T', 'U', 'S', or 'P' in several places and it
would just be ignored, which is different treatment than other letters
got.
Behavior before:
nmap -p 9
# scans port 9
nmap -p discard
# scans port 9
nmap -p Tdiscard
# scans port 9
nmap -p T:Tdiscard
# scans port 9
nmap -p Tdi*ard
# scans port 9
nmap -p Xdiscard
# Error #485: Your port specifications are illegal. Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"
Behavior after:
nmap -p 9
# scans port 9
nmap -p discard
# scans port 9
nmap -p Tdiscard
# Error #485: Your port specifications are illegal. Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"
nmap -p T:Tdiscard
# Error #485: Your port specifications are illegal. Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"
nmap -p Tdi*ard
# Error #485: Your port specifications are illegal. Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"
nmap -p Xdiscard
# Error #485: Your port specifications are illegal. Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"
clang 3.4.1 on FreeBSD gave this warning:
nmap.cc:3064:48: warning: use of logical '||' with constant operand
[-Wconstant-logical-operand]
return file_is_readable(filename_returned) || 1;
nmap.cc:3064:48: note: use '|' for a bitwise operation
Changed to match the intent: return 1 if file_is_readable returns 0, otherwise
return that non-0 value.