1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 05:09:14 +00:00
Commit Graph

4136 Commits

Author SHA1 Message Date
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
david
db2a7826ab Fix NSEDoc comments in ms-sql-config and ms-sql-query. They need three
dashes.
2010-04-06 21:42:17 +00:00
kris
0e579c71a4 o [NSE] Correct misspelled "Capabilities.IgnoreSpaceBeforeParanthesis"
name in the MySQL library. [Kris]

The second "a" in "paranthesis" should be in "e".  No current scripts use
this name (yet).
2010-04-06 02:05:07 +00:00
david
741a9ddbf4 Change Ncat's fix_line_endings to take a state pointer, used to remember
if the previous read ended with \r. If the next read starts with \n, we
shouldn't insert an extra \r before it.
2010-04-05 23:02:11 +00:00
jah
58eca6dfb7 setup_connect, called by exchange, now connects to targets by IP address rather than targetname (which could sometimes be a different host or address family). 2010-04-05 19:39:57 +00:00
kris
c7d97ae2c4 fix function names in error messages 2010-04-05 00:12:58 +00:00
fyodor
2f59126185 Just moving an item 2010-04-04 19:42:03 +00:00
david
3b34c84de7 Add dns-fuzz script from Michael Pattrick. 2010-04-04 13:41:32 +00:00
jah
aec0b2c88c Add nsedoc @return tag for get_url. 2010-04-04 13:00:02 +00:00
patrik
1d26975ede o [NSE] Added a library for Microsoft SQL Server and 7 new scripts. The new
scripts are:
  - ms-sql-brute.nse uses the unpwdb library to guess credentials for MSSQL
  - ms-sql-config retrieves various configuration details from the server		
  - ms-sql-empty-password checks if the sa account has an empty password
  - ms-sql-hasdbaccess lists database access per user
  - ms-sql-query add support for running custom queries against the database
  - ms-sql-tables lists databases, tables, columns and datatypes with optional
    keyword filtering
  - ms-sql-xp-cmdshell adds support for OS command execution to privileged
    users
  [Patrik]
2010-04-04 10:11:54 +00:00
fyodor
231bc9f02e Added a task idea posted by David 2010-04-02 23:20:19 +00:00
fyodor
6ea8e7195b Add task idea from nmap-dev 2010-04-02 21:38:08 +00:00
patrik
f137a07847 o [NSE] Fixed bug in rpc.lua library that incorrectly required file handles
to be 32 octects when calling the ReadDir function. The bug was reported by
  Djalal Harouni. [Patrik]
2010-04-02 17:58:32 +00:00
david
baeb2e8f98 Add @output sections to realvnc-auth-bypass.nse and sql-injection.nse
from Gutek. Also documents the @args of sql-injection.nse.
2010-04-02 15:31:24 +00:00