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

4399 Commits

Author SHA1 Message Date
fyodor
e34bd54d68 Add a couple Zenmap ideas suggested by Norris Carden 2010-04-20 23:24:54 +00:00
david
34a6753f73 Add a check to see if the libpcap library needs and has a workaround for the
BPF_TIMEVAL BIOCSRTIMEOUT bug that affects OS X 10.6. If the size of the
parameter to the BIOCSRTIMEOUT ioctl is sizeof(struct timeval) we assume the
workaround is not needed (most platforms). If they are unequal, we assume that
version 1.1.0 or later has a workaround.
2010-04-20 23:22:48 +00:00
fyodor
11c143327f note a couple done tasks 2010-04-20 23:20:24 +00:00
david
701fe380f8 Move the libpcap version number check into acinclude.m4, call it
PCAP_IS_SUITABLE.
2010-04-20 22:02:10 +00:00
david
49e6ad8560 200 OS submissions. 2010-04-20 17:47:23 +00:00
david
af678e3f2a Another 100 OS submissions. 2010-04-19 23:16:17 +00:00
david
a2b7e309ce With --with-libpcap=included, link driectly against libpcap/libpcap.a instead
of adding -Llibpcap/ -lpcap to LDFLAGS. The latter, at least on OS X, still
links dynamically against the system installation of libpcap. This is
consistent with how --with-libpcre=included works.
2010-04-19 20:09:58 +00:00
david
89ea71e792 Add the libpcap merge from r17349 to NMAP_MODIFICATIONS. 2010-04-19 19:39:04 +00:00
david
dedbb7f6ee Merge commit 43acbb77a8e0b3346b574b3e28793de2d6985e69 from libpcap
upstream (git://bpf.tcpdump.org/libpcap). This is a workaround for the
BIOCSRTIMEOUT bug in 10.6, 10.6.1, and 10.6.3 that doesn't work for
non-integer timeouts. A symptom of being affected by the bug is Nmap
haning forever at the first call to pcap_next. 10.6.2 was somehow not
affected.

This alone still doesn't solve the problem; I still have to make the
default --with-libpcap=included for 64-bit OS X.

The source comment is informative:
/*
 * XXX - Mac OS X 10.6 mishandles BIOCSRTIMEOUT in 64-bit userland - it
 * takes, as an argument, a "struct BPF_TIMEVAL", which has 32-bit
 * tv_sec and tv_usec, rather than a "struct timeval".
 *
 * If this platform defines "struct BPF_TIMEVAL", we check whether the
 * structure size in BIOCSRTIMEOUT is that of a "struct timeval" and, if
 * not, we use a "struct BPF_TIMEVAL" rather than a "struct timeval".
 * (That way, if the bug is fixed in a future release, we will still do
 * the right thing.)
 */

commit 43acbb77a8e0b3346b574b3e28793de2d6985e69
Author: Guy Harris <guy@alum.mit.edu>
Date:   Sun Oct 11 11:05:46 2009 -0700

    Work around an annoying Snow Leopard BPF bug that causes sub-second
    timeouts not to work in 64-bit userland code (Snow Leopard's GCC builds
    64-bit by default on 64-bit machines).
2010-04-19 19:22:01 +00:00
david
0a22176263 Here are about 100 OS submissions. 2010-04-19 18:02:29 +00:00
david
e9fc299fea Fix a typo in an error message, also provide more information. 2010-04-19 18:01:37 +00:00
jah
cb0f4a6134 Add some special use IPv4 addresses to isPrivate which are described in RFC 5736
and RFC 5737, published in Jan 2010. Improve performance of isPrivate for IPv4
addresses by using ip_in_range less frequently. Add an extra return value to
isPrivate - when the first return value is true, the second return value will
now be a string representing the special use assignment in which the supplied
address is located.
2010-04-18 18:55:30 +00:00
ron
cb60803ad1 Fixed a couple bugs in the smb-* scripts involving undeclared variables. These only cropped up if the guest/anonymous accounts were disabled, which I'd never seen before. 2010-04-18 13:43:27 +00:00
david
3915ed94e4 Remove explicit timelimit checking from ms-sql-brute, pgsql-brute,
mysql-brute, ldap-brute, and afp-brute. The unpwdb library does this
automatically now.
2010-04-16 02:11:12 +00:00
david
84d99961a9 Add a missing return in unpwdb.timelimit. 2010-04-16 01:52:28 +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
dc03a70c79 Fix some NSEDoc. Some libraries had @copyright and @author right at the
top of the first comment, so the entire description got stuffed into the
@author field. I also discovered a limitation in the NSEDoc parser: the
first non-empty line following the first --- comment must be the
"module" call, or else the block isn't recognized as belonging to a
module. This was preventing @args from appearing in certain libraries.
Djalal Harouni told me about this.
2010-04-15 19:21:13 +00:00
david
f3a989f989 Use safe_realloc in XML escape. 2010-04-15 02:18:58 +00:00
fyodor
c73921017d Update after chat w/David 2010-04-14 22:15:35 +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
david
62955f75e6 Add to CHANGELOG:
o [NSE] Scripts that take an argument for a time duration can now have
  the duration be a number followed by a unit, like other times in
  Nmap. For example, 10m for 10 minutes. The units understood are ms
  for milliseconds, s for seconds, m for minutes, and h for hours.
  Seconds are the default if no unit is specified. The new function
  stdnse.parse_timespec does the parsing of these formats. The
  qscan.delay script argument, which formerly interpreted its argument
  as being in milliseconds, now defaults to seconds; append "ms" to
  continue using the same numbers. [David]
2010-04-13 23:51:41 +00:00
david
a6e014d42e Change these script arguments to use stdnse.parse_timespec:
qscan.delay
dns-fuzz.timelimit
mssql.timelimit
A side effect is that the default units for qscan.delay are seconds, not
milliseconds. 0 is now the magic value to disable the time limit in
dns-fuzz.
2010-04-13 23:09:23 +00:00
david
68186c2007 Use parse_timespec in unpwdb.lua. 2010-04-13 20:01:38 +00:00
david
b7428619cf Add a stdnse.parse_timespec function. 2010-04-13 17:06:34 +00:00
david
c63e35bc2d Give names to some Windows ports that are in the top 1000, from the list
at http://support.microsoft.com/kb/832017#5. This list was mentioned by
Stephen Kleine.
2010-04-13 15:19:35 +00:00
kris
f51f1b0154 Add "username" and "password" script args to ftp-bounce.nse
It has scoped args in the straight form of "ftp-bounce.<arg>" which is
apparently how this works now (at least what other scripts seem to use) instead
of using actual subtables like in http://seclists.org/nmap-dev/2008/q2/567
2010-04-13 05:13:49 +00:00
david
a34a91f9c5 Add an @output section to auth-spoof.nse contributed by Brandon Enright. 2010-04-13 02:36:56 +00:00
david
22d8aec1ef Add additional @output examples to ftp-bounce.nse, contributed by Gutek. 2010-04-13 02:35:20 +00:00
david
43470e91ba Add to CHANGELOG:
o [Zenmap] Made IP addresses be sorted by octet, not by their string
  representation. For example, 10.1.1.2 is now sorted before
  10.1.1.10, when it was the opposite before. This was reported by
  Norris Carden. [David]
2010-04-13 02:20:14 +00:00
patrik
bd5e91ffcc o [NSE] Added sorting on port number to dns-service-discovery script. [Patrik] 2010-04-12 10:43:06 +00:00
patrik
112f8f5340 o [NSE] Added snmpWalk function to SNMP library and updated scripts to use it
[Patrik]
2010-04-12 10:30:24 +00:00
jah
a9c5d3391c Changed erroneous RFC1918 Private Address assignment from 172.15/12 to 172.15/12. My bad. 2010-04-11 23:38:06 +00:00
jah
19117c80be Fixed error in dns.lua reported by Eugene Alexeev:
nselib/dns.lua:110: attempt to get length of field 'dtype' (a number value)
2010-04-10 21:25:50 +00:00
kris
3f4153c956 update ip_is_reserved(): 14/8 and 223/8 allocated 2010-04-10 04:11:39 +00:00
jah
d7092b8a9d [NSE] Added UDP header parsing support to packet.lua. 2010-04-10 00:22:03 +00:00
jah
4554312eb6 Added UDP header support. 2010-04-10 00:16:32 +00:00
patrik
a783565970 o [NSE] Correct global access errors in afp.lua reported by Patrick Donnelly
[Patrik]
2010-04-08 20:55:20 +00:00
batrick
9537366a74 Fixed global access error with fix proposed by Matrin Swende [1].
[1] http://seclists.org/nmap-dev/2010/q1/459
2010-04-08 20:40:20 +00:00
batrick
98d4bee8e5 global bug fixes 2010-04-08 20:36:43 +00:00
batrick
0f1b1626c4 whitespace change 2010-04-08 20:27:05 +00:00
david
8a26459cfd Add @output sections for http-passwd, db2-info, db2-das-info, and
pptp-version.
2010-04-08 19:44:20 +00:00
fyodor
5f15989593 Add AS number script idea to network script class item 2010-04-08 09:32:24 +00:00
fyodor
724183acbb Some changes from chat w/David yesterday 2010-04-08 09:26:02 +00:00
david
d183a334a2 Add or fix @output sections in ms-sql-config, oracle-sid-brute,
iax2-version, pop3-brute, and skypev2-version.
2010-04-08 06:09:39 +00:00
david
5ab63a55be Say that @usage applies to modules. Say that @usage is automatically
generated for scripts if omitted.
2010-04-08 05:26:42 +00:00
david
838127d565 Remove the error element from the XML DTD. It was supposed to be a child
of trace, but I don't think it has ever been emitted since traceroute
was added in r4556.
2010-04-07 23:26:09 +00:00
ron
ab654ecc34 Fixed a bug in dhcp-discover -- the read_boolean() function appears to never have worked, but I didn't run into anything that returned a boolean value until Brandon tried running it. It now handles booleans properly, along with a lot of extra debug output (especially on -d2 and higher) 2010-04-07 21:47:22 +00:00
ron
398ecbcb62 Improved error handling (and messages) on dhcp-discover.nse. Hoping to track down a problem reported to me by Brandon Enright. 2010-04-07 21:03:51 +00:00
david
4332937a74 Fix typo. 2010-04-07 14:35:31 +00:00