1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00
Commit Graph

382 Commits

Author SHA1 Message Date
d33tah
e3d1c178e3 Add newlines at the EOF in conformance to Daniel's coding standards
proposal. This only affects Nmap's root directory. We might also need to
modify the code which autogenerates Nmap's source code files such as IPv6
fingerprinting code.
2014-06-18 10:18:58 +00:00
jay
beb7aee9d0 Added new options --data <hex string> and --data-string <string> to send custom payloads in scan packet data. 2014-06-15 14:49:25 +00:00
dmiller
8c82e5e3fe New option --noscript turns off script scanning
I often need something like this when creating and testing new service
probes. It's handier than modifying script.db every time to remove
the "version" category.
2014-06-08 02:49:50 +00:00
dmiller
ddcfa8cc90 Spellcheck: common misspellings in the entire source tree 2014-02-21 21:10:51 +00:00
dmiller
3f5e909e8f Spellcheck on docs 2014-02-21 21:10:42 +00:00
dmiller
3f0d0c16f9 Spellcheck on Nmap, Nsock, Nbase source files 2014-02-20 18:44:12 +00:00
dmiller
d67464dda2 -sn -v --open will now hide down hosts
http://seclists.org/nmap-dev/2014/q1/158
2014-02-12 18:47:40 +00:00
d33tah
4816358475 Replace all tab characters at the beginnings of lines with 8 spaces.
Mixed indentation annoyed my vim.
2014-01-05 19:14:26 +00:00
dmiller
26665465c6 Refactor ftp bounce scan into nmap_ftp.{h,cc}
By factoring this code out, we make it easier to convert to NSE.
http://seclists.org/nmap-dev/2013/q4/255
2013-12-11 02:23:58 +00:00
dmiller
866db7eea3 Revert r32528, was not tested on Windows 2013-11-27 13:32:05 +00:00
dmiller
0f5e87c8be Add DOCTYPE declaration to Nmap XML 2013-11-26 21:06:02 +00:00
dmiller
9c36367eea header file cleanup
see http://seclists.org/nmap-dev/2013/q4/168

Move some includes out of nmap.h: nmap.h gets included lots of places,
and unconditionally included math.h, ctype.h, errno.h, stdio.h,
sys/stat.h, fcntl.h, sys/types.h, and stdarg.h. This commit moves those
includes into the .cc files where they are necessary and out of nmap.h

Remove redundant include global_structures.h, included from nmap.h

Removed redundant code included from nmap.h

Removing #include nbase.h when nmap.h is included (redundant)

Remove duplicate #include lines

Add ifndef guards to a few .h files
2013-11-26 20:55:29 +00:00
david
36bea16af7 IPv6 idle scan patch by Mathias Morbitzer.
http://seclists.org/nmap-dev/2013/q3/549
2013-10-27 06:33:49 +00:00
d33tah
ccd0c02a4c Add a lacking space in the license comment. The command I used to do this is:
for file in `grep "* including the terms and conditions of this license text as well.       \*" * -r --files-with-match `; do sed "s/\* including the terms and conditions of this license text as well.       \*/* including the terms and conditions of this license text as well.        */g" -i $file; done
2013-09-11 19:06:20 +00:00
fyodor
9a4d5de988 Update --proxies docs 2013-08-17 20:09:03 +00:00
henri
59e68ddffb Add --proxies to nmap help screen. 2013-08-17 11:46:34 +00:00
fyodor
6e01ecd452 Update an email address, fix a typo, and slightly reword a sentence. 2013-07-30 00:02:00 +00:00
fyodor
83fb10ec56 Update the Nmap copyright/license files. This isn't the new Nmap Public Source License we've been discussing on the list, but rather just a 'quick patch' to hopefully prevent some of the abuse we've been seeing from companies lately. More details on the changes will be posted to the dev list. Also, the copyright year was updated to 2013 (which is the only change to Nsock license statements). 2013-07-28 22:05:05 +00:00
henri
f1cfcb3126 Added a --proxy option as an alias of --proxies as I'm getting tired of always
typing it wrong.
2013-04-22 19:33:44 +00:00
henri
34e825f26e Use the new API that nsock provides for proxychain parsing/handling. 2013-04-22 19:29:50 +00:00
henri
c631af1c09 Added a --proxies <chain> option to nmap to let users specify proxies to use
from command line.

<chain> is expected (by nsock) to be a comma-separated list of proxies.
e.g.:
  http://relay1.local:8080,http://relay2.local:3128

This option has currently no effect.
2013-04-22 19:29:01 +00:00
david
6784954eee Use more automatic memory management in nmap_dns.cc. 2013-01-25 06:26:23 +00:00
david
50a4817671 Remove dynamically allocated fakeargv.
This used to be used to hold the original argv before quashing with -q.
Now that -q is gone, it was just a copy of argv.

fakeargv was also causing Valgrind to complain about leaked memory. it
wasn't a real leak, but now it's out of the report anyway.
2013-01-25 06:26:21 +00:00
david
e1fba2d663 Merge r30416:30527 from /nmap-exp/david/ipv6-ranges.
This is a refactoring of target parsing that stores different types of
target specifications as different classes. The eventual intention is to
allow easy iteration over each specification for the purpose of IPv6
multicast host discovery.
2013-01-22 00:01:08 +00:00
david
d4ddff34d4 Point the --webxml stylesheet at the new repository.
The old URL at svn.insecure.org was a redirect pointing at the new
svn.nmap.org.
Unfortunately, it appears that the new URL still doesn't work, because
of same-origin issues.
http://seclists.org/nmap-dev/2013/q1/56
2013-01-20 10:23:04 +00:00
david
f86b575aa1 Remove -q (quash argv to "pine" option). 2013-01-04 18:59:11 +00:00
fyodor
6a42ef47c0 Update the Nmap and Nsock source code headers to note new Nmap dev mailing list email address and a better URL for Nmap license. 2012-12-06 01:21:42 +00:00
david
f4ff002c71 Warn on failure of munmap.
Patch based on one by Bill Parker.
http://seclists.org/nmap-dev/2012/q4/261
2012-11-22 00:50:16 +00:00
henri
e76d41fa04 Don't fatal() in nsock_set_default_engine()
Return negative value instead. Moved the fatal() statement to nmap.cc
2012-10-21 22:56:53 +00:00
henri
5aaf80a0b9 Added the list of available engines to the output of nmap -V 2012-10-21 20:21:02 +00:00
henri
1e3115dbcb Renamed nmap_fileexistsandisreadable() by file_is_readable(). Former was
hardly readable and is not even a good candidate for longest method
name (http://msdn.microsoft.com/en-us/library/system.windows.media.textformatting.textsource.gettexteffectcharacterindexfromtextsourcecharacterindex.aspx#Y0)
2012-10-20 15:00:10 +00:00
david
03d4b03d2c Get rid of "using namespace std".
Importing the whole std namespace caused a problem with Clang and the
punning of bind and std::bind.

http://seclists.org/nmap-dev/2012/q4/58

The Web's opinion of "using namespace std" also seems to be more against
than for.
2012-10-11 04:45:50 +00:00
david
53cb923ffd Call socket_bindtodevice in FTP bounce scan. 2012-10-03 15:43:26 +00:00
david
a0601febeb Store port numbers in host byte order in number-to-service mapping.
I don't know why these were in network byte order. Every single
interaction had a htons on entrance and ntohs on exit.
2012-09-25 05:24:16 +00:00
david
b2a1ff8e54 Fix broken protocol lookup.
For some reason (probably by imitation of nmap_getservbyport), protocol
numbers, which are byte values 0–255, had htons called on them after
being read from nmap-protocols. On little-endian platforms, this turned
them into integers 0x0100, 0x0200, 0x0300, etc.

protocol_table is supposed to be an array of 256 linked lists, linking
all the protocol names of the same number. Because of the above htons
conversion, all protocols mapped to bucket 0 on lookup instead. Perhaps
in an attempt to work around this broken lookup, all protocols were
inserted into bucket 0 on init; all other buckets were empty. This
worked on little-endian platforms, but on big-endian platforms where
htons is a no-op, all protocol numbers but 0 mapped to an empty linked
list.

Remove all the htons stuff and just look things up by integers. Use the
same mapping on initial insertion and on lookup, so that the buckets are
acutally populated.

This was noticed by hejianet.
http://seclists.org/nmap-dev/2012/q3/1005
2012-09-25 05:08:09 +00:00
david
40eb708922 Show gai_strerror in some error messages. 2012-09-15 17:56:14 +00:00
david
113e0b975f Break out resolve and resolve_numeric.
Besides the confusingness of the nodns argument being negatively
phrased, it had the value 0 in every existing call. Split out the nodns
special case into a separate function resolve_numeric.

This also has the side effect of changing the number of parameters to
the resolve function, which will cause a compile error for any calls I
might have missed changing when I changed the return code meaning in the
previous commit.

Ncat has its own copy of resolve, which obeys the global o.nodns rather
than a parameter. I'm leaving that alone for now. But give it the same
resolve_internal function, and make resolve call it with different flags
depending on the value of o.nodns.
2012-09-15 17:56:11 +00:00
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