1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 21:59:02 +00:00
Commit Graph

189 Commits

Author SHA1 Message Date
dmiller
d72beec963 Use GetAdaptersAddresses, not Registry, for DNS servers
In addition to being simpler, this approach allows us to limit to
adapters that are up and configured. Fixes #3114
2025-05-23 17:13:06 +00:00
dmiller
a55708ba5e Correctly handle DNS server connection failures 2025-05-23 17:13:06 +00:00
dmiller
ec3b1d264b Reintegrate 7.97 changes 2025-05-15 15:42:03 +00:00
dmiller
79d468d7a1 Handle 'localhost' target name in mass_dns 2025-05-09 22:47:08 +00:00
dmiller
a7ca9aba7b Also try system resolver for unqualified (no-dot) DNS names 2025-05-09 22:47:07 +00:00
dmiller
8fc566bf49 Read multiple hostnames for one address from /etc/hosts 2025-05-09 22:47:07 +00:00
dmiller
297a6242c7 mass_dns: map forward lookups to /etc/hosts first 2025-05-09 22:47:06 +00:00
dmiller
0232a370b9 Make /etc/hosts parsing more robust, part 1 2025-05-09 22:47:06 +00:00
dmiller
cf2403e9d7 Fall back to system resolution if we get NXDOMAIN and the name is non-ascii 2025-05-09 22:47:05 +00:00
dmiller
cec0cc6f99 Improve flow in nmap_mass_dns_core() 2025-05-09 22:47:05 +00:00
dmiller
6db5c9cb85 Bump copyright date 2025-02-26 17:44:43 +00:00
dmiller
a751509b0b Use u32 for s_addr; in_addr_t not defined on Windows 2024-10-07 18:31:14 +00:00
dmiller
adc7f02503 Increase DNS timeout times 2024-05-16 19:31:48 +00:00
dmiller
2907002faa mass_dns: Use slow-start logic rather than max-cap when a drop is seen 2024-05-16 19:31:47 +00:00
dmiller
c80bc2efb2 Rate-limit capacity scale-downs to 1 per MIN_DNS_TIMEOUT 2024-05-16 19:31:47 +00:00
dmiller
1e964d30f5 Correctly treat A queries as alt for -6 scans, AAAA alt for -4 2024-05-16 19:31:46 +00:00
dmiller
50ceac5753 mass_dns: only scale back for initial requests
Some requests just take longer; they may have lots of recursion or a
slow authoritative server. That won't change on retransmissions, so if
we treat all requests and retransmissions equally, we get a long tail of
retransmits with smaller and smaller capacity (parallelism). Instead, we
will use the initial-request period to determine server capacity and
then not change it during the retransmit phase.
2024-05-16 19:31:45 +00:00
dmiller
8b8c6fca4e mass_dns: Correctly handle write errors/timeouts 2024-05-16 19:31:45 +00:00
dmiller
7f7996977d mass_dns: keep capacity higher in the case of timeouts 2024-05-14 15:26:36 +00:00
dmiller
4a5d33f502 More aggressive timeouts; favor retries and slowing parallelism instead. 2024-05-14 15:26:36 +00:00
dmiller
16c9d36148 mass_dns: prioritize sending new requests over retransmissions 2024-05-14 15:26:35 +00:00
dmiller
a626407796 mass_dns: Be more aggressive with timeouts but slower to increase capacity. 2024-05-13 14:31:34 +00:00
dmiller
37e0f7f80b Improve string representation of DNS query in debug output 2024-05-13 14:31:34 +00:00
dmiller
e1a2577ffd Reuse DNS query ID for retransmissions 2024-05-13 14:31:33 +00:00
dmiller
5c46b3b9f7 Fix memory leak: clean up alt requests 2024-05-13 14:31:33 +00:00
dmiller
0896ed3f5d Simplify mass_dns for the case of requesting A and AAAA records 2024-05-13 14:31:32 +00:00
dmiller
43e70c09d2 Remove leftover print-debugging statement 2024-05-06 18:20:30 +00:00
dmiller
801ae30dcc Report distinct names, not number of requests (A+AAAA) 2024-05-06 18:20:29 +00:00
dmiller
4ad5e7ca22 Fix memory leak in nmap_dns.cc: call freeaddrinfo after resolve_all() 2024-05-01 22:19:33 +00:00
dmiller
019557382b mass_dns: Allow multiple addresses for each A/AAAA lookup 2024-04-30 16:39:21 +00:00
dmiller
bf2acde232 Handle chained CNAME records 2024-04-26 17:25:41 +00:00
dmiller
3cac585f69 Treat no-answers as NXDOMAIN 2024-04-26 17:25:41 +00:00
dmiller
480803e24a Support forward-DNS in mass_dns (1 addr per name) 2024-04-25 17:12:29 +00:00
dmiller
924f91eb20 Change mass_rdns to mass_dns in comments and log messages 2024-04-25 17:12:29 +00:00
dmiller
100c1ffccb Permit parsing A and AAAA RRs to a common class 2024-04-25 17:12:28 +00:00
dmiller
18beddee40 Simplify building in-addr.arpa address string 2024-04-25 17:12:28 +00:00
dmiller
0b79498c04 Simplify sscanf pattern for parsing /etc/hosts 2024-04-25 17:12:27 +00:00
dmiller
e8c7e7ba01 Generalize nmap_mass_rdns to support more than just Targets and PTR requests 2024-04-18 19:16:23 +00:00
dmiller
22ee545f7e Erase by key 2024-04-18 19:16:23 +00:00
dmiller
4201b294a8 Avoid pointer math and clarify flow 2024-04-16 17:12:28 +00:00
dmiller
f999182d0f Bump date and reapply header templates 2024-02-28 18:46:45 +00:00
dmiller
e7f8cd820b Use TIMEVAL_FSEC_SUBTRACT for clarity 2024-02-26 18:29:10 +00:00
dmiller
e633a21b5f Avoid recursion in DNS parsing; check label/name lengths 2023-05-19 01:43:17 +00:00
dmiller
6f6b2de214 Apply new license templates, bump copyright date 2023-04-14 17:11:46 +00:00
dmiller
3c6c84b5f7 Avoid copying target/source addr data when a pointer will do 2022-10-31 20:50:19 +00:00
dmiller
d969fd00ca Remove hosts file location for Win95/98/ME from search 2022-06-28 17:40:30 +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
74e066d356 Another round of const 2021-04-27 19:22:12 +00:00
dmiller
3adaa69cb2 Fix an out-of-bounds memory access when parsing PTR records 2021-04-27 19:22:08 +00:00