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

151 Commits

Author SHA1 Message Date
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
2181443b63 Address a few code analysis warnings: uninitialized vars and undefined behavior 2021-08-06 16:17:46 +00:00
dmiller
1820469f5a Bump supported Windows to Win7 (drop Vista) and update a deprecated API 2021-07-29 21:09:44 +00:00
dmiller
95d98fe6ae Linker optimizations for all projects (Windows) 2021-07-22 17:19:53 +00:00
dmiller
5707fb14c5 Upgrade to VS 2019 2021-07-19 23:58:02 +00:00
dmiller
68d2c0e960 Use stack for global special value so we don't have to clean it up. 2021-04-27 19:22:10 +00:00
dmiller
c9b7c2f590 Moar const 2021-04-26 17:58:01 +00:00
nnposter
004c8627c1 Do not override snprintf in VS 2015 and newer
MSVC preprocessor triggers #error in <stdio.h> if redefined

From MS doc:
Beginning with the UCRT in Visual Studio 2015 and Windows 10, snprintf is
no longer identical to _snprintf. The snprintf function behavior is now C99
standard compliant.

Closes #2255
2021-04-16 02:33:39 +00:00
dmiller
05faa0287a Fix addrset matching with overlapping CIDR specs. Fixes #2257 2021-03-01 18:42:00 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
8e65c92264 Pass error along instead of printing (link error) 2020-09-02 17:05:55 +00:00
dmiller
083475eb6f Use larger buffer size for socket errors (WSAETIMEDOUT was longer). 2020-08-31 21:11:00 +00:00
dmiller
b1620387ba Add thread-safe gmtime equivalent to nbase 2020-01-19 16:37:37 +00:00
dmiller
8f3364a441 Remove more vestiges of Windows raw socket quirks 2020-01-16 19:12:57 +00:00
dmiller
3c7f2de01b Properly return negative on error from vsnprintf
Our implementation of vsnprintf for systems where it is missing did not
correctly return a negative value on error, instead returning the size
passed in. We got this code from tcpdump/libpcap, and it was wrong
there, too, though their latest master branch has removed it in favor of
requiring a C99 compiler (C99 guarantees vsnprintf).

This should remove a LGTM code analysis finding (See #1834) of
cpp/constant-comparison in Ncat because we were checking for a negative
return from Snprintf, which would never occur.
2019-12-29 05:53:27 +00:00
dmiller
bf9b61ad22 Fix comment style for LGTM alert suppression 2019-12-22 14:32:04 +00:00
dmiller
e356ad1123 Add thread-safe wrapper for ctime. 2019-12-20 20:53:32 +00:00
dmiller
20f47dd6f2 Can't use a macro for a declared function (win32) 2019-12-20 20:53:31 +00:00
dmiller
4a1c9424d3 Replace localtime calls with thread-safe alternative. See #1834 2019-12-15 05:05:57 +00:00
dmiller
6844a8134c Call AC_SEARCH_LIBS before AC_CHECK_FUNCS 2019-11-14 16:37:00 +00:00
dmiller
3a744a85c2 Check o.debugging *after* parsing options, otherwise it's always false. 2019-10-30 23:34:34 +00:00
nnposter
9e8852a7c7 Rectify undefined behavior of out-of-range shift op
Fixes #1717, closes #1718
2019-09-03 21:56:31 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
nnposter
3da2e6a6a6 Silence a GCC warning 2019-02-19 00:24:51 +00:00
nnposter
71eec581a3 Move declaration to the front to improve compiler compatibility 2019-01-13 23:33:49 +00:00
dmiller
38b843558e Change for-loop initial declarations not allowed in C89 2018-11-13 17:32:32 +00:00
dmiller
66eee935a9 Avoid compiler warning about signedness mismatch on VS2013. 2018-11-08 14:52:32 +00:00
dmiller
1345eb247b Use iterative solution instead of tail recursion to avoid stack problems when optimization is off 2018-11-08 04:25:12 +00:00
dmiller
7ea0a8c9ac Make functions static where possible 2018-11-06 15:07:02 +00:00
dmiller
824f9dcb2f Rearrange declarations to put all addrset functions in nbase.h, hide struct addrset internals. 2018-11-01 04:35:00 +00:00
dmiller
27807aadb4 Straighten out some headers and the (struct) addrset type 2018-11-01 04:34:59 +00:00
dmiller
c223ec5c36 Remove unused IPv6 support for legacy addrset_elem bit-matching 2018-11-01 04:34:58 +00:00
dmiller
0f916ec3bc Fix an error in common-prefix calculation 2018-10-31 23:44:52 +00:00
dmiller
625884e7dc Support netmasks in addrset trie. Use trie for resolved addresses and CIDR masks. 2018-10-31 20:32:16 +00:00
dmiller
324965d1d2 Use a radix tree (trie) to match exclude addresses
Current exclusions list from --excludefile takes linear time to match
against. Using a trie structure, we can do matching in O(log n) time,
with a hard maximum of 32 comparisons for IPv4 and 128 comparisons for
IPv6. Each node of the trie represents an address prefix that all
subsequent nodes share; matching stops when one is matched exactly or
when the candidate address does not match any prefix of the addresses in
the trie.

For now, only numeric addresses without netmask are supported. We plan
to extend this to addresses with netmasks, including resolved names.
Storing IPv4 ranges and wildcards in this structure would be
prohibitively complex, so the existing linear match method will be used
for those. It is unlikely that any users are using large exclusion lists
of these types of specifications, so performance impact is small.

Potential future features could use the trie structure to implement
custom routing or scope-limiting.

This was a todo list item based on this report:
https://seclists.org/nmap-dev/2012/q4/420
2018-10-31 14:01:34 +00:00
nnposter
973b471c11 Corrects a few issues related to snprintf return values 2018-08-26 02:29:14 +00:00
nnposter
d22dbc63b8 Adds a necessary search restart to custom strcasestr().
Previously needle "ab" would not be found in haystack "aab".
2018-08-25 22:39:36 +00:00
nnposter
6725a34200 va_copy also requires va_end 2018-08-25 19:41:32 +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
cdae588782 Check for additional libs required for inet_pton/ntop, as on Solaris 2018-07-02 16:20:39 +00:00
dmiller
01e7430797 Remove the old optparse function; options must be specified with hyphens. 2018-02-20 17:37:47 +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
dace53a931 Avoid selecting on STDIN on Windows. Fixes #978 2017-09-30 15:34:35 +00:00
dmiller
b90786a5ef Regen configure scripts 2017-09-27 21:29:31 +00:00
dmiller
97d3fb34f6 Silence autoreconf warnings. Closes #1009 2017-09-19 17:01:39 +00:00
dmiller
011ebd731b Fixes to configure for libssh2+libz 2017-07-31 16:56:48 +00:00
evangel
0c142333bb Merged gsoc-ssh branch. Closes #910 2017-06-29 21:27:35 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +00:00
dmiller
34841655c3 Remove un-checked HAVE_RPC_TYPES_H as we have no test for it 2017-04-19 14:24:43 +00:00