1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

218 Commits

Author SHA1 Message Date
luis
3f3fc7dc07 Replace some tabs with spaces, and some other minor style fixes 2011-07-26 12:03:44 +00:00
luis
2ccd8a60cb Add doc for get_initial_ttl_guess() 2011-07-26 12:03:40 +00:00
luis
46eeeb0b1e Minor comment fixes 2011-07-26 12:03:21 +00:00
luis
c9cefab5fc Reorganized source file so methods of the same class are grouped together 2011-07-26 12:03:18 +00:00
luis
2ea0f04494 Move class definitions to the header file 2011-07-26 12:03:12 +00:00
luis
68911fc5ad Move typedef to the header file 2011-07-26 12:03:09 +00:00
luis
80a8a8a418 Change explicit definition of struct osscan_timing_vals to a typedef in the header file 2011-07-25 18:36:05 +00:00
luis
35ef43f711 Change explicit definition of os_scan_performance_vars to a typedef in the header file 2011-07-25 18:34:03 +00:00
luis
4faf19f738 Move constant definitions to the osscan2 header file 2011-07-25 18:30:05 +00:00
weilin
1dcf652410 Added ND ping for local IPv6 nets, merging from /nmap-exp/weilin/nmap-nd. 2011-07-19 02:31:54 +00:00
david
78e5fc6ec8 Add a comment explaining why T1 appears in sendT1_7Probe, even though it
is normally represented by the first (of six) probes sent by
sendTSeqProbe.
2011-06-15 21:02:21 +00:00
luis
540ee62611 Revert r23288 as it seems to crash Nmap. More info: http://seclists.org/nmap-dev/2011/q2/926 2011-06-13 10:04:20 +00:00
david
381bb03d70 Rename readip_pcap -> readipv4_pcap and readip46_pcap to readip_pcap.
We should have the multiprotocol version be the main version, with
IPv4-only code being a noted exception. Also these functions are almost
the same so one can call the other.
2011-06-08 23:46:21 +00:00
david
4aa4a154f9 Merge from /nmap-exp/david/nmap-ipv6.
This is raw IPv6 packet support for most port and ping scans, Neighbor
Discovery, and traceroute.
2011-06-08 01:24:48 +00:00
luis
88155e1e7c There is no point in expressing the contents of TCP options in octal. This patch translates those octal values to hex. 2011-05-24 17:06:22 +00:00
luis
7b0f4870c0 Removed some dead code that only induces to confusion 2011-05-24 17:00:10 +00:00
luis
0a715b15f5 Fix problem with scaped characters like \n or \t 2011-05-24 15:13:49 +00:00
luis
c1f7271a17 The content of the TCP options for OS detection is represented in octal, which is not the most useful base to work with. This patch adds (as a comment) the hexadecimal representation of those TCP options. 2011-05-24 14:46:59 +00:00
fyodor
56408b6908 Changed a LOG_PLAIN message into a LOG_STDOUT since it is more of a real-time message than something you want in your report files (suggested by Justin Cacak) 2011-05-05 08:37:23 +00:00
david
afce65a3a8 Rename tcpudp_cksum to ipv4_pseudoheader_cksum. Partial merge of r21278
from /nmap-exp/david/nmap-ipv6.
2011-04-26 15:38:44 +00:00
david
7453ec34d0 Change o.TimeSinceStartMS returning milliseconds to o.TimeSinceStart
returning floating-point seconds. Everywhere o.TimeSinceStartMS was
called, the return value was being divided by 1000.0, which had the same
effect but would overflow when the difference exceeded about 25 days
(2^31 milliseconds). This patch is by Daniel Miller.
2011-03-28 20:34:32 +00:00
fyodor
86e59a8c4e Update copyright statements from 2010 to 2011 2011-01-21 00:04:16 +00:00
david
7653cf7d4a Move COPYING.OpenSSL to OpenSSL.txt, update copyright notices to match. 2010-10-30 03:01:50 +00:00
david
ca5254f990 Fix a memory leak in OS detection. When detection ran for more than one
round, fingerprint test results were being leaked in between rounds.
2010-09-23 06:00:40 +00:00
david
235dab9f24 Fix an array allocation; we were allocating a multiple of the size of a
struct, not the size of a pointer to it. Over-allocating did no harm
beyond wasting some memory.
2010-09-23 05:58:39 +00:00
david
45468ba2a0 Fix compiler warnings seen on OpenBSD. 2010-08-02 20:30:29 +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
f21a07cfde Revert r16464. 2010-01-15 03:55:23 +00:00
david
c73b250615 Factor out a function that reports the failure to open an Ethernet
device and exits. On Windows, print a hint about "net start npf" to
start the NPF service.
2010-01-15 00:37:39 +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
fyodor
543c5408b6 add a missing newline to a warning message 2009-11-23 23:30:36 +00:00
david
a06b900f00 Merge from /nmap-exp/david/nmap-mem. This reduces the memory usage of OS
scan by about 95%. (66832396 bytes to 2815061 bytes according to
Massif.)
2009-11-23 21:22:07 +00:00
david
ddc1b9b2d1 Fix a little memory leak in the handling of OPS and WIN responses.
FingerTest structures are supposed to have an array of AVals that are
allocated as a block and linked internally. But for OPS and WIN, each
AVal was allocated individually and linked together. When the FingerTest
was later freed, it freed only the first link in the chain.
2009-11-23 16:51:42 +00:00
david
b40356ed3f Fixed an integer overflow that could occur when a target with a low
TCP timestamp clock frequency uses large timestamp values, such that
a naive uptime calculation shows a boot time before the epoch. Also
fixed a printf format specifier mismatch that was revealed by the
overflow. Toby Simmons reported the problem and helped with the fix.
2009-09-10 18:03:18 +00:00
david
4c6bafb3fa o There is a new OS detection pseudo-test, SCAN.DC, which records how
the network distance in SCAN.DS was calculated. Its value can be "L"
  for localhost, "D" for a direct connection, "I" for an ICMP TTL
  calculation, and "T" for a traceroute hop count. This is mainly for
  the benefit of OS integration, when it is sometimes important to
  distinguish between DS=1%DC=I (probably the result of forged TTLs)
  and DS=1%DC=D (a true one-hop connection.) [David]
2009-08-23 23:58:28 +00:00
david
eac15cb919 Apply a patch by Dmitry Levin that uses a network interface's full name,
including alias extension, in several places to avoid this error message
when an alias has an IP address but the primary interface doesn't:
Failed to lookup subnet/netmask for device (venet0): venet0: no IPv4 address assigned
The patch also considers an interface alias if the primary interface
does not appear in the list of interfaces (perhaps because it does not
have an IP address assigned) when building the table of routes.
2009-07-27 19:01:58 +00:00
david
a4c92f83e7 Use the preprocessor defines IP_DF and IP_OFFMASK instead of literal
0x4000 and 8191.
2009-07-03 18:11:15 +00:00
daniel
da6cb1d19e o [Nbase] The checksum functions now have an nbase_ prefix. This
should prevent name collisions with internal but exported functions
  in shared libraries Nmap links against (e.g. adler32() in zlib).
  Such collisions seem to confuse the runtime linker on some platforms.
  [Daniel Roethlisberger]
2009-04-16 09:38:13 +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
24fbedd748 Changed two OS scan error() calls to LOG_STDOUT instead. They aren't
errors and having them go to STDERR could be confusing.
2009-04-08 01:14:48 +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
e9d7cab6ef The following OS detection tests are no longer included in OS
fingerprints: U1.RUL, U1.TOS, IE.DLI, IE.SI, and IE.TOSI. URL, DLI,
and SI were found not be helpful in distinguishing operating systems
because they didn't vary. TOS and TOSI were disabled in 4.85BETA1
but now they are not included in prints at all.
2009-03-27 23:07:08 +00:00
david
4d73305a5a Add a fix in the calculation of the SEQ.CI test submitted by Guillaume
Prigent. The CI samples could sometimes be written into the TI array.
This would happen if there were any holes in the original CI array.
2009-03-26 14:28:53 +00:00
david
3af559b852 Only print the "insufficient responses for TCP sequencing" if at least one
response was received, not zero. Because four responses are sufficient, the
message will be printed if one, two, or three reponses were received. The
message started being printed with zero responses in r12285, with an unrelated
change.

The message also now includes the IP address of the relevant host and requires
debugging to be enabled.
2009-03-24 21:04:37 +00:00
david
aa97b79e4c Fix a little error in a comment: We decided to call the closed-port TCP IP ID
test CI, not CTI.
2009-02-25 00:40:47 +00:00
david
b230f7168c Merge from /nmap-exp/david/nmap-closed-ipid.
This adds a new SEQ.CI OS detection test. It is based on the IP IDs of the
responses to the three probes sent to a closed port: T5, T6, and T7. This has
been reported to differ from TI and was observed to do so in Internet scans
using the nmap-closed-ipid branch.
2009-02-25 00:30:40 +00:00
david
588d629a6a Copy the Subversion properties from osscan.cc to osscan2.cc. None were set on
osscan2.cc. I think osscan2.cc wasn't updating its $Id$ because it didn't have
the svn:keywords property set.
2009-02-24 22:04:54 +00:00