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

44 Commits

Author SHA1 Message Date
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
b1620387ba Add thread-safe gmtime equivalent to nbase 2020-01-19 16:37:37 +00:00
dmiller
e356ad1123 Add thread-safe wrapper for ctime. 2019-12-20 20:53:32 +00:00
dmiller
4a1c9424d3 Replace localtime calls with thread-safe alternative. See #1834 2019-12-15 05:05:57 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +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
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
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
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
6e33d6ac3c Bump date in copyright headers 2016-04-04 15:38:44 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
gio
a44030ae23 Add tests subdir and have DNS test compile and run 2015-07-30 06:27:30 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +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
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
eab18b4522 Get rid of stringisprintable() function - this wasn't used anywhere in the code, yet it was linked into the executable. 2014-04-29 10:56:28 +00:00
david
31e4350dba Make the argument to checked_fd_isset non-const.
I got this error compiling on OS X 10.6:
In file included from netutil.cc:132:
../nbase/nbase.h: In function 'int checked_fd_isset(int, const fd_set*)':
../nbase/nbase.h:385: error: invalid conversion from 'const fd_set*' to 'fd_set*'
../nbase/nbase.h:385: error:   initializing argument 2 of 'int __darwin_fd_isset(int, fd_set*)'
netutil.cc: In function 'int send_ipv6_ip(const sockaddr_in6*, const unsigned char*, size_t)':
netutil.cc:3846: warning: unused variable 'tclass'
make[2]: *** [netutil.o] Error 1
make[1]: *** [netutil_build] Error 2
2014-04-11 05:08:30 +00:00
henri
f20d84f9c1 Workaround to compile inline functions with MSVC v16 [Patch from Gisle Vanem]. 2014-02-24 13:16:24 +00:00
dmiller
3f0d0c16f9 Spellcheck on Nmap, Nsock, Nbase source files 2014-02-20 18:44:12 +00:00
henri
64fb5b3482 Added safe fd_set operations.
Only FD_SET and FD_CLR were available. Added a FD_ISSET equivalent.
Implemented them as static inline instead of macros for consistency.

These functions abort() if the FD number is higher than FD_SETSIZE
(except on windows where no check is performed).
2014-01-30 19:02:57 +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
d33tah
b2187f6749 Remove most tabs in nbase. This probably needs some fixes, but the tabs really confused my vim. 2013-08-09 00:16:52 +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
d33tah
b62709eb20 merging in the --lua-exec feature for ncat. 2013-07-02 16:56:03 +00:00
david
ebea23e398 Merge r30177 from nmap-npingchanges: Add function to generate random 64-bit unsigned integers
Originally committed by luis but recommitted by david after recovery
from backup.
2013-04-12 17:29:09 +00:00
david
87bab78479 Move CHECKED_FD_SET and CHECKED_FD_CLR to Nbase. 2013-02-22 00:45:57 +00:00
david
93b978fba8 Merge 30432:30436 from /nmap-exp/david/ipv6-ranges.
This is simple IPv6 unicast ranges. For example,
nmap -6 en.wikipedia.org/120 -sn

The other, more complicated part of this overall change is automatic
multicast scanning of large local subnets. That part isn't done yet.
2012-12-19 01:10:39 +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
henri
1e3115dbcb Renamed nmap_fileexistsandisreadable() by file_is_readable(). Former was
hardly readable and is not even a good candidate for longest method
name (http://msdn.microsoft.com/en-us/library/system.windows.media.textformatting.textsource.gettexteffectcharacterindexfromtextsourcecharacterindex.aspx#Y0)
2012-10-20 15:00:10 +00:00
david
6ec453e4e8 Add socket_bindtodevice function to Nbase.
The Linux-specific SO_BINDTODEVICE sockopt causes packets to be sent on
a specific interface, in cases where merely setting the source address
does not uniquely determine the interface.
2012-10-03 15:43:22 +00:00
david
ecf62c247a Check for and include <sys/select.h>.
This was reported as a build error by John Spencer using musl libc.
http://seclists.org/nmap-dev/2012/q3/776
2012-09-12 04:54:21 +00:00
david
e1576d1d14 Change alloc_sprintf to return a length. 2012-03-08 23:56:26 +00:00
david
e28fb42ff4 Move alloc_sprintf from xml.cc to nbase. 2012-03-08 23:56:07 +00:00
fyodor
684f42c4ad One more adjustment to the license text. Notes that Zenmap, Ncat, and Nping use this license. Note that contributions made directly in the src repository are treated the same as those in the mailing list. 2012-03-01 06:53:35 +00:00
fyodor
e96a7b7b24 Update the headers for each code file. This updates code copyright dates to 2012, notes the awesome NSE in the list of technology, and slightly rewords the derivative works clarification 2012-03-01 06:32:23 +00:00
david
620431e723 Give addset_elem_print external visibility. 2011-12-08 23:16:56 +00:00
david
ed2ba4e168 Copy nping, nsock, nbase, zenmap, ncat from their homes in /.
If you have trouble updating after this revision you need to follow
these instructions. You have probably just seen an error like this:

svn: URL 'svn://svn.insecure.org/nping' of existing directory 'nping'
does not match expected URL 'svn://svn.insecure.org/nmap/nping'

This is caused by the replacement of SVN externals.

Here's what you need to do. First, save any local changes you might have
in the nping, nsock, nbase, ncat, and zenmap directories. (For example
by running "cd nping; svn diff > ../nping.diff".) If you don't have any
local changes you can skip this step.

Then run these commands:

rm -rf nping/ nsock/ nbase/ ncat/ zenmap/
svn update
svn cleanup

If all else fails, you can just delete your whole working directory and
check out anew:

svn co --username guest --password "" svn://svn.insecure.org/nmap

There may be further discussion in the mailing list thread at
http://seclists.org/nmap-dev/2011/q4/303.
2011-11-16 21:49:44 +00:00