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

245 Commits

Author SHA1 Message Date
dmiller
b940270375 Move random address generation to TargetGroup/NetBlock 2024-05-01 22:19:29 +00:00
dmiller
f999182d0f Bump date and reapply header templates 2024-02-28 18:46:45 +00:00
dmiller
5f58debc51 Handle RLIM_INFINITY as socket limit. 2023-09-01 21:12:19 +00:00
dmiller
6f6b2de214 Apply new license templates, bump copyright date 2023-04-14 17:11:46 +00:00
dmiller
5ae1b0fda2 Update static data in libnetutil 2022-10-21 21:15:46 +00:00
dmiller
de9f84d080 Get better error message. See #2179 2022-09-28 21:40:57 +00:00
dmiller
dd690b3e0b Bump copyright date and update some links [ci skip] 2022-02-18 17:38:46 +00:00
dmiller
04a206d60a Rename vars to avoid hiding global 2022-01-31 18:11:23 +00:00
dmiller
2cea59aca0 Allow cleanup of netutil's interfaces cache 2021-12-12 23:42:38 +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
8bb25f535c Clarify HopByHop padding code, addressing LGTM.com finding 2021-07-23 16:50:11 +00:00
dmiller
d15747db32 Minor optimization for name resolution: null servname 2021-07-22 17:18:29 +00:00
dmiller
5707fb14c5 Upgrade to VS 2019 2021-07-19 23:58:02 +00:00
nnposter
4564749ccd Reject non-useable routes. Fixes #2206 2021-01-18 20:11:40 +00:00
dmiller
67cccec38d Use checked_fd_set in 2 more places: bounce scan and pcap_select 2021-01-07 18:31:09 +00:00
nnposter
d3ef26b229 Silence GCC warning about string truncation. Fixes #2186 2020-11-26 02:29:39 +00:00
dmiller
922b8cbbc4 Remove constant comparisons for values that cannot exceed the max 2020-10-15 18:51:20 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
b03c96c326 Change a FIXME to a TODO with documentation of related issues #180 and #1407 2020-01-14 03:39:25 +00:00
dmiller
86f80305a1 Consolidate duplicate functions read_na_pcap and read_ns_reply_pcap. 2020-01-13 23:33:30 +00:00
dmiller
4ffeb09ad3 Use libnetutil's read_reply_pcap to deduplicate pcap reading logic. 2020-01-13 21:48:04 +00:00
dmiller
00cb4d22d9 Switch from pcap_next to pcap_next_ex to check for errors
This change supports #1394. When the network goes down, Nmap ought to
stop instead of slowing to an infinite crawl.
2020-01-13 17:14:45 +00:00
dmiller
5e30d6e29e Fix loop flow. #1834 2019-12-29 05:15:10 +00:00
dmiller
6d624f9ed7 Correct function prototypes from earlier change 2019-12-26 16:46:18 +00:00
dmiller
898988dcd3 Remove dangling else 2019-12-26 16:46:17 +00:00
dmiller
7d1530476d Remove some unnecessary/constant comparisons. #1834 2019-12-25 20:01:17 +00:00
dmiller
0c2a3776f0 Remove incorrect use of const on return type (not pointer). #1834 2019-12-25 20:01:15 +00:00
dmiller
5abe0aa8cc Combine/simplify conditional branches, eliminating dead code. See #1834 2019-12-22 21:50:55 +00:00
dmiller
87a92c969f Fix some LGTM.com findings related to type widths 2019-12-20 21:51:01 +00:00
dmiller
ed66ed03ec Use unique header guards 2019-11-19 17:53:42 +00:00
dmiller
77421962aa Remove mostly-unused winclude.h 2019-05-29 15:11:13 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
dmiller
57ff460847 Support names for all IP protocols in libnetutil. See #841 2019-05-22 16:40:49 +00:00
dmiller
f8004b792c Replace a config-time check with a ifndef that also works on Windows. 2018-11-21 06:23:08 +00:00
dmiller
d8c1d935f1 Move Npcap headers and lib stuff to nmap-mswin32-aux 2018-10-18 03:28:39 +00:00
dmiller
30db709755 Optimistically revert mutex that was needed with WinPcap. Npcap likely is unaffected. 2018-10-03 16:57:54 +00:00
dmiller
534643aac6 Performance tweak for Windows. See #1327 2018-09-26 21:12:40 +00:00
dmiller
d6a04c465e Call pcap_set_immediate_mode to get results back immediately. 2018-08-21 04:51:33 +00:00
dmiller
7f1485f56d Switch to pcap_create instead of pcap_live_open. See #1291 2018-08-20 22:08:56 +00:00
nnposter
302954fb3f Rectifies incorrect use of va_start/va_end from stdarg.h. Closes #1297 2018-08-09 22:11:15 +00:00
dmiller
689ea0e05d Spelling corrections. Fixes #1160 2018-03-26 14:59:41 +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
rewanth
6ee953a5ff Removes trailing spaces in 69 files. Closes #971. 2017-08-23 08:52:40 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +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
dmiller
f4c5c832a6 Remove dependency on pcap-int.h Fixes #426
Windows doesn't support selectable pcap fds, so instead of fiddling with
adapter read timeouts via PacketSetReadTimeout, we get an event handle
with pcap_get_event and WaitForSIngleObject. This means we don't need to
extract the adapter from the pcap_t, which is not part of the libpcap
API and was causing crashes switching between the libpcap versions used
by WinPcap and Npcap.
2016-08-25 18:41:03 +00:00
vincent
b5606dde91 Hide first makefile attempt to include makefile.dep
This is to avoid having a warning saying that there is no makefile.dep
file, which will be generated right after the warning and then
included in the Makefile.
2016-08-16 09:31:59 +00:00
dmiller
af13cef717 Upgrade to Npcap 0.08 (libpcap 1.8.0 headers for Windows) 2016-08-13 20:04:05 +00:00
vincent
3bbd85b38d Correct bad fix for silencing compiler warning (overloaded functions) 2016-08-02 13:47:45 +00:00
dmiller
5d726c7733 Handle ICMPv6 packets without a body
Two issues here: First, IP protocol scan can send packets with protocol
58 (ICMPv6) even over IPv4. This led to a bad interaction where the
packet was created (in build_protoscan_packet) without a data payload,
but setIP tried to set the packet's Identifier field (present in both
ICMPv6 and ICMP Echo Request packets), leading to a heap buffer
overflow. Instead, we now only try to set this identifier when the IP
version matches the ICMP version, indicating that we set the data
payload.

The other issue was a out-of-bounds read while packet tracing when an
ICMPv6 packet without a payload was sent or received, due to trying to
read the type and code. Now we check that the data length is sufficient
to contain an ICMPv6 header before attempting to read one.

Credit LLVM/Clang's AddressSanitizer with catching these bugs.
2016-07-28 05:11:35 +00:00