Commit graph

330 commits

Author SHA1 Message Date
dmiller
f3147377ca Fix a couple of format string issues 2026-09-23 19:15:30 +00:00
dmiller
6b9e1aea01 Mark log functions as printf-like 2026-09-23 19:15:29 +00:00
nnposter
2758101bf5 Rudimentary NSE support for 802.1Q / 802.1ad VLAN tags
Some checks failed
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-09-11 03:01:08 +00:00
dmiller
7361c340be Let -iR notice if all possible addresses are excluded
Some checks are pending
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-08-28 04:03:23 +00:00
dmiller
493fa0d530 Revert "Use log_func, not fprintf, in massdns" 2026-08-20 17:40:55 +00:00
dmiller
c1086f1e15 Silence some compiler warnings from the NetBSD build 2026-08-20 17:40:54 +00:00
dmiller
cd74c02e2f Let late replies count for DNS, but don't clobber results
Enforce invariants and use asserts to be sure requests aren't left
unfinished or double-freed.
2026-08-18 16:06:54 +00:00
dmiller
ed8abf52f4 Don't schedule sends on disconnected servers 2026-08-18 16:06:54 +00:00
dmiller
37a95cb34f Retrieve current server via Nsock, not request 2026-08-18 16:06:53 +00:00
dmiller
6ca4498822 Don't start DNS timeout until write actually happens. 2026-08-18 16:06:52 +00:00
dmiller
38d907e45f keep DNS request ID lookup per-server 2026-08-18 16:06:52 +00:00
dmiller
07785203c9 Consolidate DNS query matching to one place 2026-08-18 16:06:51 +00:00
dmiller
4fa4238789 Use log_func, not fprintf, in massdns 2026-08-18 16:06:50 +00:00
dmiller
5650f35c6d Use random, not progressive TXID for DNS requests 2026-08-14 19:04:39 +00:00
dmiller
9b62481a67 Simplify putDomainName and add length checks 2026-08-14 17:16:20 +00:00
dmiller
b5f44c01fb Fix alignment issue found with fuzz_ippackethdrinfo 2026-08-11 22:13:34 +00:00
dmiller
a5b8e61051 Fix signedness and strncpy truncation warnings 2026-07-30 21:29:05 +00:00
dmiller
30f3839df2 Build format string at compile time 2026-07-23 21:55:43 +00:00
dmiller
f8b3de041d Ignore case when matching resolved names. Fixes #3410 2026-07-23 21:55:43 +00:00
dmiller
206d06abfd ptrToIp: return false for non-matching addresses 2026-07-22 16:51:58 +00:00
dmiller
a2db276f35 guard ptrToIp against out-of-bounds read for short names. Closes #3414 2026-07-22 16:51:57 +00:00
dmiller
dd3a975743 Replace instances of sprintf with Snprintf 2026-07-17 21:56:29 +00:00
dmiller
4233de2df1 Avoid semicolon after do{}while(0) macro definition 2026-07-15 23:35:13 +00:00
dmiller
10cada944b Use safer macro for copying string literals into buffers 2026-07-15 23:35:12 +00:00
dmiller
67b0dec289 Replace sprintf with Snprintf and improve performance 2026-07-15 23:35:11 +00:00
dmiller
bc4346dd87 Use exponential moving average for timing estimates
Some checks failed
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
Time remaining estimates are now based on a moving average work unit
completion rate instead of percent completion of the entire task. This
better fits tasks that may increase the number of work units as time
goes on (such as increasing the number of retries for any given probe)
2026-07-01 02:06:12 +00:00
dmiller
4651a54b4b Assertions for TCP and IP header length field 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
bb6754e76b Fix extension header parsing. Credit: Himanshu Anand 2026-06-25 21:58:49 +00:00
dmiller
8769ab35f3 Correctly handle root domain label. Credit: Himanshu Anand 2026-06-25 21:58:48 +00:00
dmiller
22a5194e18 Replace yet another implementation of TCP option parsing with a standard function
Some checks are pending
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 20:48:16 +00:00
dmiller
84b525f61d Use TCPOptions class for IPv6 vectorization 2026-06-24 20:21:57 +00:00
dmiller
c86a45ef6e Consolidate TCP option parsing
Some checks are pending
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
Some checks failed
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
738455f46c Consolidate getNextHopMAC to libnetutil 2026-06-13 06:09:21 +00:00
dmiller
a36249fdda Fix a C++11-ism 2026-06-11 18:01:39 +00:00
dmiller
e8392e7cca Fix Windows build and silence some warnings 2026-06-11 17:56:27 +00:00
dmiller
2e47fa8746 Add nsock to include dirs for libnetutil on Windows
Some checks are pending
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-10 22:51:39 +00:00
dmiller
b7e3657ec7 Make some more parameters const 2026-06-10 21:39:42 +00:00
dmiller
756d012567 massdns: ensure servers are set in Init so that isMassDnsOK works 2026-06-10 21:39:41 +00:00
dmiller
6a4c9d48b3 Move NetBlock classes from TargetGroup to libnetutil/NetBlock 2026-06-10 21:39:40 +00:00
dmiller
7ae3835fa5 Move mass_dns from nmap_dns to libnetutil/massdns 2026-06-10 21:39:39 +00:00
dmiller
c44b7b3f9b move resolve_all to libnetutil. Let resolve use AI_IDN 2026-06-10 21:39:38 +00:00
dmiller
3d71e96550 Make an argument const 2026-06-10 21:39:37 +00:00
dmiller
e7b196be83 Fix a few signed/unsigned comparison warnings 2026-05-28 20:21:17 +00:00
dmiller
2d46c6b86c Avoid static buffer for protocol hdrinfo functions 2026-05-12 18:09:00 +00:00
dmiller
4ea1c703de export various protocol header info functions 2026-05-12 14:35:30 +00:00
dmiller
013a93ce0a Use brackets around IPv6 addresses used with port numbers 2026-05-12 14:35:29 +00:00
dmiller
94099a2ba9 Combine cases and refactor 2026-05-12 14:35:28 +00:00
dmiller
9543f7cbdb refactor ippackethdrinfo, splitting out transports 2026-05-12 14:35:28 +00:00