1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-08 07:29:03 +00:00
Commit Graph

7543 Commits

Author SHA1 Message Date
david
e2a6682a55 todo typo. 2012-09-15 07:26:38 +00:00
david
bc197f1877 Whitespace. 2012-09-14 21:08:23 +00:00
dmiller
f97c8db5e8 Correct output for ssl-enum-ciphers against non-ssl
ssl-enum-ciphers was producing output against non-ssl services, listing
"least strength: strong" when there was no cipher matched. Fixed to
return nil in this case, and to clearly indicate when a protocol is
supported but does not support any of our ciphers (a very unlikely
situation! Had to artificially reduce attempted ciphers to test.)
2012-09-14 21:06:46 +00:00
david
3fb047e237 Don't assign any routes to interfaces that are not up. 2012-09-14 15:51:12 +00:00
dmiller
0c1fd3e9d9 Make all host filters case-insensitive
Also some cleanup of unused variables, other minor performance tweaks.
2012-09-13 20:24:19 +00:00
dmiller
74a750a855 Allow negative matching in Zenmap filters
nmap-dev thread: http://seclists.org/nmap-dev/2012/q3/788

Host filter and others can now take things like "os:!linux" to match
hosts without Linux OS.
2012-09-13 20:24:18 +00:00
dmiller
2f36d0b968 Fix date handling in ssl-cert
Was crashing on unparseable dates (example: "2147483647Z"). Now the
exact string is placed in structured output when it cannot be
normalized. Also, the structured-format timestamp is used for Normal
output for consistency; no timezone offset was previously displayed.
2012-09-13 20:23:07 +00:00
fyodor
d88d8720a9 Add a task to include OS guesses in XML output in more cases 2012-09-13 03:36:36 +00:00
fyodor
444bc5ea48 Add an http digest parsing task suggested by David 2012-09-13 03:32:40 +00:00
david
5cc7049402 Add structured output to http-auth.nse. 2012-09-13 03:01:18 +00:00
david
bfa954c5ea Add a lua-format Makefile target to format scripts/*.nse. 2012-09-13 00:17:42 +00:00
david
7b1c0155ba apt-get command for lua-format dependencies. 2012-09-13 00:17:40 +00:00
kroosec
ca43a6d59f Added http fingerprints by Jesper Kückelhahn for Sitecore CMS. 2012-09-12 21:57:49 +00:00
david
f66691ee08 Remove some ancient commented SearchResult test code. 2012-09-12 21:51:48 +00:00
robert
a9d060cb43 Prevent tftp-enum from incorrectly setting the port as closed when an error occurred (e.g. timeout when port is filtered). 2012-09-12 09:27:51 +00:00
fyodor
f98479160d Add a minor Nping bugfix to allow -c values higher than 4 billion and make -c 0 not stop at 4 billion 2012-09-12 07:18:06 +00:00
fyodor
2c6b5e7d24 The Nroff man pages aren't really able to render superscripts (AFAICT) and so 2^32 was rendering as just 232. So I changed it to just say that Nping will run continuously if '-c 0' is specified. If it really stops after 4 billion rounds, that is a bug that we should probably fix at some point 2012-09-12 07:16:41 +00:00
david
b32c5f617a CHANGELOG John Spencer for configure portability fixes. 2012-09-12 04:57:04 +00:00
david
ecf62c247a Check for and include <sys/select.h>.
This was reported as a build error by John Spencer using musl libc.
http://seclists.org/nmap-dev/2012/q3/776
2012-09-12 04:54:21 +00:00
david
739aca56d4 Whitespace. 2012-09-12 04:54:19 +00:00
david
fed81c865a Include <arpa/inet.h> in APR_CHECK_WORKING_GETNAMEINFO.
http://seclists.org/nmap-dev/2012/q3/777
2012-09-12 04:23:24 +00:00
david
2c092db698 Don't use exit in APR_CHECK_WORKING_GETNAMEINFO.
Same reason as r29737.

http://seclists.org/nmap-dev/2012/q3/777
2012-09-12 04:23:23 +00:00
david
b5b558f162 Don't use the clobbered rtmsg->rtm_family to look up interfaces.
This value gets clobbered after the netlink recvmsg. It was giving me a
bogus address family (234), which caused the call to getInterfaceByName
to fail:
Could not find interface wlan0 which was specified by -e

This seems to have been exposed by r29754. Specifying a source address
that is not on any actual route seems to result in a netlink query
result with 0 entries, and the changed value of rtm_family. (The fact
that there are no routes returned is not a problem, because we bail out
early when -e is given, now that getInterfaceByName works again.)
2012-09-11 23:50:21 +00:00
david
84fc27ee2d Make --route-dst option obey other command-line args.
--route-dst has been a useful debugging option, but it ran inline during
option processing and always used AF_UNSPEC to resolve names. Let it run
after options have been processed, so it can obey things like -6, -S,
and -e. Let it always resolve with o.af(), so you get different results:
  nmap --route-dst scanme.nmap.org
  nmap -6 --route-dst scanme.nmap.org
2012-09-11 21:00:47 +00:00
david
c1484a52a9 Wording, brevity. 2012-09-11 21:00:46 +00:00
david
bb075521ea Formatting in nmap.cc.
astyle -a -p -H -s2 -m2 nmap.cc
2012-09-11 20:43:24 +00:00
david
5b8c1090e5 Add specifiers for source address and interface in route_dst_netlink.
We previously restricted by destination address; do it for source
address as well. This can matter in some configurations.

http://seclists.org/nmap-dev/2012/q3/831

There still seems to be a problem with the wrong route being chosen with
--send-ip, but this patch is reported to work with --send-eth.
2012-09-11 18:39:42 +00:00
david
be636dacaf Factor out a add_rtattr_addr function to add a source or destination spec.
This is used to restrict what routes the Netlink layer will return to
us.
2012-09-11 18:39:40 +00:00
david
ba88cb4f5d Check for received packet in rpc-grind.nse.
The script was checking the returned data, but not the status. When
status is false, data is actually an error message. So in case of a
timeout, the script was receiving nil, "TIMEOUT" and interpreting
"TIMEOUT" as a response from the server. It looked like this:

Discovered open port 1434/udp on 127.0.0.1
NSE: rpc-grind: RPC checking function response data is not RPC.
NSE: Target port 1434 is not a RPC port.

This was reported by Christopher Clements.
http://seclists.org/nmap-dev/2012/q3/685
2012-09-11 00:39:04 +00:00
fyodor
ef5205b798 Note that Mac high resolution application icon is done 2012-09-10 23:58:48 +00:00
fyodor
ed217a04f5 Update todo with latest changes and ideas 2012-09-10 23:57:18 +00:00
david
a47d68a84f Typo. 2012-09-10 23:53:54 +00:00
david
303de03813 Apple broke the link to their icons doc. 2012-09-10 23:52:20 +00:00
david
690851ba2e Make a 512×512 OS X icon for Zenmap. 2012-09-10 23:50:16 +00:00
paulino
5071a66330 Fixes typo in output. 2012-09-10 23:33:14 +00:00
henri
a1d5763563 Fixed filename in header. 2012-09-10 21:03:17 +00:00
henri
68a1545c83 Added missing SVN properties and Id tags 2012-09-10 20:53:09 +00:00
henri
7dc93e0935 Close connection endpoint when receiving EOF on stdin. Patch by Michal Hlavinka. 2012-09-10 20:41:46 +00:00
henri
f9881bab18 In hostrule: return false if mountport is nil (prevents from crashing when accessed as a table, a couple lines below). 2012-09-10 14:45:21 +00:00
henri
e255be0990 In hostrule: return false if mountport is nil (prevent from crashing when accessed as a table, a couple line below). 2012-09-10 14:11:38 +00:00
henri
0f521a8697 Indentation fixes:
$ indent -nut -i2 -kr -br -brs -brf -l0 -bad -npcs -nprs -ncs nbase_memalloc.c
2012-09-10 08:20:25 +00:00
david
0674925f73 Skip over entire ifreq struct in NEXTIFR.
On platforms supporting sa_len, NEXTIFR would skip over sa_len bytes
starting at the beginning of ifr_addr, and assume that was the end of
the struct. (The idea being that a large address such as a sockaddr_in6
could overflow the nominal struct boundary.) This logic was wrong when
there was something else in the union bigger than sa_len; we would
increment into somewhere in the middle of the same struct.

This exhibited itself on NetBSD, where struct ifreq has a
sockaddr_storage member in its internal union:
struct	ifreq {
	char	ifr_name[IFNAMSIZ];		/* if name, e.g. "en0" */
	union {
		struct	sockaddr ifru_addr;
		struct	sockaddr ifru_dstaddr;
		struct	sockaddr ifru_broadaddr;
		struct	sockaddr_storage ifru_space;

No, we skip over sa_len bytes, or to the nominal end of the struct,
whichever is larger.

Unix Network Programming gets this wrong too; in figure 17.8 they do
ptr += sizeof(ifr->ifr_name) + max(sizeof(struct sockaddr), ifr->ifr_addr.sa_len);
2012-09-10 01:17:28 +00:00
david
6f61403f52 Don't use exit in APR_CHECK_WORKING_GETADDRINFO.
For the same reason as in r29737.
2012-09-08 19:45:38 +00:00
david
cb68c85409 Don't use exit in PCAP_IS_SUITABLE.
John Spencer reported that musl libc doesn't automatically include
<stdlib.h>, as Glibc does, so the configure check was wrongly failing.

conftest.c: In function 'main':
conftest.c:35:5: error: implicit declaration of function 'exit'
2012-09-08 19:44:24 +00:00
david
4d6f81122c Better break down structured output in smb-os-discovery.
smb.get_os already returns something that is fairly well structured, so
basically return that. Keep the "os" and "lanmanager" fields separate,
though they are combined as "os (lanmanager)" for normal output. Combine
"time" and "timezone" into a single "date" output.
2012-09-08 17:05:39 +00:00
david
d9b73da3a1 Give sample return values for smb.get_os. 2012-09-08 17:05:33 +00:00
david
afd483a2d6 Key digest output convention. 2012-09-08 16:22:23 +00:00
david
170df4fa54 Add docs section on structured output conventions.
Covering stdnse.format_timestamp.
2012-09-08 16:09:21 +00:00
david
87bce81b8c Use stdnse.format_timestamp in scripts that output structured dates. 2012-09-08 16:09:15 +00:00
david
e9b2a8aa5d Add stdnse.format_timestamp function.
This function follows RFC 3339 and is going to be the standard formatter
for dates and times in structured output.
2012-09-08 16:09:04 +00:00