1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00
Commit Graph

132 Commits

Author SHA1 Message Date
dmiller
3635595b24 Do not search NMAPDATADIR on Windows as it is not defined. See #2051 2020-08-28 15:06:08 +00:00
dmiller
df1874cedd Reduce CPU usage of OS scan by 50%
expr_match was wasting cycles implementing syntax not used or documented
elsewhere (boolean AND, "+" to mean non-zero), copying and allocating new
strings. Replacement reduces number of comparisons and performs parsing
in-place on the const input expression.
2020-05-20 05:23:47 +00:00
dmiller
dd0ace6d4a Split string pool functions into separate file from osscan.cc 2020-01-16 19:12:57 +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
ab79382f93 Additional header includes for time_t, gettimeofday, timeval, etc. See #1317, #1363 2019-05-22 15:27:13 +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
185db9db96 Correct a function name in a comment 2017-09-06 18:01:45 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +00:00
dmiller
86edcb0e5b Remove some unused includes 2017-04-19 19:06:47 +00:00
dmiller
77457d5f9b Remove an unused include 2017-04-19 14:23:42 +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
dmiller
ea4096c681 Strip or relocate more includes from nmap.h 2015-07-01 21:25:39 +00:00
dmiller
5e47450bdc Use forward-declaration of class FingerPrintResults in Target.h 2015-06-30 04:04:51 +00:00
dmiller
84d0e45641 Remove some unneeded includes of utils.h 2015-06-23 15:52:55 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +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
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
3f0d0c16f9 Spellcheck on Nmap, Nsock, Nbase source files 2014-02-20 18:44:12 +00:00
david
fb27ac625f DB cannot be NULL here.
I checked the history and it doesn't appear that DB was ever passed in
to this function, but always allocated locally.

Found using the STACK tool: http://css.csail.mit.edu/stack/.
2013-10-08 21:50:47 +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
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
04f595e692 Use stable_sort when sorting OS fingerprints for comparison.
Often an OS will respond differently to the second transmission of a
probe than to the first. For example, sometimes after it sends a SYN/ACK
it loses patience and sends a RST. The different second probe often has
different flags and options. In OS integration, I normally want to
compare with the first set of responses whenever they differ, so keep
them in the first position when sorting.
2012-02-14 02:59:28 +00:00
david
cb8d701bf4 Sort FingerPrints to remove the need for random access into them.
Random access into FingerPrints and FingerTests using gettestbyname and
getattrbyname was taking non-negligible time when multiplied by the
number of fingerprints in the database. Instead, sort the tests by name
and sort the attributes within each test. We may then compare two lists
by walking both of them in order, not having to look up the same element
twice.
2012-01-01 13:24:57 +00:00
david
c07b38c12f Factor out a function to do one OS expression comparison. 2012-01-01 13:24:55 +00:00
david
9bf2ec3884 Merge from /nmap-exp/luis/nmap-os6.
svn merge --ignore-ancestry svn://svn.insecure.org/nmap@26621 svn://svn.insecure.org/nmap-exp/luis/nmap-os6

This is the IPv6 OS detection branch. "nmap -6 -O" works now, though at
this point it only prints fingerprints and not OS guesses, because we
need to collect more submissions.
2011-09-19 18:31:46 +00:00
david
04069e6166 Merge r26341:26417 from /nmap-exp/david/nmap-cpe.
This adds CPE output support.
2011-09-09 23:24:14 +00:00
david
13a31a8cb9 Make str2AVal not modify its argument.
This is nice for its own sake, but it's really so that the error message
makes sense. The string had had a bunch of '\0' bytes inserted and the
string in the error message didn't match the argument.
2011-07-26 20:48:03 +00:00
david
1646813162 Whitespace and formatting in osscan.cc. 2011-07-19 22:00:13 +00:00
david
75cd409ba5 Fix some [-Wunused-but-set-variable] warnings. 2011-07-19 21:40:32 +00:00
fyodor
86e59a8c4e Update copyright statements from 2010 to 2011 2011-01-21 00:04:16 +00:00
david
7653cf7d4a Move COPYING.OpenSSL to OpenSSL.txt, update copyright notices to match. 2010-10-30 03:01:50 +00:00
fyodor
1aecac420f Update copyright year from 2009 to 2010 2010-05-03 21:20:25 +00:00
david
e9fc299fea Fix a typo in an error message, also provide more information. 2010-04-19 18:01:37 +00:00
david
06afa7b303 Add a constructor for FingerPrint. 2009-12-18 07:59:31 +00:00
david
e945eb0c8d Change the static functions getattrbyname and gettestbyname into public
methods of AVal and FingerTest, respectively.
2009-12-18 00:04:35 +00:00
david
a06b900f00 Merge from /nmap-exp/david/nmap-mem. This reduces the memory usage of OS
scan by about 95%. (66832396 bytes to 2815061 bytes according to
Massif.)
2009-11-23 21:22:07 +00:00
david
3bea09fabc Get rid of a warning "Classification of observed fingerprint does not
appear in reference fingerprint" and the code used to support it. This
happens all the time with submitted fingerprints and is nothing to worry
about. I don't want to be distracted from other warnings. This code was
only used by the OS fingerprint integration tools, not by Nmap itself.
2009-11-13 18:29:08 +00:00
david
53deb965ce All parse_single_fingerprint to handle a MatchPoints pseudo-print. 2009-11-11 19:36:10 +00:00
david
6dc99d0e25 Fix a typo in parse_fingerprint_file; after calling strpbrk we need to
test teh return value, not the (unchanged) value we passed in. This
would cause a segmentation fault instead of a fatal error if nmap-os-db
ended in a Fingerprint line that didn't have a terminating newline.
2009-08-24 21:25:06 +00:00