dmiller
b5c54d9687
Check for tcp th_off < 5
2026-06-26 22:06:05 +00:00
dmiller
3fa8d201fa
Add checks for ip_hl < 5
2026-06-26 22:06:04 +00:00
dmiller
d8620dc11d
Check embedded IP header is within bounds. Credit: Himanshu Anand
2026-06-25 21:58:49 +00:00
dmiller
891cdd0179
Fix signedness in comparison
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Waiting to run
2026-06-25 16:33:14 +00:00
dmiller
687061d534
Avoid extra parsing/copying
2026-06-25 16:33:13 +00:00
dmiller
c86a45ef6e
Consolidate TCP option parsing
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Waiting to run
2026-06-24 14:47:12 +00:00
dmiller
5767158030
Reuse raw socket for IPv6 when possible
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Has been cancelled
2026-06-16 17:32:12 +00:00
dmiller
2a16e04500
Fix an issue with trusting packet ip_len field.
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Has been cancelled
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Has been cancelled
2026-06-03 21:42:20 +00:00
dmiller
dc6b27be7e
Use existing aligned header structs in osscan functions
2026-04-22 16:13:08 +00:00
dmiller
8ef3ed1471
Avoid undefined behavior from unaligned accesses
2026-04-20 15:21:55 +00:00
dmiller
95d380b836
Bump copyright date to 2026 [skip ci]
2026-02-16 22:33:40 +00:00
dmiller
c1d16550dc
Consolidate and improve error checks for missing source MAC. See #2711
2026-01-28 21:36:15 +00:00
dmiller
99e396b4a0
Fix various fatal errors around --send-eth
2025-09-03 17:04:47 +00:00
dmiller
67a796844f
Consolidate raw socket acquisition.
2025-06-30 19:24:32 +00:00
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