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

185 Commits

Author SHA1 Message Date
david
8d52190d9d Scale congestion window increments during IPv4 OS scan. 2011-12-31 21:59:55 +00:00
david
a005b820be Make cwnd updates in osscan2.cc match those in scan_engine.cc. 2011-12-31 21:59:54 +00:00
david
94b4e93b16 Use TIMEVAL_AFTER. 2011-12-31 21:59:53 +00:00
david
e962f1c5fe Centralize initialization of scan_performance_vars. 2011-12-31 21:59:52 +00:00
david
24e02a9a1a Use global timing structs in osscan2. 2011-12-31 21:59:51 +00:00
david
8f1586883a Style. 2011-12-31 21:59:47 +00:00
david
d9b7637fd8 o Increased hop distance estimates from OS detection by one. The
distance now counts the number of hops including the final one to
  the target, not just the number of intermediate nodes. The IPv6
  distance calculation already worked this way. [David]
2011-10-01 01:53:22 +00:00
david
fee764a5d8 Use a special struct_ip.h to include <netinet/ip.h> and accoutrements.
The comment in struct_ip.h explains the reasoning for this. The AIX C library
uses #defines that change the names of members of struct ip, and conflict with
some existing code. (Notably struct ip_hdr in libdnet and IPv4Header::h in
libnetutil.) We can still use the AIX files if we include <netinet/ip.h> after
this other code has been preprocessed. That's hard to enforce when
<netinet/ip.h> is included from another header file; this new file allows
including it always late, and only where needed.
2011-09-21 07:31:38 +00:00
david
9bf2ec3884 Merge from /nmap-exp/luis/nmap-os6.
svn merge --ignore-ancestry svn://svn.insecure.org/nmap@26621 svn://svn.insecure.org/nmap-exp/luis/nmap-os6

This is the IPv6 OS detection branch. "nmap -6 -O" works now, though at
this point it only prints fingerprints and not OS guesses, because we
need to collect more submissions.
2011-09-19 18:31:46 +00:00
david
f41753c4e9 Add a sockaddr dst argument to send_ip function that use raw sockets.
Heretofore we have always extracted teh destination address directly
from the packet contents. But the raw packet bytes do not contain enough
information in one case: IPv6 link-local addresses. For those we really
need the scope ID, and for that we must pass this information all the
way down.

Before this, I got "no route to host" on OS link-local addresses. I
think that it was working on Linux only on accident, by the OS picking a
default interface or something.
2011-09-19 16:13:35 +00:00
david
5574f50bf4 Free TOps_AVs and TWin_AVs between OS rounds.
This was leaking a small amount of memory when OS detection was repeated
on a host.
2011-09-09 08:24:47 +00:00
david
7b78da216f Use static allocation of OsScanInfo and HostOsScan.
These classes are essentially containers for global state and functions,
so there's no need for new/delete.
2011-07-28 18:45:14 +00:00
luis
08509380d6 Last set of minor style fixes 2011-07-26 12:04:21 +00:00
luis
ba25118e0e Make the file consistent: fix indentation replacing tabs with spaces 2011-07-26 12:04:12 +00:00
luis
bbda5dfd90 Minor style fixes 2011-07-26 12:04:08 +00:00
luis
6defb790d2 Add some comments to the top of functions 2011-07-26 12:04:04 +00:00
luis
ad3e5dadc2 Add some comments and remove some unused code 2011-07-26 12:03:49 +00:00
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