Commit graph

186 commits

Author SHA1 Message Date
dmiller
d8c9880cd5 Consolidate inet_ntop_ez-like code from throughout
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-11 23:28:26 +00:00
dmiller
6e18e8d89f deduplicate some macros 2026-06-10 21:39:37 +00:00
dmiller
e9861daf84 Avoid timeout on STDIN socket. Fixes #3291.
Windows enforces a 120-second timeout for sockets in FIN_WAIT_2, so the
STDIN socket was being forcibly closed after 2 minutes.
2026-05-15 16:23:46 +00:00
dmiller
abf98ca7b7 Remove old makedepend command. Fixes #503 2026-05-12 20:09:07 +00:00
dmiller
323d875df8 Ensure nbase's hexdump doesn't print too much 2026-05-06 21:38:09 +00:00
dmiller
91ea799a8b Ensure null termination on copied strings 2026-04-30 22:02:00 +00:00
dmiller
ab973f548a Nbase: make checksum functions const, avoid undefined behavior in shifts 2026-04-20 15:21:54 +00:00
dmiller
f6eef1796a Fix clang warnings about braces in initialization 2026-04-20 15:21:53 +00:00
dmiller
53e6be8f28 Avoid undefined shifts due to int promotion 2026-04-16 23:36:48 +00:00
dmiller
9351c41147 Fix memory leak in addrset 2026-04-02 19:14:12 +00:00
dmiller
1f6d6b18da Make sure config checks don't fail with asan 2026-04-02 19:14:11 +00:00
dmiller
95d380b836 Bump copyright date to 2026 [skip ci] 2026-02-16 22:33:40 +00:00
dmiller
5bb82a2ad0 Fix crash in socket_bindtodevice: NULL device is permissible 2025-09-03 17:04:46 +00:00
dmiller
c66baf785e Merge Nmap 7.96 release branch 2025-05-07 13:22:40 +00:00
dmiller
40b5bda3ac Consistent Windows build parameters 2025-04-15 23:58:46 +00:00
dmiller
6db5c9cb85 Bump copyright date 2025-02-26 17:44:43 +00:00
dmiller
dd7b7d76e8 socket_bindtodevice: make whole function conditional on SO_BINDTODEVICE definition 2025-02-10 20:32:48 +00:00
dmiller
6f72b2ea43 Remove extraneous newlines from addrset debug lines 2025-01-17 16:27:17 +00:00
dmiller
6b2df74ef2 Nbase: use a static SOCKET for STDIN 2024-11-06 16:46:32 +00:00
dmiller
f9b9434044 nbase: win32 build fix 2024-11-06 16:05:03 +00:00
dmiller
f1559fbc22 Use a socket, not pipe, for STDIN emulation in fselect
Using a TCP connected socket allows us to use a single select call instead of
interrupting it every 125ms to poll the stdin-pipe.
2024-10-30 18:55:39 +00:00
dmiller
fef9f592b0 POSIX usleep() returns an int. 2024-10-28 23:17:05 +00:00
nnposter
96dcf4e9ed Remove various "the the" repeats. Closes #2804 2024-03-16 01:16:34 +00:00
dmiller
f999182d0f Bump date and reapply header templates 2024-02-28 18:46:45 +00:00
dmiller
6959060fe6 Remove unused checks for OpenSSL from nbase 2023-10-30 19:01:08 +00:00
dmiller
ef71e5e37d Avoid out-of-bounds read leading to runaway allocations. Fixes #2731 2023-10-30 19:01:07 +00:00
dmiller
6f6b2de214 Apply new license templates, bump copyright date 2023-04-14 17:11:46 +00:00
dmiller
7fe3f15eca Rewrite C99-style for loops 2023-04-03 21:42:37 +00:00
dmiller
ad9d7b7a1b Fix MSVC warning about (void) 2023-01-05 23:45:56 +00:00
dmiller
350d9a23f7 Silence compiler warnings about returning value from void function. Fixes #2529 2022-09-30 20:27:02 +00:00
dmiller
ed19887f41 More efficiently check if any non-stdin fds are in the call to select on Windows 2022-09-23 21:42:00 +00:00
dmiller
8dbefeba86 Don't wait around if STDIN has data. Closes #2426 2022-09-23 21:41:59 +00:00
dmiller
6fd0261731 Also check fd_set operations on Windows. Fixes #455 2022-09-23 01:35:09 +00:00
dmiller
e9f3b12e07 Move a useful function to nbase 2022-09-20 23:37:25 +00:00
dmiller
8d5b6f3388 Enable DTLS for windows builds 2022-08-29 17:10:23 +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
2181443b63 Address a few code analysis warnings: uninitialized vars and undefined behavior 2021-08-06 16:17:46 +00:00
dmiller
1820469f5a Bump supported Windows to Win7 (drop Vista) and update a deprecated API 2021-07-29 21:09:44 +00:00
dmiller
95d98fe6ae Linker optimizations for all projects (Windows) 2021-07-22 17:19:53 +00:00
dmiller
5707fb14c5 Upgrade to VS 2019 2021-07-19 23:58:02 +00:00
dmiller
68d2c0e960 Use stack for global special value so we don't have to clean it up. 2021-04-27 19:22:10 +00:00
dmiller
c9b7c2f590 Moar const 2021-04-26 17:58:01 +00:00
nnposter
004c8627c1 Do not override snprintf in VS 2015 and newer
MSVC preprocessor triggers #error in <stdio.h> if redefined

From MS doc:
Beginning with the UCRT in Visual Studio 2015 and Windows 10, snprintf is
no longer identical to _snprintf. The snprintf function behavior is now C99
standard compliant.

Closes #2255
2021-04-16 02:33:39 +00:00
dmiller
05faa0287a Fix addrset matching with overlapping CIDR specs. Fixes #2257 2021-03-01 18:42:00 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
8e65c92264 Pass error along instead of printing (link error) 2020-09-02 17:05:55 +00:00
dmiller
083475eb6f Use larger buffer size for socket errors (WSAETIMEDOUT was longer). 2020-08-31 21:11:00 +00:00
dmiller
b1620387ba Add thread-safe gmtime equivalent to nbase 2020-01-19 16:37:37 +00:00
dmiller
8f3364a441 Remove more vestiges of Windows raw socket quirks 2020-01-16 19:12:57 +00:00