1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 20:39:02 +00:00
Commit Graph

125 Commits

Author SHA1 Message Date
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
nnposter
32d85005d9 Enables support for TLS SNI on the Windows platform. Fixes #700 2017-02-25 00:47:30 +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
tudor
1e1f744186 Added IOCP integration for Nsock, engine IOCP is the default engine on Windows 2016-08-22 19:15:13 +00:00
tudor
63b31682f4 Reverted the IOCP integration 2016-08-11 18:58:03 +00:00
tudor
1aa7958e23 Added IOCP integration for Nsock 2016-08-09 12:44:55 +00:00
dmiller
2e05009ff7 Avoid undefined behavior of shifting over the sign bit by declaring unsigned literal 2016-07-28 05:11:34 +00:00
dmiller
8895dfaa20 Backport r35869: move definition of _WIN32_WINNT into nbase_winconfig 2016-06-15 13:56:03 +00:00
dmiller
f90587f131 Bump earliest supported Windows version to Vista, enabling poll nsock engine. 2016-06-04 02:46:13 +00:00
dmiller
855ec33fc0 Allow use of Windows' own inet_pton and inet_ntop functions 2016-06-04 02:46:12 +00:00
dmiller
50054e6ed7 Update platform toolset to remove XP compatibility 2016-06-04 02:46:11 +00:00
dmiller
6e33d6ac3c Bump date in copyright headers 2016-04-04 15:38:44 +00:00
david
ea400e1ff0 Typo fix: "nall"→"null". 2016-01-04 22:10:57 +00:00
dmiller
7300cde374 Avoid segfault with vasprintf("%s", NULL). http://seclists.org/nmap-dev/2016/q1/4 2016-01-04 21:44:47 +00:00
dmiller
37d517b32e Use XP compatibility SDK, because users are complaining 2015-11-10 16:47:35 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
gio
730c9936bb Keep nbase compatible with old C compilers 2015-08-18 16:21:25 +00:00
gio
a44030ae23 Add tests subdir and have DNS test compile and run 2015-07-30 06:27:30 +00:00
gio
15840e1793 Move sockadd_storage helpers functions to appropriate files 2015-07-30 06:27:13 +00:00
gio
2d1251329f Add ss_family to sockaddr_storage and align to 64bit 2015-07-09 09:26:11 +00:00
dmiller
2056a30a76 Fix compilation on VS2010. Closes #183 2015-07-08 11:58:57 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +00:00
dmiller
fbbb64a190 Silence warnings: 'Makefile.in seems to ignore the --datarootdir setting' 2015-03-11 04:14:24 +00:00
dmiller
0952bed032 Merge final changes to support VS2013 build
Changes:

* Fix a collision of the name PS_NONE with a different constant in shlobj.h
* Update solution and project files for VS2013
* Update the NSIS installer to reference the VC 2013 redistributable
2015-01-17 04:35:01 +00:00
dmiller
fc99bed706 Don't use unnecessary parens with __declspec
Reported by nnposter, this broke on VS2010. Pretty sure this was just a
simple mistake in the first place. Fixes #33
2015-01-01 13:39:47 +00:00
dmiller
85bb2d388d Define a NORETURN macro 2014-11-17 13:25:32 +00:00
dmiller
a067bc25bc Let MSVC know about noreturn attribute to help with code analysis 2014-11-12 13:29:40 +00:00