Sometimes (all the time?) hosts are "cloned" or deep-copied instead of being
copied by reference, so testing whether a host is "in" a scan is insufficient.
Now we check by address, the same way that Zenmap uses to determine 2 hosts are
the "same" for merging their output.
Also, avoid considering a scan as having unsaved changes if the comment field is
merely focused but unchanged.
When creds.lua is used without usernames (like in snmp-brute.nse), the
credentials could not be sorted because they are sorted first by
username, which is nil and cannot be compared. Now the script first
checks that both values are non-nil (and true) before comparing them.
SSLStrip is not the only service to respond to the GenericLines probe
with the "HTTP 400 Bad Request" match: TwistedWeb and at least one
home router does too. The softmatch will allow these other services
to be queried by more specific probes.
It would obviously be better to find a better way of matching SSLStrip
and this softmatch may yet be deleted if it causes services to be
erroneously labelled as sslstrip where there is no better match.
See thread at http://seclists.org/nmap-dev/2014/q1/337
The HLIM feature was miscategorizing probes where the route from the
target was shorter than the route to the target. This would result, e.g.
in a distance calculation of 9 and a received hop limit of 57. Adding
the distance to the hop limit remaining gave a guessed initial hop limit
of 66, which would exceed the "64" category. In IPv4 fingerprints, we
put the TG test (initial TTL guess) as a range of 5 up or down from the
expected number to allow for this and other interference. This patch
does the same for IPv6.
- smb-ls parameter `path` is now optional (defaults to '\').
- smb-ls parameter `maxdepth` now defaults to 1 (no recursion)
instead of 0 (infinite recursion).
- smb-ls has a new `shares` parameter to specify a comma-separated
list of shares to browse.
- smb-enum-shares adds found shares to an array in the host
registry, and smb-ls uses this array when no `share` or `shares`
parameter have been specified.
Patch by Pierre LALET <pierre.lalet@cea.fr>