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

3106 Commits

Author SHA1 Message Date
batrick
67f31fd170 Fixed a global access for 'opts' using check_globals script. 2009-07-15 14:16:14 +00:00
batrick
35f94dcaf3 Removed two functions no longer being used. 2009-07-15 08:53:19 +00:00
david
dab741f30f Make nse_selectedbyname return false if the "NSE_SELECTED_BY_NAME" key
is not in the registry. That function is called indirectly by
nmap.verbosity, which may be called before _R["NSE_SELECTED_BY_NAME"]
has been given a value. I was getting this error with any script scan:

NSE: failed to initialize the script engine:
attempt to call a nil value
stack traceback:
        [C]: in function 'verbosity'
        ./nse_main.lua:136: in function 'print_verbose'
        ./nse_main.lua:680: in main chunk
        [C]: ?

QUITTING!
2009-07-15 02:54:03 +00:00
fyodor
276def3c2e changes from NSE meeting 2009-07-15 01:28:34 +00:00
batrick
01c25ab29e [NSE] Patch to move the call NSE_SELECTED_BY_NAME to nse_main.cc for
improved locality. Other Lua Registry functions called by C were wrapped in
a C API inside nse_main.cc.
2009-07-14 22:41:25 +00:00
fyodor
ad10a7c672 Latest TODO after chat w/David 2009-07-14 22:27:17 +00:00
fyodor
7c4abd869b some reorg 2009-07-14 20:05:41 +00:00
batrick
490c0c3b57 Add destructor for mutex "trylock" case (was forgotten in mutex destructor
patch).
2009-07-14 11:36:39 +00:00
batrick
9dce0cd070 Fixed a compiler warning. 2009-07-14 09:56:09 +00:00
batrick
543af4c57d Increased the default parallelism for NSE to 40. This patch is the result
of testing to determine an ideal default value. A post on nmap-dev will
soon follow further describing the results and motivation.
2009-07-14 05:19:47 +00:00
david
7ce852170b Move format_difftime to after the action function where it belongs. 2009-07-13 22:49:50 +00:00
david
40b0f784e7 Make http-date.nse capable of printing time differences in years. A web
server with a date in 2007 was producing the output

|_ http-date: Sun, 07 Jan 2007 08:17:36 GMT; -918d13h46m40s from local time.

Now it is

|_ http-date: Sun, 07 Jan 2007 09:01:44 GMT; -2y187d13h46m40s from local time.
2009-07-13 22:48:53 +00:00
david
426ed74a8b Add the http-date.nse script. Also the function http.parse_date that
parses an HTTP date in any of three possible formats.

http-date.nse gets the Date: header field value from and HTTP server,
then displays it with how much it differs from local time.
2009-07-13 22:03:02 +00:00
joao
c455e12b7d http.lua using a different approach to deal with ssl connections. Now it is using the comm.tryssl method. 2009-07-13 15:24:14 +00:00
daniel
47940be062 Update TODO.sctp to reflect recent progress in Ncat SCTP support. 2009-07-13 09:48:24 +00:00
david
635850af8b Small documentation updates for script output support in Ndiff. 2009-07-13 06:06:58 +00:00
david
ba53f578b3 Show script output in Ndiff text output. 2009-07-13 05:59:05 +00:00
david
b9f994e71d Add script output to Ndiff XML output. 2009-07-13 05:34:13 +00:00
david
fda75eea6c Move the text output of port diffs from the HostDiff class to the
PortDiff class.
2009-07-13 04:19:21 +00:00
fyodor
c29429ecb5 2009-07-13 01:34:45 +00:00
david
7dbe9e55d3 Add to CHANGELOG:
o A bug in Nsock was fixed: On systems where a nonblocking connect
  could succeed immediately, connections that were requested to be
  tunnelled through SSL would actually be plain text. This could be
  verified with an Ncat client and server running on localhost. This
  was observed to happen with localhost connections on FreeBSD 7.2.
  Non-localhost connections were likely not affected. The bug was
  reported by Daniel Roethlisberger. [David]
2009-07-13 00:06:38 +00:00
david
276a2f195c [NSE] Scripts that are listed by name with the --script option now
have their verbosity level automatically increased by one. Many
will print negative results ("no infection found") at a higher
verbosity level. The idea is that if you ask for a script
specifically, you are more interested in such results.
2009-07-12 19:35:56 +00:00
fyodor
6a9f1caf3f 2009-07-12 08:19:56 +00:00
fyodor
2447224881 2009-07-12 06:59:29 +00:00
fyodor
e9bf63538d Add web application attack TODO--comparision w/Nessus http://blog.tenablesecurity.com/2009/06/enhanced-web-application-attacks-added-to-nessus.html 2009-07-12 01:26:07 +00:00
venkat
5398e697d0 Remove stray character left over in r14198. 2009-07-12 00:57:11 +00:00
venkat
d51dd6e956 Added proxy code change entry 2009-07-12 00:51:37 +00:00
fyodor
ed5eda1a1e Note how nice it would be if we had Nmap/Zenmap/Ncat promotional and training videos 2009-07-12 00:28:02 +00:00
fyodor
97144b2ae1 trivial spacing differences 2009-07-12 00:19:53 +00:00
david
5abf361663 Visually simplify the code that builds the port table. 2009-07-11 02:26:02 +00:00
kris
8d65f4e28d Make Ncat's --send-only actually not receive from the network when used in
listen and/or broker modes.
2009-07-11 00:16:39 +00:00
david
a660b37026 Parse script results. 2009-07-10 23:55:29 +00:00
david
4b99c96667 Run whois.nse in complex.xml so it has a hostscript. 2009-07-10 23:50:44 +00:00
david
72949e27e8 Remove the test for the sort order of addresses. The idea behind that
was that if a host had multiple addresses of the same type, they should
be sorted numerically, not alphabetically. So 20.0.0.1 should come
before 100.0.0.1. But the way Nmap works, I don't think a host can have
more than one address of the same type, and it's not worth the code it
would take to make them sort properly if it did.
2009-07-10 23:30:32 +00:00
david
3d3e3b8515 Regnerate test scan files, add script scanning, version detection, and
OS detection to complex.xml.
2009-07-10 23:28:28 +00:00
david
3b18401d5d Do SSL_read in the same place as a normal socket read in ncat_broker.c
so that read errors for both can be handled in the same place. SSL_read
errors were not being handled at all, which would cause the Ncat broker
to use 100% CPU after a client disconnected. The problem was reported by
Kris at http://seclists.org/nmap-dev/2009/q2/0840.html.
2009-07-10 21:57:45 +00:00
david
df2611a5be [Ncat] Ncat now prints a message like "Connection refused." by
default when a socket error occurs. This used to require -v, but
printing no message at all could make a failed connection look like
success in a case like
  ncat remote < short-file
2009-07-10 20:08:41 +00:00
david
98af0bba24 Add an append_raw method to the Table class to add an unformatted string
to a table. This is going to be for script output.
2009-07-10 01:25:39 +00:00
david
47e79670b6 Add a comment explaining how the NSE_YIELD, NSE_DESTRUCTOR et al.
registry keys are used.
2009-07-09 22:56:04 +00:00
josh
e42d963ec1 [Ncat] Reworked the test program ncat/test/test-cmdline-split and added
additional cases.  Also rewrote cmdline_split in ncat_posix.c
2009-07-09 04:00:35 +00:00
david
36b12c9a21 Make decoding of the "chunked" transfer encoding more robust in
http.lua. Previously the code was not careful about checking its input,
and would loop forever if it got something non-hex where it expected a
hex chunk-size. See http://seclists.org/nmap-dev/2009/q3/0013.html.

This code raises an error whenever decoding fails for whatever reason.
It also handles chunk extensions. The reference is section 3.6.1 of
RFC 2616.
2009-07-09 03:07:31 +00:00
david
871629626e Simplify and comment getinterfaces_siocgifconf to make its structure
more clear: We call several different ioctls on each interface and use
the results to populate the interface_info array.
2009-07-09 00:09:25 +00:00
david
1d5f68a080 Remove a bogus leftover use of a valid pointer as a throwaway variable
in getinterfaces. This was the cause of an overlapping memcpy reported
at http://seclists.org/nmap-dev/2009/q2/0713.html.

In the code, sin is a pointer that holds the address of the IP address
configured for an interface. It is copied into a tmpifr.ifr_addr before
each ioctl, perhaps because that is required on some platforms even
though on Linux only ifr_name is needed by the ioctl. When the ioctl
returns, it overwrites whatever was in ifr_addr because that member is
in a union, so sin is kept in order to restore the address again before
the next ioctl.

In the code that handles SIOCGIFNETMASK, sin was mistakenly used as a
temporary pointer and redirected to &tmpifr.ifr_addr. This caused all
future memcpys before ioctl to copy tmpifr.ifr_addr to itself, rather
than copying in the IP address of the interface.

The throwaway sin assignment was not even used; the code that used it
was modified in r2751. So now we just keep sin pointing where it should
the whole time.
2009-07-08 23:09:35 +00:00
fyodor
4e9d7c17a5 update Nmap version number to 4.90RC1, rebuild generated files, except for man pages which are problematic at the moment 2009-07-08 22:32:49 +00:00
david
73fd225180 Add payload.cc and payload.h to the Windows build file. 2009-07-08 21:47:35 +00:00
david
e9d8897cde Use strtol, not strtoll, for Windows compatibility. 2009-07-08 21:46:11 +00:00
david
be55765315 Break up the getinterfaces function, which did one thing for Windows and
another thing otherwise in a big if/else. Now getinterfaces just does
caching and getinterfaces_dnet or getinterfaces_siocgifconf does the
actual interface lookup.
2009-07-08 21:42:03 +00:00
fyodor
599a5cc62f Some changes from chat w/David yesterday 2009-07-08 21:37:02 +00:00
david
cd820ba39b Show the host and port when a script throws an error. 2009-07-08 19:32:40 +00:00
david
ba2e2299f7 Make Ncat --broker imply --listen. 2009-07-08 03:55:12 +00:00