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

216 Commits

Author SHA1 Message Date
dmiller
3499025302 Wrap dnet eth functions for non-Ethernet links 2025-06-23 20:54:32 +00:00
dmiller
42170b067f Remove unneeded g_has_npcap_loopback 2025-04-16 00:00:05 +00:00
dmiller
6db5c9cb85 Bump copyright date 2025-02-26 17:44:43 +00:00
nnposter
cefa051cfc Fix various typos in comments. Closes #2888 2024-08-16 02:40:23 +00:00
dmiller
7b20a38099 Minor efficiencies: avoid multiple expansions of function calls in TIMEVAL_* macros 2024-06-26 21:54:28 +00:00
dmiller
f999182d0f Bump date and reapply header templates 2024-02-28 18:46:45 +00:00
dmiller
3cf82912ce Use TIMEVAL_BEFORE instead of TIMEVAL_SUBTRACT for clarity and efficiency 2024-02-26 18:29:11 +00:00
dmiller
630f2d27bc Fix OS scan retries when system does not send RST
If the scanning system's OS does not send a RST for unsolicited SYN/ACK,
the target port will stay in the SYN-RECEIVED state and will not
acknowledge any new SYN from the same port number. Windows in particular
does this, making retries basically useless. Solution: change source
port number for each run of the osscan engine.
2024-02-26 18:29:09 +00:00
dmiller
f0882dc752 Make sure timingRatio() is calculating based on correct data 2024-02-26 18:29:08 +00:00
dmiller
6f6b2de214 Apply new license templates, bump copyright date 2023-04-14 17:11:46 +00:00
dmiller
56f59de131 Optimizations for IPv4 OS scan
Since the number, names, and preferred order of OS detection tests are
known, we can use fixed indices to put each test/value type in a
predictable location. Previously, we would insert the tests in an
arbitrary order, sort them, and then use strcmp() in each comparison to
ensure the sort order holds and any missing tests are skipped over.

Keeping test names in one location (MatchPoints) saves memory and keeps
the string pool small, which improves performance by reducing lookups
and making existing lookups faster.

Using a dedicated class (FingerPrintDef) for MatchPoints avoids calling
strtol() to obtain the points value for every comparison.
2022-11-11 18:44:19 +00:00
dmiller
e8271b7070 Prevent system from going to sleep during scans. Fixes #1192 2022-09-21 21:31:14 +00:00
dmiller
fb64aa9738 Don't use string_pool for ephemeral OS fingerprint results 2022-09-16 21:58:42 +00:00
dmiller
8b3465231e Fix crash: manage lifetime of now-dynamic test results 2022-09-13 20:05:34 +00:00
dmiller
1d8bf1deff Create AVal vectors in-place, do not copy
At startup with -O, this change reduces overall memory use by 4%, total
alloc/frees by 70%, and total instructions by 45%.
2022-09-13 16:10:05 +00:00
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
1fd272f8dd const all the things! 2021-04-23 20:37:41 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
4bee1dbfc1 Remove duplicate test conditionals already tested in enclosing block 2020-09-18 18:47:42 +00:00
dmiller
dd0ace6d4a Split string pool functions into separate file from osscan.cc 2020-01-16 19:12:57 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
dmiller
d8ff55b72e Start timeout clocks closer to first probe, not in batches. Closes #1150 2018-08-13 19:24:06 +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
dmiller
e813de759a Reduce use of utils.h for error functions 2017-04-20 22:39:08 +00:00
dmiller
891c3be3b9 remove tcpip.h from other headers' includes 2017-04-19 13:53:57 +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
abhishek
9d288db7fd Add support for decoys in IPv6 closes #433 and fixes #98 2016-08-17 06:09:09 +00:00
vincent
0f22680426 Correct format string specifiers
The formats has been tested and verified on Mac OS X 10.8.5,
Mac OS X 10.11.5 and Ubuntu 14.04 LTS, all on x86_64 machines
and OSs. It mainly silences warnings. There were no warnings on
Ubuntu but a few on Mac OS, so the fix is intended to silence
warnings on Mac OS whithout triggering new warnings on other OSs.
Example of warnings previously encountered:

netutil.cc:2828:74: warning: format specifies type 'unsigned short'
but the argument has type 'int' [-Wformat]
2016-07-01 11:44:26 +00:00
dmiller
67fd101b01 Enable Nmap, Nping to use Npcap over Winpcap if available. 2016-06-14 14:16:46 +00:00
dmiller
6e33d6ac3c Bump date in copyright headers 2016-04-04 15:38:44 +00:00
dmiller
e124565c58 Use time_t instead of long and double for storing uptime
Fixes #275.

This results in fewer casts and less subtraction than the previous
method, and should still be portable. Only division and subtraction and
difftime are performed on the value, so it will not overflow. And the
TCP timestamp itself is a 32-bit value, so it can't refer to a time
farther in the past than the 32-bit epoch. One explicit cast (to long
long) is used in order to ensure the format string can handle any
conceivable value according to the compiler and avoid a warning message.
2016-01-13 20:53:39 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
5e47450bdc Use forward-declaration of class FingerPrintResults in Target.h 2015-06-30 04:04:51 +00:00
dmiller
638a123ba6 Move osscan structs from global_structures to osscan2.h 2015-06-23 15:53:05 +00:00
dmiller
cfe8893304 Move math.h includes into .cc files 2015-06-23 00:09:01 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +00:00
dmiller
111fbe4b41 Modify some offensive terminology in comments. 2014-11-05 15:02:09 +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
df4f23eec0 Change all statements of the form 'return BOOLEAN_EXPRESSION ? false : true;' to 'return !BOOLEAN_EXPRESSION;' 2014-08-03 04:25:18 +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
jay
20235c2389 Improve OS detection by moving to a different port if 'tcpwrapped' is detected 2014-07-30 06:55:48 +00:00
d33tah
6355a1bebe Revert my unfinished refactoring commit I pushed by mistake. 2014-07-23 14:43:12 +00:00
d33tah
308d924415 Remove an unneeded duplicate variable assignment. 2014-07-23 14:37:16 +00:00
d33tah
f3f2d57503 This should probably be static. 2014-07-23 14:37:07 +00:00
d33tah
9fe9545d49 Some more whitespace fixes. 2014-06-26 15:14:04 +00:00
d33tah
a80c90608c sed -i 's/if ( /if (/g' *.cc *.h; sed -i 's/for ( /for (/g' *.cc *.h; sed -i 's/( /(/g' nmap_amigaos.h tcpip.h service_scan.cc
There's still quite a lot of code like this, nse_openssl.cc being most
messy IMHO. Also, I left out "if( something )" syntax.
2014-06-25 15:40:54 +00:00