1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-19 14:09:02 +00:00
Commit Graph

7732 Commits

Author SHA1 Message Date
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
david
ac87c9b251 Add stdnse.date_to_timestamp function.
This takes a broken-down date table, as produced by os.date("*t"), and
converts it into an integer number of seconds since the epoch UTC,
interpreting it as a time in a given time zone. Simply passing a date
table to os.time is not good enough, because os.time always assumes the
date table represents a local time; i.e., you will get different results
from running os.time({year=2012,month=1,day=1,hour=12,min=0,sec=0})
depending on what time zone you run it in.
2012-09-08 16:08:58 +00:00
henri
f366c0d191 Don't always assume that 'safe=1' was set. Added a check for 'unsafe' in ms08-67 2012-09-08 09:36:25 +00:00
paulino
ed65dd66d3 Removes the script from the "safe" category. 2012-09-07 23:44:58 +00:00
paulino
d7234e2582 Renames http-method-tamper to http-vuln-cve2010-0738 and adds the new version of http-method-tamper.
The new version improves the detection mechanism to cover PHP environments with .htaccess files and adds spidering to locate password protected resources automatically.
2012-09-07 23:42:39 +00:00
dmiller
00e37443ed Update @output luadoc on ssl-date 2012-09-07 16:39:02 +00:00
dmiller
a456186e77 Keep delta readable in Normal output
per http://seclists.org/nmap-dev/2012/q3/756
2012-09-07 16:37:47 +00:00
dmiller
b8604e066c ssl-date date formatting issues
Fix date format string to format as UTC (prepend "!") instead of local
time. Also changed "offset" xmloutput elem to "delta" to match http-date
2012-09-07 15:18:33 +00:00
robert
1a726ba337 Updated hashes to include PHP 5.3.15, 5.3.16, 5.4.5 and 5.4.6. 2012-09-07 10:03:05 +00:00
david
5ab8e37be6 Recognize WSAEADDRINUSE in handle_connect_result.
This happens on Windows when two sockets bind to the same local port and
connect to the same remote port on a remote host. I tried this on Linux;
Linux prevents the second bind from succeeding.

http://seclists.org/nmap-dev/2012/q2/513
2012-09-06 20:11:08 +00:00
david
66c296e27f Use socket_strerror in Nsock callback traces.
Otherwise WinSock error numbers are not understood; you get "Unknown
error" instead of "Only one usage of each socket address
(protocol/network address/port) is normally permitted." for example.
2012-09-06 20:11:04 +00:00
david
3ae9ba63be Make sockets temporarily blocking in ncat_send and ncat_broadcast.
It is possible to send so quickly that we start getting EAGAIN on sends.
In listen mode, this means that some sends can get lost. This patch,
adapted from one by Alex Weber, makes sockets blocking for the duration
of the send. This is not as nice as retrying the send through an event
mechanism, but should at least be correct.

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

Compare a similar patch in r13552, which applied to --exec mode.
2012-09-06 18:17:27 +00:00