1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 10:59:02 +00:00
Commit Graph

9665 Commits

Author SHA1 Message Date
dmiller
c0628fd141 Report IPv4 and IPv6 addresses resolved for each host
Previously, we would only request IPv4 addresses by default, or only
IPv6 when scanning with -6. Now, we'll request both (by not passing an
address family in the hints to getaddrinfo) and report them all in the
"Other addresses" line. This should encourage more users to scan with
-6. Additionally, it allows us to catch and report attempts to scan
IPv6-only hosts via IPv4, where previously we would just say "Failed to
resolve"

Closes #76
2015-03-11 04:14:26 +00:00
dmiller
fbbb64a190 Silence warnings: 'Makefile.in seems to ignore the --datarootdir setting' 2015-03-11 04:14:24 +00:00
dmiller
67be9e3ef9 Mark some Make targets as .PHONY 2015-03-10 13:16:58 +00:00
dmiller
270d1418fe Update OS X build info for minimum 10.8 (Mountain Lion) 2015-03-10 04:26:24 +00:00
dmiller
1cd6c40bf9 Keep phony targets out of the prereqs for ncat itself, otherwise it is built every time 2015-03-10 03:52:44 +00:00
dmiller
596675939d Let nmap-update be built alone (make build-nmap-update) 2015-03-10 03:52:42 +00:00
dmiller
cf6639e2b8 Separate libapr and libsvn LIBS variables in nmap-update Makefile 2015-03-07 05:37:42 +00:00
dmiller
f934e350a8 Keep -lssl and friends out of LIBS for Ncat, allows overriding with static libs 2015-03-07 05:37:40 +00:00
dmiller
564f654747 Fix leftovers from the whois => whois-ip name change 2015-03-07 04:24:31 +00:00
dmiller
55c3348fae Use tls.client_hello defaults for some scripts 2015-03-06 20:00:00 +00:00
dmiller
1fd4b3edd8 Use some sane defaults in tls.client_hello 2015-03-06 19:59:59 +00:00
dmiller
40945dc702 Send SSLv3 as record version in ClientHello for compatibility 2015-03-06 19:59:57 +00:00
dmiller
ee1156eb51 Fix a NULL pointer dereference in libdnet-stripped
Reported and diagnosed by Gisle Vanem.

Fixes #70
2015-03-05 22:09:49 +00:00
dmiller
e8f34f61a3 Statically link OpenSSL on OS X
Using the macports version, which is up-to-date, instead of the outdated
version included in the 10.5 SDK. As we update the minimum supported
version of OS X, that would improve, but not by much: 10.9 is still on
0.9.8y
2015-03-05 14:17:45 +00:00
fyodor
6e218d7d7f Regenerate man pages from the source XML 2015-03-04 02:58:45 +00:00
fyodor
8c680628a4 Add udp port 64738 for Murmur to nmap-services. It is the server-side software for Mumble voice chat software 2015-03-04 02:58:07 +00:00
dmiller
580c2555ea Disable libnl by default when building with included libpcap
Libpcap only needs libnl for monitor-mode sniffing. Disabling it lets us
not worry about which -lnl or -lnl-3 linker argument to include in our
own LIBS, so Nmap builds properly no matter whether libnl is present or
not.
2015-03-03 17:52:12 +00:00
dmiller
2e57f72bb0 Restrict http-cisco-anyconnect to https. Closes #62 2015-03-03 17:52:09 +00:00
dmiller
c19023dc0c UDP payload for DTLS 2015-03-03 04:48:19 +00:00
dmiller
e2bfa97920 Replace instances of bin.pack('A', x), which is equivalent to tostring(x), and a no-op on strings 2015-03-03 04:48:18 +00:00
dmiller
03110e7e89 String concat cleanup grab-bag
Mostly just eliminating concatenation-reassignments by chaining
concatenations, reordering assignments to allow better use of bin.pack,
and using tables to store intermediate results before concatenating
them. Used strbuf as a quick fix in dhcp.lua. Eliminated some unused
string variables in vulns.lua.
2015-03-02 14:39:29 +00:00
dmiller
c1b2429efd Remove some more creative ways of building a literal byte 2015-03-02 13:47:45 +00:00
dmiller
ea58c6bebb Replace chained concatenation reassignment with simple concatenation
Example:

x = y
x = x .. z

Fixed:

x = y
.. z

This simple fix would save 1 string creation/deletion. Most changes
involve many more than this.
2015-03-02 13:47:42 +00:00
dmiller
3025022f98 Optimize stdnse.debug and stdnse.verbose
Unnecessary, probably, but this eliminates 2 of 7 string
creations/collections due to concatenation and reassignment. Also
eliminates 2 unneeded table lookups and tests (since host always has
host.ip and port always has port.number), and eliminates 1 extra test
for prerule and postrule scripts, since we can't have a port if we don't
have a host.
2015-03-01 04:18:33 +00:00
dmiller
d641d00031 Simplify format_get_indent since all indents are spaces for a long time now. 2015-03-01 04:18:32 +00:00
dmiller
4d106cbe23 Remove unneeded requires 2015-02-28 12:43:59 +00:00
dmiller
fac667e621 Bugfixes in json.lua
A few bugs crept in during the conversion to LPEG parsing:

1. Unicode parsing of UTF-16 surrogate pairs returned an ending position
that was off by 2, so that the last 2 characters in the escape code were
parsed as literal characters.

2. Arrays and objects were not being tagged as such with make_array and
make_object during parsing.

This commit fixes these bugs, and returns to using unicode.utf8_enc for
UTF-8 encoding instead of a separately-defined function. Also, the tests
at the end (which were helpful in finding both of the bugs above) were
converted to unittest.lua tests.
2015-02-28 12:43:43 +00:00
dmiller
41c4b9fbc8 Fix issues with afp-serverinfo using non-standard format library 2015-02-27 20:00:59 +00:00
dmiller
0e74dd7a35 Replace some string.char and bin.pack calls with literals 2015-02-27 19:42:56 +00:00
dmiller
204d37e4d7 Replace packet.toip* and ip*tobin with ipOps.ip_to_str and str_to_ip 2015-02-27 19:42:46 +00:00
dmiller
4f0518bd93 Replace concat-loop padding with string.rep 2015-02-27 14:55:42 +00:00
dmiller
e275a96c72 Use string.gsub instead of looped concat to modify strings 2015-02-27 14:55:29 +00:00
dmiller
d16772a8a8 Simplify bencode parsing and random string gen in bittorrent.lua 2015-02-27 14:55:26 +00:00
dmiller
9d5c8962dd Fix error message in ipOps.fromdword 2015-02-27 14:55:25 +00:00
dmiller
10dce0382c Clean up string concatenations
Building a string with var = var .. "something" has miserable time
complexities. This commit cleans up a lot of that in scripts, focusing
on packing of data with bin.pack and concatenations within loops.
Additionally, a few instances were replaced with string.rep
2015-02-25 19:58:42 +00:00
dmiller
ddb3905b20 Avoid excessive string concatenations
psl_tree now takes an accumulator argument. It adds lines to the result
table instead of concatenating them together in a string. Then psl_print
concats all the lines together.
2015-02-25 19:58:35 +00:00
dmiller
afd025c191 Lua 5.2 allows null chars in patterns, so this hack is unnecessary 2015-02-25 19:58:33 +00:00
henri
828db443b2 Fixed a TOCTOU race in mmapfile()
Let open() fail in case of a missing file, then use fstat on the
returned file descriptor to get the actual file size.

Reported by Camille Mougey.
2015-02-25 16:36:42 +00:00
dmiller
db717c7543 Standardize random string generation on stdnse.generate_random_string 2015-02-25 05:06:08 +00:00
dmiller
f6733b2d89 Replace msrpc.random_crap with stdnse.generate_random_string 2015-02-25 05:06:05 +00:00
dmiller
8f939279ca Let charset arg to stdnse.generate_random_string be a string
The charset argument was intended to be a table, since Lua doesn't allow
indexing strings with []. Unfortunately, irc-brute and tftp-enum passed
a string instead, which meant that the output was always the empty
string. This change allows both formats, and fixes those scripts.

irc-brute and tftp-enum had been broken since r33632 (no released
version of Nmap)
2015-02-25 05:06:03 +00:00
dmiller
3ee9fee2e2 XML structured output for afp-serverinfo.nse 2015-02-25 03:34:33 +00:00
dmiller
c6b8199c14 Use string.gsub to strip nulls instead of a lua loop. 2015-02-25 03:34:31 +00:00
dmiller
b136a4a80f Replace lua function with equivalent bin.unpack 2015-02-25 03:34:30 +00:00
dmiller
66e235b98e Replace bacnet hex blobs with full dissection 2015-02-24 03:57:32 +00:00
dmiller
6b9796d86a Add Vendor Name to bacnet-info [Stephen Hilt] 2015-02-24 03:57:30 +00:00
dmiller
a5b3aa1314 Remove references to deprecated -P* options in error message
The message stating that an unknown -P* option was used contained
references to old, deprecated forms:

-PT (now -PA)
-PB (now -PE -PA)
-PI (now -PE)

Additionally, -PR was missing.
2015-02-22 21:51:00 +00:00
henri
d7a3d43eb6 Reduce CPU consumption with nsock engine poll
Entering nsock_loop() with the poll engine activated and no registered FD
(timers only, for instance) should not directly return, but sleep until next
timeout.
2015-02-21 21:15:21 +00:00
henri
7b02dea019 Remove dead code: einfo->evlen cannot be zero. 2015-02-21 21:15:15 +00:00
dmiller
febc009a13 Fix -PE for IPv6 2015-02-20 18:56:39 +00:00