1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00
Commit Graph

494 Commits

Author SHA1 Message Date
david
c8f79b8afe Remove the current directory from nmap_fetchfile. 2011-03-26 06:48:27 +00:00
david
85762f952f On non-Windows, search the binary path + "../share/nmap" too. 2011-03-26 06:48:25 +00:00
david
dc9c81fe16 Search the binary directory on every platform in nmap_fetchfile, not
just on Windows.
2011-03-26 06:48:23 +00:00
david
f3aca36534 Fix comment typo. 2011-03-26 06:48:21 +00:00
david
45814927a9 Add set_program_name and get_program_name functions to cache argv[0]. 2011-03-26 06:48:19 +00:00
david
dc9d0bc0e7 Print a warning when -sR is used. 2011-03-12 18:53:59 +00:00
david
523c4f7104 Remove -sR o.rpcscan handling; make -sR an alias for -sV. 2011-03-12 18:20:09 +00:00
david
c4cda67b99 Show which libraries are the ones included with Nmap and which are from
the system by prefixing "nmap-" to the former in -V output. Patch by
Ambarisha B.

Hard-code the included/non-included libraries in nmap_winconfig.h:
2011-02-24 21:06:59 +00:00
david
7cf032563d o The -V and --version options now show the platform Nmap was compiled
on, which features are compiled in, and the version numbers of
  libraries it is linked against. [Ambarisha B., David]
2011-02-08 19:50:13 +00:00
djalal
25292e93a7 Add a directive for the --scripthelp code to check if Lua is compiled. 2011-01-29 11:30:23 +00:00
david
8553cb3157 Merge r22026 through r22063 from /nmap-exp/david/nmap-script-help (new
--script-help option).
2011-01-27 21:44:54 +00:00
fyodor
86e59a8c4e Update copyright statements from 2010 to 2011 2011-01-21 00:04:16 +00:00
david
cec33e3aad o The command line in XML output (/nmaprun/@args attribute) now does
quoting of whitespace using double quotes and backslashes. This
  allows recovering the original command line array even when
  arguments contain whitespace. [David]
2010-11-14 02:09:58 +00:00
david
5b010f927a o XML output now excludes output for down hosts when doing host
discovery only, except in verbose mode. This is how it already
  worked for normal scans, but the ping-only case was overlooked.
  [David]
2010-11-11 23:24:59 +00:00
david
908c222b82 Kill unused code left over from --interactive mode. 2010-11-11 04:46:38 +00:00
david
7653cf7d4a Move COPYING.OpenSSL to OpenSSL.txt, update copyright notices to match. 2010-10-30 03:01:50 +00:00
fyodor
a0285813fc Remove --adler32 option from Nmap quick ref screen. It is still documented in man page, but is too obscure for the quick ref screen IMHO 2010-10-05 00:47:07 +00:00
david
6335f423b0 Only show the warning about the changed default units for timespecs if the
timespec doesn't contain a unit. This check was supposed to be done everywhere
but it was missing for --scan-delay and --max-scan-delay. Even if you entered a
time like "10h", which is supposed to disable the warning, it would complain
and tell you to use "10hms".
2010-09-03 23:49:31 +00:00
djalal
c7c502b227 Merge r19520:r20039 from nmap-exp/djalal/nmap-add-targets. This will let NSE scripts to add new discovered targets to future Nmap scans. 2010-09-01 01:50:34 +00:00
david
c78dcce4d3 Move init_socket from nmap.cc to scan_engine.cc, because it is only used
in the latter file.
2010-08-11 14:34:54 +00:00
djalal
f0c5e154c3 Merge r18689:r19511 from /nmap-exp/djalal/nse-rules.
o Add two new Script scan phases:
  Script Pre-scanning phase: before any Nmap scan operation, activated by the new "prerule".
  Script Post-scanning phase: after all Nmap scan operations, activated by the new "postrule".
o New environment variables:
  SCRIPT_PATH
  SCRIPT_NAME
  SCRIPT_TYPE: the type of the rule that activated the script.
2010-08-06 16:40:03 +00:00
david
45468ba2a0 Fix compiler warnings seen on OpenBSD. 2010-08-02 20:30:29 +00:00
djalal
010bcf1b78 Whitespace and formatting fix. 2010-08-02 10:33:58 +00:00
fyodor
8ce7e7e901 Update the help screen to reflect the new default time value (seconds) as suggested by Luis M. 2010-07-18 01:28:12 +00:00
david
e131a1e86a Fix some awkward phrasing in -h output. Change
-A: Enables OS detection and Version detection, Script scanning and Traceroute

to

  -A: Enable OS detection, version detection, script scanning, and traceroute
2010-07-16 17:41:41 +00:00
david
16232ff34c Change the warning message for time specifications that look off by a
factor of 1000. I realized there is a bad ambiguity in

The default unit for --host-timeout is seconds (since April 2010),
so your time of "10000" is 2.8 hours.

It could be interpreted as "seconds since April 2010" which is a strange
way to specify a length of time and would be confusing if you took it
that way. I have changed it to

Since April 2010, the default unit for --host-timeout is seconds,
so your time of "10000" is 2.8 hours.
2010-07-13 17:22:58 +00:00
batrick
45a51eff5c Move Script Database Update code from nse_main.cc (Lua code embedded in C
strings) to nse_main.lua.
2010-07-07 16:31:17 +00:00
luis
da126c8b78 Merged nmap-dedup branch from nmap-exp/luis/nmap-dedup. This completes the Nmap/Nping code de-duplication phase. 2010-06-22 17:24:34 +00:00
david
2a8d0f2301 Break apart host groups when a new host has the same address as one already in
the current host group. This was already done in nexthost but only affected
ping scanning. Here in nmap.cc it takes effect for port scanning.
2010-06-09 03:12:38 +00:00
kris
0f4a5e305c update ip_is_reserved(): 177/8 and 181/8 allocated 2010-06-02 21:24:37 +00:00
fyodor
54313a53af Change --webxml nmap.xsl stylesheet location from http://nmap.org/data/nmap.xsl to http://nmap.org/svn/docs/nmap.xsl. The former just redirected to the latter anyway. Maybe it would be better to just use http://nmap.org/nmap.xsl and make that a symlink to the appropriate place. Oh well, I think this is fine for now. 2010-05-27 02:28:40 +00:00
david
238e0107f5 Fix the XML stylesheet processing instruction. It read "test/xsl"
instead of "text/xsl". This was reported by Grant Bartlett.
2010-05-24 18:56:39 +00:00
kris
15ae5ba5b2 Update the comment for ip_is_reserved(). An old comment (ca 2001, r1152)
says that the function could be outdated if IANA keeps assigning IP ranges,
but I update this function many times per year (usually consisting of more
than one IP block per update).  So in case I somehow slack on my unofficial
job of updating this function, I note that it needs frequent attention.
2010-05-21 16:42:54 +00:00
kris
9277af5e57 update ip_is_reserved(): 31/8 and 176/8 allocated 2010-05-07 16:09:49 +00:00
kris
75a17210f7 remove unneeded OS_SCAN_DEFAULT #define (multi-gen support is long gone) 2010-05-06 23:00:09 +00:00
fyodor
1aecac420f Update copyright year from 2009 to 2010 2010-05-03 21:20:25 +00:00
david
0e7e3b90ca Make an unqualified number stand for seconds, not milliseconds, in
tval2msecs and tval2secs. This affects the following options:
  Nmap:
    --host-timeout
    --max-rtt-timeout --min-rtt-timeout --initial-rtt-timeout
    --scan-delay --max-scan-delay
    --stats-every
  Ncat:
    -d --delay
    -i --idle-timeout
    -w --wait
  Nping:
    --delay
    --host-timeout
    --icmp-orig-time --icmp-recv-time --icmp-trans-time
Some sanity checks have been added when it looks like someone is using
the old default of milliseconds. For example,

$ ./nmap --host-timeout 10000
The default unit for --host-timeout is seconds (since April 2010), so your time of "10000" is 2.8 hours. If this is what you want, use "10000s".
QUITTING!

$ ./nmap --scan-delay 1000
The default unit for --scan-delay is seconds (since April 2010), so your time of "1000" is 16.7 minutes. Use "1000ms" for 1000 milliseconds.
QUITTING!

Times with a unit are always taken at face value and will avoid the
error message.

See http://seclists.org/nmap-dev/2010/q2/159 for discussion.
2010-04-16 00:38:51 +00:00
david
6940096a27 Use atoi to parse the argument to --max-os-tries, not tval2msecs. The
latter would allow you to do this:

$ nmap --max-os-tries 1s localhost
Bogus --max-os-tries argument specified, must be between 1 and 50 (inclusive)
QUITTING!

Because the "1s" became 1000.

atoi isn't right for option parsing because it doesn't catch errors, but
it's what the rest of the option parsing code uses.
2010-04-15 22:42:13 +00:00
david
859ef5ecaf Merge r17202:17298 from /nmap-exp/david/nmap-xml. This brings in
structured XML output, automatic closing of XML elements on error, and
inclusion of error messages in XML output.
2010-04-14 01:05:51 +00:00
kris
3f4153c956 update ip_is_reserved(): 14/8 and 223/8 allocated 2010-04-10 04:11:39 +00:00
david
6ba24a5a36 o Removed --interactive mode, a miniature shell whose primary purpose
was to hide command line arguments from the process list. It had
  been broken (would segfault during the second scan) since before May
  2009 until February 2010 and was rarely used. The fact that it was
  broken was reported by Juan Carlos Castro y Castro.

See http://seclists.org/nmap-dev/2009/q2/464 and
http://seclists.org/nmap-dev/2010/q1/688 for report and discussion.
2010-04-01 03:33:14 +00:00
david
ede6b224f5 Make it a fatal error if you try to combine traceroute with idle or
connect scan, IPv6, or non-root. Previously it only printed a warning
and disabled traceroute, which was easy to miss until the scan finished.
2010-03-24 01:12:58 +00:00
kris
9f979c6da8 use __func__, and fix space in output 2010-03-19 05:11:58 +00:00
kris
599bb361a4 Update ip_is_reserved(): I decided to go through the existing address checks
to verify their correctness and to check more than just the table in
ipv4-address-space.  Beyond comment changes and some code movement:

* 198.51.100.0/24 and 203.0.113.0/24 are reserved by RFC5737 (Jan 2010)
* Fix 198.18.0.0/15, which was implemented wrongly.  This goes back a while
and was handled somewhat like 198.18.0.0/18.
2010-03-13 01:31:11 +00:00
david
7d0fbfb4c2 Don't print output for hosts that don't have any open ports when --open
is used. See discussion at http://seclists.org/nmap-dev/2010/q1/837.

In this patch, all output formats are treated the same. So if a host
isn't shown in normal output, it's not shown in XML output either.
2010-03-12 22:15:22 +00:00
david
5318dd3c58 Only write host elements for down hosts to XML in verbose mode. This
makes it consistent with other output formats.
2010-03-12 21:20:05 +00:00
david
48654df805 Switch to -sn and -Pn as the new preferred synonyms for -sP and -P0.
This establishes a more regular syntax for some options that disable
phases of a scan:
	-n  no reverse DNS
	-Pn no host discovery
	-sn no port scan
Also, the -sP was possibly misleading because the 'P' suggests "ping
scan," when you can now do more than just pinging when you disable port
scanning. For example, -sC -sn and -sn -Pn --traceroute make sense.
2010-03-11 01:16:06 +00:00
david
34bca6a73b Fix the printing of the warning
Warning: --min-parallelism and --max-parallelism are ignored with --scan-delay.
It was checking o.min_parallelism against -1, when its default value is
0.
2010-03-06 17:48:56 +00:00
david
39a80f1987 Make --resume work with the new "Nmap scan report " strings. It also
works when there was no reverse DNS resolution, which didn't work with
the old format. This patch is from vladz.
http://seclists.org/nmap-dev/2010/q1/770
2010-03-05 23:46:42 +00:00
david
82ead9256e Make some output changes suggested by greengreat. Mention the S: SCTP
port specifier. Mention -PY in the ping probe error output. Use the word
"protocol" instead of "port" in the error output for -PO.
2010-03-05 19:54:45 +00:00