1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-12 18:59:03 +00:00
Commit Graph

476 Commits

Author SHA1 Message Date
dmiller
8605dea33a Fall back to TCP connect ping on Windows without pcap
While Windows raw sockets can send and receive ICMP packets, Nmap relies on
libpcap packet capture to spot responses, so if pcap isn't available
(--unprivileged or Npcap not installed), we need to fall back to TCP connect for
host discovery, just like we do for unprivileged users on other operating
systems. Previous behavior was a fatal error suggesting unhelpfully to use
--unprivileged.
2018-11-08 15:28:13 +00:00
dmiller
824f9dcb2f Rearrange declarations to put all addrset functions in nbase.h, hide struct addrset internals. 2018-11-01 04:35:00 +00:00
dmiller
27807aadb4 Straighten out some headers and the (struct) addrset type 2018-11-01 04:34:59 +00:00
dmiller
d03b10ea36 Deprecate/disable -PR option as it was not really being checked.
Fixes #1361
2018-10-24 03:55:42 +00:00
dmiller
466bf8ff65 Limit -v and -d to 10 max. 2018-10-08 20:49:20 +00:00
dmiller
356831b129 Add a requested feature 2018-10-01 19:32:10 +00:00
dmiller
b25f9bc8ef Use correct ordinals for Nmap's age 2018-09-01 18:50:19 +00:00
dmiller
aa1a94db53 Skip whole quoted program name when parsing args with --resume 2018-04-05 19:22:08 +00:00
dmiller
7acdd4b41f Quote args with spaces in invocation summary 2018-04-05 19:22:07 +00:00
dmiller
01e7430797 Remove the old optparse function; options must be specified with hyphens. 2018-02-20 17:37:47 +00:00
dmiller
23d95f5126 Remove deprecated long option aliases 2018-02-20 17:37:46 +00:00
dmiller
3abbbebedd Remove blank line at start. See #1128 2018-02-06 18:46:17 +00:00
nnposter
6889a2f6a5 Resolves crash opportunities caused by unexpected libpcap version string format. Fixes #1112 2018-02-01 17:19:35 +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
2a1f81d42d Use bool not int for boolean options 2017-12-07 18:20:07 +00:00
dmiller
f1488554bd Add the --resolve-all option 2017-12-06 04:17:06 +00:00
dmiller
d9b66b20a3 Rename o.resolve_all to o.always_resolve
This is the flag for the -R option. "always" is more appropriate than
"all," since "resolveall.nse" does something different, and there is a
"resolve_all" function that does that thing as well, unrelated to the -R
option.
2017-12-06 04:17:04 +00:00
paulino
e66740a16d Improves error message. Closes #1056 2017-11-23 23:47:15 +00:00
nnposter
9d11605113 Adds protection against dealing with excessive timer values.
As a side effect it silences current MSVC compiler warning about
"possible loss of data". See #995
2017-09-23 23:24:14 +00:00
rewanth
6ee953a5ff Removes trailing spaces in 69 files. Closes #971. 2017-08-23 08:52:40 +00:00
dmiller
675ae460b3 Move NewTargets class to its own h/cc files 2017-08-05 21:11:00 +00:00
dmiller
fd0db09749 Report appropriate zlib/libssh2 versions. Closes #957 2017-08-03 15:16:49 +00:00
dmiller
f784d350e4 Allow --script-timeout 0 to mean 'no timeout' to override -T5 2017-08-03 02:10:00 +00:00
dmiller
9ddb870666 Add --script-timeout 10m to the defaults for -T5 2017-08-03 02:06:58 +00:00
dmiller
31dd0876a4 Move some functions to more appropriate files 2017-08-02 05:10:19 +00:00
dmiller
011ebd731b Fixes to configure for libssh2+libz 2017-07-31 16:56:48 +00:00
dmiller
17bcd4c4fc Show nmap- prefix for included libssh2 and libz 2017-07-29 19:42:47 +00:00
evangel
0c142333bb Merged gsoc-ssh branch. Closes #910 2017-06-29 21:27:35 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +00:00
dmiller
ab5e247cee Include netutil.h for IPPROTO_SCTP constant where necessary. Fixes #868 2017-04-26 18:55:16 +00:00
dmiller
339283d4b0 Remove some unused/overused includes 2017-04-19 14:53:24 +00:00
dmiller
891c3be3b9 remove tcpip.h from other headers' includes 2017-04-19 13:53:57 +00:00
dmiller
24f6cec25a Move scan lists structs and functions to scan_lists files. 2017-04-19 04:14:43 +00:00
dmiller
71f86bf2ec Remove some unused function prototypes 2017-04-19 02:17:20 +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
dmiller
3f1ad0742e New option --defeat-icmp-ratelimit. Closes #353, Fixes #216 2016-12-09 04:19:45 +00:00
dmiller
b18d6fe5f7 Add --resume from XML output. Closes #316. See #243 2016-12-06 02:55:55 +00:00
dmiller
062d272d0f Make --open imply --defeat-rst-ratelimit 2016-11-28 17:11:01 +00:00
dmiller
82ea8a80d3 Fixed -iR scanning too many targets
Fixed a discrepancy between the number of targets selected with -iR and
the number of hosts scanned. Because "up" hosts did not count towards
the number of hosts in a hostgroup, Nmap would run an extra Ping scan
phase on that number of new targets before scanning. Those extra targets
in the last hostgroup would result in output like "Nmap done: 1056 IP
addresses" when the user specified -iR 1000.

https://security.stackexchange.com/questions/138150/scans-more-ips-than-asked
2016-09-29 14:56:47 +00:00
dmiller
91032d05dd Grab a more-complete Npcap version string 2016-09-21 05:19:25 +00:00
jah
c6c5939220 Comment-out the port spec test suite. 2016-09-19 09:25:18 +00:00
david
59cc2fe72a Avoid eating 'T' 'U' 'S' 'P' not followed by ':' in getpts.
On reading 'T', 'U', 'S', or 'P', getpts_aux would unconditionally
consume the character before checking to see whether it was followed by
a ':'. You could insert 'T', 'U', 'S', or 'P' in several places and it
would just be ignored, which is different treatment than other letters
got.

Behavior before:
	nmap -p 9
	# scans port 9

	nmap -p discard
	# scans port 9

	nmap -p Tdiscard
	# scans port 9

	nmap -p T:Tdiscard
	# scans port 9

	nmap -p Tdi*ard
	# scans port 9

	nmap -p Xdiscard
	# Error #485: Your port specifications are illegal.  Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"

Behavior after:
	nmap -p 9
	# scans port 9

	nmap -p discard
	# scans port 9

	nmap -p Tdiscard
	# Error #485: Your port specifications are illegal.  Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"

	nmap -p T:Tdiscard
	# Error #485: Your port specifications are illegal.  Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"

	nmap -p Tdi*ard
	# Error #485: Your port specifications are illegal.  Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"

	nmap -p Xdiscard
	# Error #485: Your port specifications are illegal.  Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"
2016-09-18 20:42:56 +00:00
david
3a62c2dbc9 Fix typo in commented p-switch-test line.
error: ‘struct scan_lists’ has no member named ‘stcp_count’
2016-09-18 20:42:52 +00:00
dmiller
e6f65878b9 Initialize Npcap before applying delayed options so isr00t is set correctly 2016-09-01 03:34:24 +00:00
dmiller
5cfc7e8564 Delay processing of -A until all --un/privileged options have been seen 2016-09-01 03:34:23 +00:00
abhishek
cd0b373130 Add --script-timeout option to limit the script's runtime. Closes #330 and Fixes #234. 2016-08-20 18:57:47 +00:00
abhishek
9d288db7fd Add support for decoys in IPv6 closes #433 and fixes #98 2016-08-17 06:09:09 +00:00
tudor
c2b139e9bf Avoiding target_needs_new_hostgroup calls seems to make ARP Ping crash so I reverted it. Also checked if Target.size() is not empty before doing Target[0] in nmap_main. 2016-08-14 12:50:42 +00:00
tudor
3ba4a87c75 o.ping_group_sz can be increased above 4096 with a higher --min-hostgroup value, calls to target_needs_new_hostgroup limited as much as possible 2016-08-09 06:12:17 +00:00
vincent
32efc8b28c Use FQDN_LEN instead of MAXHOSTNAMELEN for DNS name buffers
This closes #140 (issue #140), namely "Use correct lengths 
for FQDN, not MAXHOSTNAMELEN"
2016-07-26 14:06:22 +00:00