1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Commit Graph

495 Commits

Author SHA1 Message Date
david
0e738370ee Make resolve return a getaddrinfo error code.
The only error we can have apart from a getaddrinfo error is a list of
zero addresses; return EAI_NONAME in that case.

This unfortunately inverts the truth value of the return code of
resolve; 0 now means success.
2012-09-15 17:56:08 +00:00
david
8803578976 Don't use optarg outside of option parsing. 2012-09-15 17:53:29 +00:00
david
bc197f1877 Whitespace. 2012-09-14 21:08:23 +00:00
david
84fc27ee2d Make --route-dst option obey other command-line args.
--route-dst has been a useful debugging option, but it ran inline during
option processing and always used AF_UNSPEC to resolve names. Let it run
after options have been processed, so it can obey things like -6, -S,
and -e. Let it always resolve with o.af(), so you get different results:
  nmap --route-dst scanme.nmap.org
  nmap -6 --route-dst scanme.nmap.org
2012-09-11 21:00:47 +00:00
david
c1484a52a9 Wording, brevity. 2012-09-11 21:00:46 +00:00
david
bb075521ea Formatting in nmap.cc.
astyle -a -p -H -s2 -m2 nmap.cc
2012-09-11 20:43:24 +00:00
david
4357a97403 Make magic_port_set a bool. 2012-08-28 13:07:19 +00:00
kroosec
7ff385da85 First commit from rpc-grind branch. 2012-08-17 18:30:11 +00:00
david
0c3e0fcc4d Structured script output.
Scripts may now return a key–value table, or such a table in addition to
a string. The table will be automatically formatted for normal output
and will appear as a hierarchy of elements in XML output.

Some history and discussion of this development can be found at
https://secwiki.org/w/Nmap/Structured_Script_Output.

This is a merge of r29484:29569 from /nmap-exp/david/xml-output.
2012-08-14 16:36:25 +00:00
david
129ebc4634 Add the --disable-arp-ping option.
This option disables implicit ARP and ND host discovery (the implicit
discovery that would happen even if you used -Pn or IP-based discovery.)
2012-07-16 18:11:21 +00:00
sean
9b09390c52 Added a comment explaining the log-errors handling section 2012-06-30 01:45:10 +00:00
sean
0909f12308 Removed the log-errors option from the code, by treating it as if it was always true. This was done for the action item of o Remove Nmap's --log-errors feature and make its behavior the default. I also updated the docs/refguide.xml to reflect this change. I have not yet compiled the Dockbook.xml however. 2012-06-30 00:36:15 +00:00
david
42f71759c2 Use one, not two, spaces after "WARNING:".
There were more cases of one space than two.
2012-06-20 20:13:51 +00:00
fyodor
4402144394 Moved the setuid check from main.cc to nmap.cc after option parsing so that I can use error() and have it write to output file with --log-errors, etc. I did receive a complaint that the setuid warning isn't converted to script kiddie mode when -oS is enabled. If we decide that we want script kiddify error messages, we'll have to add that support to error() 2012-06-02 18:08:39 +00:00
jah
99a37f8aa1 The greppable output was missing a new line character at the end of per host info lines when --host-timeout was used and the host timed-out (after something was received from that host). This issue was reported by Matthew Morgan. 2012-05-22 20:46:57 +00:00
david
56b7063aa9 Use a header file constant for xmloutputversion. 2012-05-05 18:02:37 +00:00
david
1599aa6fe8 Make osclass XML elements children of the osmatch element they belong to.
Add the --deprecated-xml-osclass to restore the old output.
2012-05-05 18:02:33 +00:00
david
ef2987bc68 Don't print_iflist until after win_init. 2012-05-05 00:43:35 +00:00
david
f511045723 Make the two versions of target_needs_new_hostgroup the same.
Up to data structure differences. I'm not sure why they differed to
begin with, though I remember writing the comment that explains that
they differed. This is related to a problem reported by Daniel Miller:
http://seclists.org/nmap-dev/2012/q1/675.
2012-04-17 22:55:09 +00:00
david
035866237a Whitespace. 2012-04-17 04:36:06 +00:00
henri
b1086ac340 Added a --nsock-engine option to nmap, nping and ncat to enforce use of a
given nsock IO engine. [Henri]
2012-03-01 09:05:02 +00:00
fyodor
684f42c4ad One more adjustment to the license text. Notes that Zenmap, Ncat, and Nping use this license. Note that contributions made directly in the src repository are treated the same as those in the mailing list. 2012-03-01 06:53:35 +00:00
fyodor
e96a7b7b24 Update the headers for each code file. This updates code copyright dates to 2012, notes the awesome NSE in the list of technology, and slightly rewords the derivative works clarification 2012-03-01 06:32:23 +00:00
fyodor
984f62f5bc Patrik suggested that we add --script-args-file to the Nmap help screen, which I think is a good idea (done) 2012-01-03 07:18:14 +00:00
fyodor
bb62bab448 o Added the new --script-args-file option which allows you to specify
the name of a file containing all of your desired NSE script
  arguments.  The arguments may be separated with commas or newlines
  and may be overridden by arguments specified on the command-line
  with --script-args. [Daniel Miller]
2012-01-03 07:14:20 +00:00
david
9941656055 Require separate host groups for targets with different source addresses. 2011-12-30 18:19:07 +00:00
david
08b5d81db5 Fix nmap_fetchfile_userdir for non-Windows. 2011-12-20 21:21:44 +00:00
david
5d362169f2 o On Windows, the directory <HOME>\AppData\Roaming\nmap is now
searched for data files. This is the equivalent of $HOME/.nmap on
  POSIX.
2011-12-20 21:11:21 +00:00
david
149ff73451 Check the NMAP_UPDATE_CHANNEL subdirectory first. 2011-12-16 02:55:27 +00:00
david
233fd6c0f9 Comment improvement. 2011-12-16 02:55:26 +00:00
david
212c2a82cb Split out a subroutine in nmap_fetchfile. 2011-12-15 21:13:42 +00:00
david
ee024fde3a Make the comment about fetchfile search order better. 2011-12-15 21:13:41 +00:00
david
6cbd5a9a58 Allow --exclude and --excludefile together. 2011-12-08 23:16:57 +00:00
david
74ace98617 Whitespace. 2011-10-11 20:32:41 +00:00
david
5fc3242535 Don't call win_init until after apply_delayed_options.
jah noticed strange behavior that depends on the order of options; for
example the position of --unprivileged would make a difference. This was
because win_init makes decisions based on certain options and the
options had not been fully processed.
2011-10-11 20:32:41 +00:00
david
9bf2ec3884 Merge from /nmap-exp/luis/nmap-os6.
svn merge --ignore-ancestry svn://svn.insecure.org/nmap@26621 svn://svn.insecure.org/nmap-exp/luis/nmap-os6

This is the IPv6 OS detection branch. "nmap -6 -O" works now, though at
this point it only prints fingerprints and not OS guesses, because we
need to collect more submissions.
2011-09-19 18:31:46 +00:00
djalal
ae90b1b6f8 Declare the 'new_targets' inside the NOLUA conditional directives. 2011-09-11 22:53:57 +00:00
shinnok
c2822fc17a Merging branch /nmap-exp/shinnok/nmap-options-parsing into trunk.
Nmap delays parsing for options that require knowledge of other options that
the user might have supplied in order to make informed decisions. This is
achieved by using a temporary storage place in which options that can't be
correctly parsed and interpreted without having full knowledge of all other
user supplied command line arguments like -S and -6.
2011-07-29 23:50:28 +00:00
djalal
bd6d08232d Added the '--script-help' option to the Nmap usage. 2011-07-22 10:59:07 +00:00
weilin
1dcf652410 Added ND ping for local IPv6 nets, merging from /nmap-exp/weilin/nmap-nd. 2011-07-19 02:31:54 +00:00
david
f3e5a3f113 Add an enclosing host element in XML output for timed-out hosts.
The lack of this was noticed by Rémi Mollon.
2011-07-08 17:08:53 +00:00
shinnok
4a12617401 Initialize exclude_group with addrset_init() before use, otherwise you just
end up freeing an invalid pointer if no exclude lists are added by then.
2011-06-21 11:37:46 +00:00
colin
c1464a4213 Updated nmap to set nbase logging. 2011-06-20 21:39:51 +00:00
colin
6cd1cee328 Merging from nmap-exp/colin/nmap-addrset, nmap-exp/colin/nbase-addrset, and /nmap-exp/colin/ncat-addrset
Ported addrset from ncat to nbase. Made --exclude and --exclude-file options use addrset. As a side effect IPv6 Excludes work.
2011-06-20 20:46:41 +00:00
david
ea99942f25 Revert r24116 and r24117; the addrset functions need to go in a C
library instead.
2011-06-18 23:52:25 +00:00
colin
221d8db694 Merging from nmap-exp/colin/nmap-addrset and /nmap-exp/colin/ncat-addrset
Ported addrset from ncat to libnetutil. Made --exclude and --exclude-file options use addrset. As a side effect IPv6 Excludes work.
2011-06-17 19:58:03 +00:00
david
e4498838b7 Allow splitting up hostgroups on different interfaces for IPv6. 2011-06-17 05:47:31 +00:00
david
b0a49d2ad1 Move get/set_program_name from main.cc to nmap.cc.
This is for technical reasons; nmap-private-dev programs need to link
against objects files but they can't link against main.o because that
results in a duplicate definition of main.
2011-06-15 18:12:33 +00:00
david
87d9c4ba69 Remove some unused function parameters. 2011-06-14 02:29:39 +00:00
david
4aa4a154f9 Merge from /nmap-exp/david/nmap-ipv6.
This is raw IPv6 packet support for most port and ping scans, Neighbor
Discovery, and traceroute.
2011-06-08 01:24:48 +00:00