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

142 Commits

Author SHA1 Message Date
david
d32d538a33 Remove some dead commented code. 2012-08-28 07:50:30 +00:00
david
42f71759c2 Use one, not two, spaces after "WARNING:".
There were more cases of one space than two.
2012-06-20 20:13:51 +00:00
fyodor
684f42c4ad One more adjustment to the license text. Notes that Zenmap, Ncat, and Nping use this license. Note that contributions made directly in the src repository are treated the same as those in the mailing list. 2012-03-01 06:53:35 +00:00
fyodor
e96a7b7b24 Update the headers for each code file. This updates code copyright dates to 2012, notes the awesome NSE in the list of technology, and slightly rewords the derivative works clarification 2012-03-01 06:32:23 +00:00
david
89d63e0937 Add a debug message for OS scan drops. 2011-12-31 21:59:59 +00:00
david
637ba35a28 Count an ACK right after counting a drop for a retransmitted reply.
We count a drop for congestion control purposes if we receive a response
to a retransmitted probe, because that means that the reply to the
original probe was dropped. However, we weren't taking into account that
we are at the same time receiving a positive response, and should
increase the window accordingly. There are now three things that can
happen:

Response to first probe:	ACK
Response to retransmission:	DROP, then ACK
Probe timeout:			DROP
2011-12-31 21:59:58 +00:00
david
8ba1cf6b15 Factor out timing ack and drop code. 2011-12-31 21:59:57 +00:00
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