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

69 Commits

Author SHA1 Message Date
david
523c4f7104 Remove -sR o.rpcscan handling; make -sR an alias for -sV. 2011-03-12 18:20:09 +00:00
fyodor
86e59a8c4e Update copyright statements from 2010 to 2011 2011-01-21 00:04:16 +00:00
tomsellers
fda466c417 Corrected an issue where the service detection type was set twice if the
service was probed and found to be TCPWRAPPED.  The second type entry
was incorrect (set it to table) and has been removed.
2010-12-29 17:25:57 +00:00
david
d4e49f1075 Rearrange some headers to make sure that out nbase errno defines are seen early,
avoiding warning about symbol redefinitions. This is mostly moving "nmap.h" to
the top of the list.
2010-11-04 22:43:00 +00:00
david
7653cf7d4a Move COPYING.OpenSSL to OpenSSL.txt, update copyright notices to match. 2010-10-30 03:01:50 +00:00
luis
da126c8b78 Merged nmap-dedup branch from nmap-exp/luis/nmap-dedup. This completes the Nmap/Nping code de-duplication phase. 2010-06-22 17:24:34 +00:00
fyodor
1aecac420f Update copyright year from 2009 to 2010 2010-05-03 21:20:25 +00:00
david
e3aff298eb Set name_confidence for PROBESTATE_FINISHED_NOMATCH,
PROBESTATE_EXCLUDED, and PROBESTATE_INCOMPLETE to 3, not 2. We're
looking up the service name in the same way as when no service detection
is done, so the confidence should be the same.

I think you can make a case that the confidence should be lower if
service detection is done but doesn't find a match. But this matches the
behavior of Nmap 4.76, using a confidence of 3 for
PROBESTATE_FINISHED_NOMATCH.
2010-04-30 17:24:32 +00:00
david
db328f191f Look up the service name whenever service detection doesn't find a
match, not only for PROBESTATE_EXCLUDED. Otherwise a serviceDeductions
gets allocated but its name doesn't get set. Later, when a
serviceDeductions is present with no name, XML output doesn't print the
service element.
2010-04-30 17:21:38 +00:00
david
e72ecb11ac Fix spelling neccessary -> necessary. 2010-03-20 03:59:31 +00:00
david
5b00a325c0 Add a PortList::hasOpenPorts member function to find out if a host has
any open, open|filtered, or unfiltered ports (those that would be
displayed by --open).
2010-03-12 20:48:03 +00:00
david
ba5e337db8 Reset port_list_count in PortList::freePortMap. 2010-02-26 21:25:41 +00:00
david
e32a406032 Fix code style in PortList::freePortMap. 2010-02-26 20:58:54 +00:00
david
549dc85ad3 Change PortList::getPortState to return the default port state if the
port is unknown, instead of -1. This makes it a better fit with the
other accessor functions. For those callers that need to know whether a
port is in the default state or not, add PortList::portIsDefault.

Having getPortState return -1 for ports in the default state would cause
the slightly wrong

Discovered unknown port 88/udp on 192.168.0.190 is actually open

to be printed instead of

Discovered open|filtered port 88/udp on 192.168.0.190 is actually open
2010-01-26 20:46:26 +00:00
bmenrigh
9ad0a206db Fixing compilation when --without-liblua is used. 2010-01-24 08:57:38 +00:00
david
4c57d3f8c8 Unconditionally set the port state to PORT_OPEN when receiving a service
scan response, instead of checking for a current state of
PORT_OPENFILTERED. The code calls getPortState, but the port may not
have been assigned a state, again because of the new Port allocation
architecture, so the function returns -1.

It would make sense to have getPortState return the default port state
if a Port has not been allocated, but there are two other places it is
used where the code relies on it returning -1 to indicate that a port
has not received a state yet.
2010-01-23 02:01:50 +00:00
david
f1551332be Set the default port state and reason whenever PortList::createPort is
called. Formerly the only way to create a port was to call
PortList::addPort, which also set the state. Now ports are allocated on
demand whenever anything about a port is set. If we don't set the state
and reason, they're "unknown" and "unknown-reason". Because of the
special handling of PORT_UNKNOWN in the output table, this could lead to
an assertion failure reported by Jon Kibler.
2010-01-21 23:40:10 +00:00
david
7db7da0007 Merge again from /nmap-exp/david/nmap-mem; this fixes a couple of bugs. 2009-12-20 03:22:19 +00:00
david
1c6030709b Revert r16307:16309, the merge from nmap-mem. I just found a
segmentation fault which I am investigating.
2009-12-19 22:49:16 +00:00
david
b838242e01 Merge from /nmap-exp/david/nmap-mem. This brings in two memory-reducing
changes. The first is that Port objects don't allocate memory for
service and RPC results unless that information is set. This reduces the
size of a bare Port from 92 to 40 bytes on my machine. The second change
is that PortList now has the notion of a "default port state," which is
the state of any ports that didn't receive a response. These ports don't
need an allocated Port object, which saves a lot of memory in scans
where most ports didn't get a response.
2009-12-19 21:26:14 +00:00
david
24ba29a3b3 Fix what looks like a typing error in portlist.cc. There's no point to
assigning to our argument.
2009-11-26 22:28:55 +00:00
david
e2315ae075 Remove the unused Port::owner member. 2009-11-20 20:17:33 +00:00
david
e88781716e Remove the unused Port::next member. 2009-11-19 16:10:49 +00:00
david
1a37d25650 Change cstringSanityCheck from being a method of Port to a static
function.
2009-11-19 16:04:37 +00:00
daniel
50830f7488 o Added initial SCTP port scanning support to Nmap. SCTP is
a layer 4 protocol used mostly for telephony related applications.
  This brings the following new features:
  o SCTP INIT chunk port scan (-sY): open ports return an INIT-ACK
    chunk, closed ones an ABORT chunk.  This is the SCTP equivalent
    of a TCP SYN stealth scan.
  o SCTP COOKIE-ECHO chunk port scan (-sZ): open ports are silent,
    closed ports return an ABORT chunk.
  o SCTP INIT chunk ping probes (-PY): host discovery using SCTP
    INIT chunk packets.
  o SCTP-specific IP protocol scan (-sO -p sctp).
  o SCTP-specific traceroute support (--traceroute).
  o The ability to use the deprecated Adler32 algorithm as specified
    in RFC 2960 instead of CRC32C from RFC 4960 (--adler32).
  o 42 well-known SCTP ports were added to the nmap-services file.
  Part of the work on SCTP support was kindly sponsored by
  Compass Security AG, Switzerland.  [Daniel Roethlisberger]
2009-06-03 23:15:45 +00:00
fyodor
d0e21e1d03 Suggest that people send patches to nmap-dev rather than to me directly 2009-04-15 00:37:03 +00:00
bmenrigh
9bf557485b o Expanded and tweaked the product/version/info of service scans in an
attempt to reduce the number of warnings like "Warning: Servicescan
  failed to fill info_template...".  Parts of this change include:
  o Improved the text of the warning to be less confusing
  o Increased the internal version info buffer to 256 chars from 128
  o Increased the final version string length to 160 from 128 chars
  o Changed the behavior when constructing the final version string so
    that if it runs out of space, rather than dropping the output of that
    template it truncates the template with ...
  o Fixed the printing of unneeded spaces between templates when one of the
    templates isn't going to be printed at all.
2009-04-05 02:02:15 +00:00
fyodor
eccc235d5a Increase copyright year to 2009, simplify/reword some derivative works text, and remove a confusing clause about selling proprietary front-ends to Nmap 2009-03-31 04:16:12 +00:00
david
4f3dbf5d56 Add some more TCP cheat ports. The new ones are
3306	mysql
8080	http-proxy
1723	pptp
111	rpcbind
995	pop3s
993	imaps
5900	vnc
1025	NFS-or-IIS
587	submission
8888	sun-answerbook
199	smux
1720	H.323/Q.931
2008-12-19 22:45:58 +00:00
fyodor
2ba1f3f14b Add 554 and 256 to the popular ports list. They aren't open as often as some others, but they still provide a lot of value (closed ports are as useful as open ones for pop_ports purposes 2008-12-19 06:56:26 +00:00
david
7aa5ed3008 Update the list of cheat TCP ports from the latest nmap-services with frequency
measurements. These commonly responsive ports are moved to the front of the
list when randomizing ports to help us quickly get some timing feedback and
find a timing ping probe.

The previous list was
	{ 21, 22, 23, 25, 53, 80, 113, 256, 389, 443, 554, 636, 1723, 3389 }
The new list is
	{ 80, 23, 443, 21, 22, 25, 3389, 110, 445, 139, 143, 53, 135, 113 }

The ports that were removed are
256     fw1-secureremote
389     ldap
554     rtsp
636     ldapssl
1723    pptp

The ports that were added are
110     pop3
135     msrpc
139     netbios-ssn
143     imap
445     microsoft-ds
2008-12-19 06:21:22 +00:00
david
578449da23 Remove the unused "confidence" member of the Port class. This is not the same
as the "name_confidence" member of a service match. I grepped the whole source
tree and couldn't find any reference to "confidence" besides its declaration
and initialization; it builds fine without it.
2008-10-25 00:24:32 +00:00
fyodor
0dee9b603d Nmap now avoids collapsing large numbers of ports in open|filtered state if verbosity or debugging levels are greater than two. 2008-08-15 03:30:34 +00:00
batrick
13452505a5 Added ScriptResult class change in order to avoid managing string memory
created via strdup(). Script output and id (strings) are now C++ std::string.
2008-07-07 17:37:08 +00:00
kris
743eb48856 o Fixed some memory leaks in NSE found with Valgrind. [Kris] 2008-06-09 16:54:08 +00:00
fyodor
779b96a197 trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
fyodor
10b54b773b minor license template updates from Kris--fix gnu.org link to GPLv2 (moved) and openssl license filename (COPYING.OpenSSL) 2008-05-05 04:10:00 +00:00
fyodor
1accc12fb2 fix typo in legal header found by Leigh Zhao (missing word: of) 2008-02-28 18:52:06 +00:00
fyodor
29c912f394 URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
fyodor
8220c8a42f update copyright line at the top of files from 1996-2006 to 1996-2008 2007-12-22 06:32:03 +00:00
fyodor
09512ff092 o Fix a bunch of warning/error messages which contained an extra
newline.  Thanks to Brandon Enright for the patch.
2007-12-21 03:38:04 +00:00
kris
0b50c16b38 Adding Snprintf() and Vsnprintf() to nbase/nbase_str.c. This is because of Windows' stupid implementation where it doesn't write a NULL byte at the end of the buffer if the result is truncated. I would've just #defined snprintf and vsnprintf to some wrapper function for Windows, but this doesn't work as libdnet and libpcap (and libpcap includes under mswin32) define snprintf to _snprintf and vsnprintf to _vsnprintf like we do, and through the many defines they end up being available in the Nmap sources. Vsnprintf() uses vsnprintf() (and writes a NULL byte at the end if truncated), and Snprintf uses Vsnprintf(). 2007-08-14 06:46:54 +00:00
fyodor
8dc9673928 merge soc07 r5085 - Changing bare printf()s to log_write(LOG_PLAIN,)s because these were always printed even when things like XML and greppable output were sent to stdout (e.g. -oX -). This also adds o.scriptTrace() to make --script-trace behave more like --packet-trace and --version-trace. Nsock tracing was done unconditionally in NSE, and that has been changed to only be done when o.scriptTrace() is true. 2007-08-11 05:13:16 +00:00
fyodor
2af8e785f8 merge soc07 r4957 - Put <extrareasons> inside <extraports> as this should really simplify XML parsers' jobs because they won't have to keep track of what states and reasons go together 2007-08-11 04:29:50 +00:00
fyodor
8d74bbcd8a merge soc07 r4871:4884 and r4888 - renaming __FUNCTION__ to __func__ and changing hardcoded func names to __func__ 2007-08-11 04:06:09 +00:00
fyodor
58522c59f6 merge soc07 r4822 - Reduce the number of build dependencies. 2007-08-11 03:35:46 +00:00
fyodor
58f46706e5 merge soc07 r4751 - UDP traceroute hop distance and port state reason feature 2007-08-11 03:15:24 +00:00
kris
ddd6366540 Change max protocol count when ignoring states. The IPProto Scan wasn't taken into account when figuring out how many ports/protocols should be in a given state before ignoring them. For me in most cases, -d caused every protocol to be listed because most were open|filtered and the -d set the max to a value a lot larger than 255. Now for the same hosts, it takes -d3 to print them all. 2007-02-03 21:29:13 +00:00
fyodor
b361685be8 NSE committed 2006-12-11 00:34:26 +00:00
fyodor
e4ee4d5e4c getting closer to 4.20ALPHA9 2006-10-14 01:25:43 +00:00