1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 23:49:03 +00:00
Commit Graph

9911 Commits

Author SHA1 Message Date
david
5dbfba4799 Remove stray semicolon. 2013-02-26 03:39:23 +00:00
david
a1a106defe Allow CRLF line endings in upnp.lua
Only LF was supported before. Reported by kaito.
http://seclists.org/nmap-dev/2013/q1/221
2013-02-24 04:55:40 +00:00
david
801e69e323 Update ip-geolocation-geoplugin.nse for a new data format.
The response seems to be plain JSON now, with nothing extraneous.
Reported by Robin Wood.
http://seclists.org/nmap-dev/2013/q1/232
2013-02-24 02:50:03 +00:00
david
0fceb95b5a Whitespace. 2013-02-24 02:50:02 +00:00
david
ee4d1e126b Remove a close that made a test unreliable. 2013-02-23 06:54:31 +00:00
david
c60b72f7a0 XFAIL some tests having to do with EOF handling.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:30 +00:00
david
811d6096e1 Quit on EOF in non-TCP mode.
Apparently SCTP can't have the same kind of half-open sockets that TCP
has. When one direction is closed, we can't do anything further with the
socket.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:29 +00:00
david
a9cb84f189 Break out separate SCTP tests for half-open sockets.
These should have different behavior than TCP.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:28 +00:00
david
84773c74a5 Switch to an o.proto option instead of o.udp and o.sctp.
This eliminates the ambiguity that could exist when, say, both o.udp and
o.sctp were both set. The code would use whichever it happened to test
first. This also makes TCP mode explicit with IPPROTO_TCP.
2013-02-23 05:56:00 +00:00
david
785855e3ac Limit maxSocketsAllowed to FD_SETSIZE.
At high scan rates, there was nothing to prevent trying to set or clear
socket descriptors above FD_SETSIZE, which is usually around 1024. I got
a reliable assertion failures with the command
	nmap -sT -p- --min-rate 100000 scanme.nmap.org
The problem only affected -sT scans. A similar protection was added to
Nsock in r15808.
2013-02-22 01:14:32 +00:00
david
630a6db051 Break up the maxSocketsAllowed assignment. 2013-02-22 01:14:32 +00:00
david
719017b003 Use CHECKED_FD_SET and CHECKED_FD_CLR in ultra_scan. 2013-02-22 00:45:58 +00:00
david
87bab78479 Move CHECKED_FD_SET and CHECKED_FD_CLR to Nbase. 2013-02-22 00:45:57 +00:00
david
6e674f5cf5 Use an fprintf and abort instead of Nsock's fatal.
In preparation for move to Nbase.
2013-02-22 00:45:56 +00:00
david
d50afbca7d Fix some format string mismatches (int versus long int). 2013-02-22 00:45:55 +00:00
david
129d804d15 Add some missing noreturn and format attributes. 2013-02-22 00:45:55 +00:00
david
658b8648c6 Remove declartion of nonexistent myerror. 2013-02-22 00:45:54 +00:00
paulino
666cda3048 Adds entry to detect several vulnerable versions of JCE Joomla extension. (Remote command exec)
Fingerprint taken from http://www.bugreport.ir/78/exploit.htm
2013-02-21 04:53:49 +00:00
dmiller
14c40b6281 Handle AppleTalk devices
Fixed a bug that prevented Nmap from finding any interfaces when one
of them had the type ARP_HDR_APPLETALK; this was the case for
AppleTalk interfaces. However, This support is not complete
since AppleTalk interfaces use different size hardware addresses
than Ethernet. Nmap IP level scans should work without any problem,
please refer to the '--send-ip' switch and to the following thread:
http://seclists.org/nmap-dev/2013/q1/214
This bug was reported by Steven Gregory Johnson on IRC.
2013-02-14 23:32:52 +00:00
henri
1097ce2e02 Get rid of npacket_debug (dead code). 2013-02-14 14:34:52 +00:00
david
8fbc54e86d Use a HAVE_STDINT_H guard.
This include file isn't present when building with Visual C++ 2008, but
the file compiles without it.
2013-02-09 22:46:47 +00:00
david
ce51d8c4da Use the default value of MultiThreadedDLL where possible. 2013-02-09 20:30:01 +00:00
david
6b095f42d2 Use MultiThreadedDebugDLL (/MDd) in place of MultiThreadedDebug (/MTd).
This is to match r8507, which did the analogous thing for the Release
configuration.
http://seclists.org/nmap-dev/2013/q1/120
2013-02-09 20:29:55 +00:00
david
ecb16767e8 Skip privileged pings against localhost on Windows.
Compare to this similar test in Nmap's scan_engine.cc:
  if (scantype != CONNECT_SCAN && Targets[0]->ifType() == devt_loopback) {
    log_write(LOG_STDOUT, "Skipping %s against %s because Windows does not support scanning your own machine (localhost) this way.\n", scantype2str(scantype), Targets[0]->NameIP());
    return;
  }

rndbit made a report--unfortunately we con't fix it, but we can make the
error message clearer.
http://seclists.org/nmap-dev/2013/q1/187
2013-02-09 19:08:05 +00:00
david
66bd9d1993 Enforce device name only after choosing loopback in route_dst_generic.
Nping calls route_dst at least twice: once with a NULL device, and again
with the device learned from the first time. This interfered with the
code that automatically chooses a loopback interface for dests that are
the same as an interface address. For example, if you are 192.168.0.1,
and you are scanning 192.168.0.1, route_dst will tell you to use
interface "lo0" even though the interface of 192.168.0.1 may be "eth0".
route_dst was returning failure because the device name check was being
done before "eth0" got changed to "lo0".

This problem didn't show up on Linux because Linux uses
route_dst_netlink, which delegates the work to the kernel. But I could
reproduce on Linux by forcing the use of route_dst_generic.
2013-02-09 18:55:46 +00:00
david
9e74850e6e Remove unnecessary or nonexistent files from Nping Windows build.
These were causing Nping to always appear to be out of date when
debugging. Cf. r26250 and r25068.
2013-02-09 18:55:22 +00:00
david
0d09008fea CHANGELOG for Ncat socket EOF change. 2013-02-09 08:29:40 +00:00
david
9901c8e7a9 Close stdout on socket EOF. 2013-02-09 08:29:39 +00:00
david
88a35de3b5 Quit on socket EOF only in --recv-only mode.
Suggested by Tomas Hozza.
http://seclists.org/nmap-dev/2013/q1/188
2013-02-09 08:29:38 +00:00
david
81c777abfd Simplify connect-mode stdin EOF handling. 2013-02-09 08:29:37 +00:00
david
9a10429474 Round out EOF and shutdown tests.
The existing tests here didn't make much sense, and didn't cover all the
situations we care about. The 8 tests now check each of

client !--send-only EOF on stdin
client  --send-only EOF on stdin
server !--send-only EOF on stdin
server  --send-only EOF on stdin

client !--recv-only EOF on socket
client  --recv-only EOF on socket
server !--recv-only EOF on socket
server  --recv-only EOF on socket

The other thing we care about is whether the client/server keeps running
after the EOF. That is now checked in each of the tests too.
2013-02-09 08:29:36 +00:00
david
61255ee01e Retab ncat-test.pl. 2013-02-09 08:29:35 +00:00
david
842f9e6804 Revert "Lower-case scheme comparisons."
Handle it at the url.parse level.
2013-02-07 23:43:50 +00:00
david
4fb61350d8 url.parse should convert all schemes to lower case.
RFC 3986 section 3.1:
Although schemes are case-insensitive, the canonical form is lowercase
and documents that specify schemes must do so with lowercase letters.
An implementation should accept uppercase letters as equivalent to
lowercase in scheme names (e.g., allow "HTTP" as well as "http") for the
sake of robustness but should only produce lowercase scheme names for
consistency.
2013-02-07 23:43:47 +00:00
david
5273567981 Lower-case scheme comparisons.
I'm seeing redirects to "HTTP://example.com/".
2013-02-07 23:37:48 +00:00
david
a1cc3690cc Include the targetname if possible in NSE diagnostic messages. 2013-02-07 23:26:18 +00:00
david
9434dd7d2f parse_redirect: fill in port number even if authority but not scheme is present.
For example "//example.com/en/": the function needs to return with
u.port set, just as it would with "http://example.com/en/".
2013-02-07 23:12:41 +00:00
david
a210d38769 Allow empty path in url.parse.
I got a redirect of "?p=indisponible" and url.parse returned
{query="p=indisponible"}. Now it returns
{path="", query="p=indisponible"}.
2013-02-07 22:37:38 +00:00
david
4cdb5301dd 300 and 303 are also HTTP redirects. 2013-02-07 22:28:10 +00:00
david
ac5a479a73 Treat empty port in URL the same as absent.
RFC 3986 says that these URLs are equivalent:

http://example.com/
http://example.com:/

url.parse was returning port="" for the latter. Make it instead return
port=nil like the former.
2013-02-07 03:06:30 +00:00
david
1c7c414fbb URL ports have to be decimal digits.
RFC 3986 section 3.2.3.
2013-02-07 03:06:29 +00:00
david
45b5d92f3d Don't treat an empty string as an invalid URL.
To me, this is a relative URL with a path of "". I.e., it refers to the
same document as wherever the URL appeared, like when people do
<form action="" enctype="multipart/form-data" method="POST">
2013-02-07 02:28:23 +00:00
david
fd7cabf7db Remove some old Linux compatibility code from connect scan.
This code was quite old (dating from r854 in 2000) and may not serve a
purpose anymore. Let's try removing it.

Apart from being obsolete, the code had a race condition where the
connection could be closed with a RST before getpeername was called,
leading to a fatal error message.
2013-02-05 04:55:29 +00:00
fyodor
71a6c878ac Add a task suggested by David 2013-02-05 00:03:07 +00:00
david
7c7ffdb756 Typo. 2013-02-02 01:41:50 +00:00
david
2318ff2e70 Remove a too-generic service fingerprint for which we need more data.
It was listed as "Microsoft UPnP", but was also matching a trivial
golang web server.
2013-02-01 20:45:12 +00:00
david
37e0241276 CHANGELOG for route metrics. 2013-02-01 05:02:00 +00:00
david
5ab6c9fa93 Sort by metric. 2013-02-01 05:01:59 +00:00
david
8e20e6a65b Show route metrics in --iflist. 2013-02-01 05:01:58 +00:00
david
e2387e4693 Add metric to struct sys_route. 2013-02-01 05:01:57 +00:00