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

46 Commits

Author SHA1 Message Date
david
177e2cd4a2 constify the pointer passed to magic_tcpudp_cksum. 2008-08-21 17:43:23 +00:00
kris
910cb5ca48 Moving block_socket() and unblock_socket() from Nmap to Nbase for reuse in
Nsock and Ncat
2008-08-02 03:44:35 +00:00
kris
299e0de19e o Added --ip-options support for the connect() scan (-sT). [Kris] 2008-07-14 20:02:30 +00:00
kris
83ed199791 Adding packet validity checking to readip_pcap() so the caller can assume the
packet is OK from the get-go rather than running basic checks of it's own.

In a nutshell this patch checks to make sure:

1) there is enough room for an IP header in the amount of bytes read
2) the IP version number is correct
3) the IP length fields are at least as big as the standard header
4) the IP packet received isn't a fragment, or is the initial fragment
5) that next level headers seem reasonable

For TCP, this checks that there is enough room for the header in the number
of bytes read, and that any option lengths are correct.  The options checked
are MSS, WScale, SackOK, Sack, and Timestamp.

This also fixes a bug I discovered while testing.  Since the Ethernet CRC
(and other datalink-layer data) could be read and counted, it was being
returned that there was more IP packet than there really was.  This didn't
cause an overrun of the buffer or anything, just that garbage data could have
easily been read instead of real packet data.  Now, if validity is checked for
and the number of total bytes read is larger than the IP's length, the length
is set to the IP header's total length field.

This seems to work great after doing what testing I could.  It's been out on
nmap-dev for a couple of weeks without any bad reports (none at all for that
matter).  I reviewed this patch again before committing and it looks good as
well.
2008-06-30 23:55:19 +00:00
kris
9af737cd7f Changing --no_stylesheet to --no-stylesheet in the refguide, and changing
a few more long options with underscores in comments and output
2008-06-08 15:34:07 +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
kris
9a89b403f9 Moving Nmap's config.h[.in] to nmap_config.h[.in] 2008-04-28 17:53:32 +00:00
fyodor
5551c5a311 o Fixed a bunch of code to avoid compilation warning messages (at
least on some Linux machines) [Andrew J. Bennieston]
2008-04-09 02:11:20 +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
kris
dfc9eba4db enable --ttl support for connect() scans 2007-10-14 14:37:56 +00:00
david
eddc2b0839 Merge r5733:5850 from /nmap-exp/david/nmap-massping-migration.
Remove special-purpose log functions for graphing congestion control and other t
hings. There's enough information provided by -d3.

Update the congestion control graph program and add a program for graphing probe
s and drops.

Increase the initial ccthresh from 50 to 75.

Change how much the congestion threshold drops on packet drops.

Print group timing stats with -d2 and individual host timing stats with -d3.

Bump up the cc-graph.sh y axis limit to 80.

Put graphs in the same directory as their log file.

Go ahead and adjust timing for ICMP destination unreachables. I'm going to commi
t and experimental change to the congestion control that doesn't rely on this an
y more.

Scale group congestion control increments by the inverse of the packet
receipt ratio. This gives great performance without ignoring ICMP
destintation unreachable drops. This may be the breakthrough we've been
looking for.
I'll probably send a message about this later today. For information and        
graphs right now, see
http://www.bamsoftware.com/wiki/Nmap/ResponseRateScaledCongestionControl.
Sorry it's only in my nmap-massping-migration branch for now, but please
give it a try.

Only -d2 is now needed for cc-graph.sh.

Put a cap of 50 on the cwnd scaling factor.

Fix up the order of things in the packet_ratio debugging output.

Move the packet_ratio debugging output to printAnyStats and rearrange the order 
in which things are printed.

Put a header with the scan args at the top of the probes-graph.sh data files.

Add a function pcap_print_stats that shows the number of received and dropped pa
ckets for a descriptor.

Call pcap_print_stats after a run of ultra_scan.

Increase the congestion window less aggressively than before with -T4 and -T5 (s
till more aggressivly than with lesser timing values).
2007-09-18 06:34:33 +00:00
fyodor
8b9a340fc4 merge soc07 r4829 - Added winpcap device names to the --iflist table 2007-08-11 03:44:40 +00:00
fyodor
58522c59f6 merge soc07 r4822 - Reduce the number of build dependencies. 2007-08-11 03:35:46 +00:00
kris
cc14c538ad Removing extraneous newlines (sometimes up to 9 of them) from ends of a few files 2007-02-04 02:53:29 +00:00
kris
4cbb311bc4 Change __BSD_SOURCE references to _BSD_SOURCE. The __FAVOR_BSD and __USE_BSD have double underscores in front, the *_SOURCE only have one. 2007-01-26 22:32:42 +00:00
kris
69754e8311 Use dnet headers for TCP and UDP. This allows us to remove netinet tcp.h and udp.h references, the udphdr_bsd stuff, and the TH_ECE/TH_CWR #defines in tcpip.h. That was easy, but we (Fyodor and I) came to the conclusion that IP and ICMP aren't worth the hassle to switch (I was testing TCP, UDP and IP in my branch). The struct icmp_hdr in dnet isn't setup anything like what we're using now. Then, struct ip_hdr uses ip_addr_t (typedef'd to uint32_t in that ip.h) instead of struct in_addr for the IP addresses, and that would require some dnet modifying to work right. We might be able to come up with some elegant solution for IP, but probably not for ICMP. For now, they're still left up to netinet (or tcpip.h). 2007-01-23 05:29:59 +00:00
kris
928750ce05 Fix some typos, one in output. IPPROTO_TCP -> IPPROTO_IP (2), extre -> extra, /etc/protocol -> /etc/protocols 2007-01-19 01:39:03 +00:00
kris
9ff574d50e Merging my IGMP -sO patch. This adds build_igmp_raw() to easily build IGMP packets and uses it for -sO. Systems respond more when these packets are sent with an actual IGMP header. The RFC says they MUST verify the checksum, so that's most likely why I always got open|filtered instead of open. Since the different IGMP types all seem to have the checksum in the same place in the packet, it should at least tell us if it's supported or not even if the rest of the header is bogus (because the rest of the header has changed a little bit between the versions). 2007-01-17 17:40:16 +00:00
fyodor
8e2de50dd3 Kris Katterjohn patches for code clean up, iana ip assignment update, fixe fileexistsandisreadable 2006-12-12 09:56:15 +00:00
fyodor
49a4a74d70 I hope these changes fix windows compilation 2006-11-20 07:56:38 +00:00
fyodor
508e674ce4 fix Mac OS X pcap problem, I hope 2006-11-19 09:35:26 +00:00
fyodor
10ffae41cf spellcheck patch 2006-09-05 08:39:32 +00:00
fyodor
9cbae88f44 Add -ip-options support 2006-08-29 03:26:00 +00:00
fyodor
b28d51167c Minor source code header improvements 2006-08-25 01:47:49 +00:00
fyodor
a403864351 Replace file headers, mostly to update copyright to 2006 2006-08-24 04:43:50 +00:00
fyodor
40672e849b a decent amount of OS detection changes/fixes 2006-08-20 01:56:53 +00:00
fyodor
d3055b26bf Some patches from Marek 2006-07-04 08:00:11 +00:00
fyodor
56384d8770 About to release 4.20SOC-ALPHA1 2006-06-25 02:02:14 +00:00
fyodor
48a6d1ce41 latest changes, including a couple doug fixes 2006-05-16 21:46:41 +00:00
fyodor
7fafddee53 latest changes ... 2006-03-25 23:56:48 +00:00
fyodor
76ab1500b3 make a ton of global symbols static 2006-03-05 23:59:46 +00:00
fyodor
a63916c182 about to apply gtk2 patch 2005-12-06 21:15:45 +00:00
fyodor
7b8eea1212 fixed (I hope) some problems with -S and -e; about to release informal 3.94ALPHA1 2005-11-28 01:34:08 +00:00
fyodor
0d32ed3592 heading off for thanksgiving 2005-11-22 23:21:55 +00:00
fyodor
d187c68017 blah 2005-10-01 23:50:27 +00:00
fyodor
87e4e19e02 bug fixing 2005-08-24 19:22:11 +00:00
fyodor
02397959b3 removed winip lib 2005-08-10 04:16:18 +00:00
fyodor
bdf2caa2a4 vcproj for nmap 2005-08-08 05:48:49 +00:00
fyodor
f071c68e07 removed BSDFIX/BSDUFIX macros 2005-07-27 02:34:14 +00:00
fyodor
2b834d90d2 Have it compiling on Solaris, and soon should have it working. Bwahahahahahahaha 2005-07-22 10:08:53 +00:00
fyodor
555c986ac3 Whew -- big reorganization to allow ethernet sends of IP packets 2005-07-19 05:07:51 +00:00
fyodor
3922128b12 first build with ARP kung-fu, though far from finished with that feature 2005-04-29 06:53:17 +00:00
fyodor
26ce3d66f4 get rid of silly top-level trunk dir 2005-04-11 22:34:19 +00:00