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

161 Commits

Author SHA1 Message Date
dmiller
99e396b4a0 Fix various fatal errors around --send-eth 2025-09-03 17:04:47 +00:00
dmiller
67a796844f Consolidate raw socket acquisition. 2025-06-30 19:24:32 +00:00
dmiller
fc71b7544d Allow layer-2 sending for non-Ethernet links; MAC addr optional 2025-06-26 19:03:01 +00:00
dmiller
3499025302 Wrap dnet eth functions for non-Ethernet links 2025-06-23 20:54:32 +00:00
dmiller
42170b067f Remove unneeded g_has_npcap_loopback 2025-04-16 00:00:05 +00:00
dmiller
6db5c9cb85 Bump copyright date 2025-02-26 17:44:43 +00:00
dmiller
1ec9caea3b Replace nested MAX/MIN macros with box() function 2024-06-27 19:36:05 +00:00
dmiller
019557382b mass_dns: Allow multiple addresses for each A/AAAA lookup 2024-04-30 16:39:21 +00:00
dmiller
e8c7e7ba01 Generalize nmap_mass_rdns to support more than just Targets and PTR requests 2024-04-18 19:16:23 +00:00
dmiller
f999182d0f Bump date and reapply header templates 2024-02-28 18:46:45 +00:00
dmiller
6f6b2de214 Apply new license templates, bump copyright date 2023-04-14 17:11:46 +00:00
dmiller
3c6c84b5f7 Avoid copying target/source addr data when a pointer will do 2022-10-31 20:50:19 +00:00
dmiller
2fcfac9329 Closes #2541. Consolidate nmap-payloads and nmap-service-probes; use port scan responses in version scan. 2022-10-21 21:15:48 +00:00
dmiller
dd690b3e0b Bump copyright date and update some links [ci skip] 2022-02-18 17:38:46 +00:00
fyodor
3aec3f3a07 Update to latest copyright templates. Main change is that Insecure.Com LLC is now Nmap Software LLC 2021-11-23 16:04:37 +00:00
dmiller
74e066d356 Another round of const 2021-04-27 19:22:12 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
9c83be3833 Allow multiple UDP payloads per port. Closes #1859 (payloads to be committed later) 2020-09-01 17:09:46 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
fyodor
ff62300249 Bump copyright dates to 2018 and slightly improve wording (doesn't change meaning) of Nmap license header text 2018-01-28 21:18:17 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +00:00
dmiller
ab5e247cee Include netutil.h for IPPROTO_SCTP constant where necessary. Fixes #868 2017-04-26 18:55:16 +00:00
dmiller
891c3be3b9 remove tcpip.h from other headers' includes 2017-04-19 13:53:57 +00:00
fyodor
4bd67aa2fb Update the Nmap license/header text to reflect latest updates to docs/legal-notices.xml 2016-12-14 00:12:23 +00:00
abhishek
9d288db7fd Add support for decoys in IPv6 closes #433 and fixes #98 2016-08-17 06:09:09 +00:00
dmiller
67fd101b01 Enable Nmap, Nping to use Npcap over Winpcap if available. 2016-06-14 14:16:46 +00:00
dmiller
6e33d6ac3c Bump date in copyright headers 2016-04-04 15:38:44 +00:00
dmiller
0021991042 Fix a segfault with --release-memory without --traceroute 2015-09-09 02:50:50 +00:00
dmiller
0f371d701a Consolidate TCP options for SYN into nmap.h 2015-07-14 03:08:17 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +00:00
dmiller
26faf21ae1 Work around weird AIX traceroute hang
std::list::size() was hanging because list traversal was broken for this
particular static list (timedout_hops). Could not reproduce with a small
test program, but another AIX user confirmed. Exhausted other options
before switching it to dynamic allocation (of the list itself, not the
elements, which are always dynamically allocated), which somehow
bypasses the problem.
2014-09-16 15:36:44 +00:00
dmiller
9a155c269d Actually use reply ttl for distance guessing in traceroute
This chunk of code in read_replies was generating valgrind errors
because reply.ttl was uninitialized:

  if (host->state == HostState::COUNTING_DOWN) {
    /* If this probe was past the target, skip ahead to what we think the
       actual distance is. */
    int distance = get_initial_ttl_guess(reply.ttl) - reply.ttl + 1;
    if (distance > 0 && distance < host->current_ttl)
      host->current_ttl = MIN(distance, MAX_TTL);
  }

My compiler was setting the initial value to 0, which meant that
distance was always 33, clearly wrong. Setting reply.ttl in decode_reply
silences the error and causes distance to be more accurate.
2014-09-15 17:27:10 +00:00
dmiller
5adfb3b1de Update copyright notice to 2014 2014-08-16 01:52:33 +00:00
jay
8d5ec9e310 Reapply r33420, r33421. Fix a missing right parenthesis. https://xkcd.com/859/ 2014-08-15 12:09:22 +00:00
fyodor
f6f59a7cd7 Auto regeneration with latest template files, etc. 2014-08-13 22:57:43 +00:00
jay
d4cf544df6 Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
d33tah
a80c90608c sed -i 's/if ( /if (/g' *.cc *.h; sed -i 's/for ( /for (/g' *.cc *.h; sed -i 's/( /(/g' nmap_amigaos.h tcpip.h service_scan.cc
There's still quite a lot of code like this, nse_openssl.cc being most
messy IMHO. Also, I left out "if( something )" syntax.
2014-06-25 15:40:54 +00:00
d33tah
421176fc00 Get rid of double newline at the EOF I accidentally introduced in the
last commit.
2014-06-18 11:30:02 +00:00
d33tah
e3d1c178e3 Add newlines at the EOF in conformance to Daniel's coding standards
proposal. This only affects Nmap's root directory. We might also need to
modify the code which autogenerates Nmap's source code files such as IPv6
fingerprinting code.
2014-06-18 10:18:58 +00:00
dmiller
c9714990c7 Remove trailing whitespace from C/C++ files
https://secwiki.org/w/Nmap/Code_Standards
2014-02-12 20:25:51 +00:00
d33tah
ccd0c02a4c Add a lacking space in the license comment. The command I used to do this is:
for file in `grep "* including the terms and conditions of this license text as well.       \*" * -r --files-with-match `; do sed "s/\* including the terms and conditions of this license text as well.       \*/* including the terms and conditions of this license text as well.        */g" -i $file; done
2013-09-11 19:06:20 +00:00
fyodor
6e01ecd452 Update an email address, fix a typo, and slightly reword a sentence. 2013-07-30 00:02:00 +00:00
fyodor
83fb10ec56 Update the Nmap copyright/license files. This isn't the new Nmap Public Source License we've been discussing on the list, but rather just a 'quick patch' to hopefully prevent some of the abuse we've been seeing from companies lately. More details on the changes will be posted to the dev list. Also, the copyright year was updated to 2013 (which is the only change to Nsock license statements). 2013-07-28 22:05:05 +00:00
fyodor
6a42ef47c0 Update the Nmap and Nsock source code headers to note new Nmap dev mailing list email address and a better URL for Nmap license. 2012-12-06 01:21:42 +00:00
david
7b18ea1bc0 Move win32_fatal_raw_sockets out of nmap_raw_socket.
For the same reason and with the same exception (nse_dnet.cc) as in
r30159.
2012-10-31 17:00:55 +00:00
david
03946ba2f5 Return -1 instead of calling pfatal in nmap_raw_socket.
There was one case where we previously didn't fatal, in nse_dnet.cc.
Move the fatal calls out of nmap_raw_socket and into the calling scope,
with the exception of the one in nse_dnet.cc.

The problem was reported by Rob Nicholls.
http://seclists.org/nmap-dev/2012/q4/186
2012-10-31 16:09:47 +00:00
david
53b4fdcf0a Move HopIdent above hop_cache, which uses it.
This caused an error message when compiled with Clang 3.1:

traceroute.cc:173:41: note: in instantiation of exception specification for 'map' requested here
static std::map<struct HopIdent, Hop *> hop_cache;
                                        ^
traceroute.cc:173:24: note: forward declaration of 'HopIdent'
static std::map<struct HopIdent, Hop *> hop_cache;
                       ^

Found by arrowdodger. http://seclists.org/nmap-dev/2012/q4/58.
2012-10-11 05:42:37 +00:00
david
21af053639 Enable IP Protocol (Next Header) traceroute for IPv6. 2012-10-06 21:26:34 +00:00
david
cf33599c2f Support IPv6 SCTP traceroute. 2012-10-06 21:26:33 +00:00
david
7830eb4db6 Support IPv6 UDP traceroute. 2012-10-06 21:26:31 +00:00