1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00
Commit Graph

3785 Commits

Author SHA1 Message Date
fyodor
f52b57212b Remove some extraneous chars 2010-01-14 19:56:47 +00:00
fyodor
ff4c7c0b5a 2010-01-14 19:56:02 +00:00
david
89ca07bec6 Include AC_INCLUDES_DEFAULT (which includes <sys/types.h>), in addition
to <socket.h>, when doing the test for socklen_t. Apparently OpenBSD has
it in <sys/types.h> and it causes a build failure later if we detect
that the type is not present.
2010-01-14 16:47:28 +00:00
david
e8fdd394e6 Add semicolons to the socklen_t typedefs, thanks again to Michael
Pattrick.
2010-01-14 06:04:17 +00:00
david
9570d04ea0 Do the socklen_t typedef in acconfig.h too, so it will remain after
config.h.in is regenerated by autoheader.
2010-01-14 03:38:22 +00:00
david
53c3d44b9a Fix the socklen_t typedef in libdnet-stripped. It was
typedef socklen_t int;

Michael Pattrick pointed out that it should be

typedef int socket_t;
2010-01-14 03:34:11 +00:00
jah
93f2e85aca Fixed a bug in get_dns_servers() where a sockaddr_storage was incorrectly
converted to a printable string causing invalid dns server addresses to be
returned.
2010-01-14 01:30:48 +00:00
david
9b468484c2 o Fixed a bug in traceroute that could lead to a crash:
terminate called after throwing an instance of 'std::out_of_range'
      what():  bitset::test
  It happened when the preliminary distance guess for a target was
  greater than 30, the size of an internal data structure. David and
  Brandon tracked down the problem.
2010-01-14 01:07:49 +00:00
ron
958ba69422 fixed another bug in format_output(), thanks to Patrik. 2010-01-13 21:18:36 +00:00
ron
e47175b4b8 Fixed broken indentation for single-element subgroups in stdnse.format_output(). 2010-01-13 21:03:20 +00:00
david
577fc127f7 Use socket_strerror, not plain strerror, to report the result of non-blocking
connections in tcpip.cc. socket_strerror works with Winsock error codes whereas
plain strerror returns "Unknown error".

However, the error string for what is probably the most common error code,
WSAEWOULDBLOCK, is the big ugly "A non-blocking socket operation could not be
completed immediately.". Add a special case to use "Operation now in progress"
for that specific error.
2010-01-13 19:22:41 +00:00
david
19c2d93903 Merge from /nmap-exp/david/nselib-http. This is an overhaul of HTTP
parsing mostly. Response parsing is centralized, and fewer operations
are done on raw HTTP data.

The biggest user-visible change is that http.request goes back to
returning a parsed result table, not raw HTTP data. I believe this is
how the function worked in the past; it's what the NSEDoc for the
function says. The only thing that used http.request was citrixxml.lua,
and this commit alters it to match the new expectations.

The other change is that the http.pipeline function no longer accepts
the "raw" option. The only script that used that was sql-injection.nse,
and this commit modifies that script as well.
2010-01-13 02:53:13 +00:00
david
b04a80b557 o Added a service probe and match lines for the Logitech/SlimDevices
SqueezeCenter music server. [Patrik Karlsson]
2010-01-12 21:09:01 +00:00
david
1c745e513a Add match lines for a Lexmark printer ftpd and HBN3 server. The HBN3 may
actually be mDNS. These were submitted by Patrik Karlsson.
2010-01-12 20:49:54 +00:00
david
f5cae99a2a Check that nmap.registry.args exists before trying to access
nmap.registry.args["http.useragent"]. The args table doesn't exist
during --script-updatedb. The bug was found by Tom Sellers and fixed by
Jah.
2010-01-12 17:53:01 +00:00
david
b12d633b5a Make Ncat's -p option set the listening port in listen mode (normal Ncat
syntax is to omit the -p) for compatibility with nc. See discussion
starting at http://seclists.org/nmap-dev/2010/q1/31.
2010-01-11 21:50:45 +00:00
david
2475306122 Update the favicon database from the latest dmoz scan. Add about 40 new
icons. Put the list in order. Correct some old entries.
2010-01-11 07:21:08 +00:00
david
12203a8ae1 Don't allow a cached response from a GET request to be returned for a
HEAD request. This makes it look like the response to the HEAD request
has a body. As a result, http-enum can wrongly surmise that HEAD
requests don't work when it hits a cache entry while testing HEAD.

# nmap --script=http-date,http-enum -PN -p 80 -d2
NSE: NSE Script Threads (2) running:
NSE: Final http cache size (373 bytes) of max size of 1000000
NSE: HTTP: Host returns proper 404 result.
NSE: Final http cache size (1905 bytes) of max size of 1000000
NSE: Finished 'http-date' (thread: 0x8535a40).
NSE: HTTP: Warning: Host returned data when performing HEAD.
NSE: Checking if a GET request is going to work out

After this change:

NSE: NSE Script Threads (2) running:
NSE: Final http cache size (373 bytes) of max size of 1000000
NSE: HTTP: Host returns proper 404 result.
NSE: Final http cache size (1905 bytes) of max size of 1000000
NSE: Finished 'http-date' (thread: 0x8e75b00).
NSE: Final http cache size (1905 bytes) of max size of 1000000
NSE: HTTP: Host supports HEAD.
2010-01-10 19:47:33 +00:00
batrick
62ed5336b4 Fixed typo in documentation that screwed up nsedoc. 2010-01-10 04:45:08 +00:00
batrick
e94da5d874 Use em/strong tags instead of <b>. 2010-01-10 03:18:05 +00:00
david
d38ef0da41 Change the header name from "Cookies" to "Cookie" in http.lua. "Cookies"
is incorrect; see RFC 2109 section 4.3.4.
2010-01-09 22:54:37 +00:00
david
d6f8e9edda Merge r16415:16416 from /nmap-exp/david/nselib-http. I meant to do those
commits here in the first place.
2010-01-08 01:13:24 +00:00
david
03bac6b937 o A new script argument, http.useragent, gives the ability to modify
the User-Agent header sent by NSE from its default of "Mozilla/5.0
  (compatible; Nmap Scripting Engine; http://nmap.org/book/nse.html)".
  You can set it to the empty string to disable the User-Agent
  entirely. [David]
2010-01-08 00:41:30 +00:00
david
1b6c69387a Move the format_difftime function out of http-date.nse and into
stdnse.lua. It can be useful in other scripts.
2010-01-06 20:43:24 +00:00
david
953a1eab05 Merge r16378:16395 from /nmap-exp/david/ncat-exec. This adds caretaker
handling of subprocesses to enable options like --ssl and --output with
--exec and --sh-exec.
2010-01-06 05:54:55 +00:00
ron
641a5ff24c Turned off logging in smb-psexec. When logging is on, a .txt file is left on the target system. 2010-01-06 03:39:17 +00:00
ron
c4237f60b0 Updated smb-psexec to finally work on Windows XP, after countless months of it eating away at me. The issue turned out to be an innocuous field in the SMB header, 'process id', which is generally used for connection multiplexing. Apparently, not setting it causes a bug in Windows to surface (I assume it's a bug, anyways) that returns a weird failure code. I found this thanks to Kristof Boeynaems doing some research for me, and then me trying random things to make my packets look more like metasploit's. 2010-01-06 03:10:27 +00:00
fyodor
0189926f92 Some changes from discussion w/David 2010-01-06 01:05:57 +00:00
david
91242b6e55 Make http-favicon.nse check for a <link rel="icon"> icon first, and only
try /favicon.ico if that fails. If the favicon.uri script arg is given,
only try that. Use more robust parsing to find the <link> element; in
particular, be case insensitive.
2010-01-05 00:32:25 +00:00
ron
046c637bb1 Fixed a typo and a circular dependency in smb-check-vulns.nse. 2010-01-04 17:00:40 +00:00
david
2b6adfa8a3 Use "cso" instead of "ccso" for the CCSO/Qi protocol match line to
accord with the IANA list.
2010-01-02 22:29:30 +00:00
david
5437ac7da3 Add a new service match line for a service I just got some more
information on. It's the censorship proxy operated nationwide by
Etisalat, a United Arab Emirates telecom.
2010-01-02 19:13:16 +00:00
david
de2652e635 Fix a service name in nmap-service-probes; it was http when it should
have been http-proxy.
2010-01-02 19:03:50 +00:00
david
060c978d96 o [Zenmap] The locale setting had been taken from the Windows locale,
which inadvertently made setting the locale with the LANG
  environment variable stop working. Now the LANG variable is examined
  first, and if that is not present, the system-wide setting is used.
2010-01-01 06:08:27 +00:00
david
ae74adfd8d Add the /s and /e options to xcopy when copying the nselib/data directory, so
we get the contents of the psexec subdirectory.
2010-01-01 05:39:15 +00:00
david
70ce7026fb Add a service match for Columbia University QIL from Matt Selsky. 2010-01-01 02:38:58 +00:00
david
cc07d32df3 Adjust all the Freenet FProxy match line to be http-proxy and not http. 2010-01-01 00:36:13 +00:00
david
1e2ebb577d Remove historical information about the runlevel variable and just
mention it in a footnote. Use a real example of the dependencies
variable from smb-os-discovery.
2009-12-31 22:42:43 +00:00
david
121d89b1c2 Add one more service fingerprint I missed. 2009-12-31 20:51:08 +00:00
david
ceba472e44 Add some of Willem de Groot's http service fingerprints from
http://seclists.org/nmap-dev/2009/q4/591.
2009-12-31 19:17:40 +00:00
david
054cc8b722 Do service fingerprint corrections. 2009-12-31 17:44:35 +00:00
david
2cf7ccf91e Do the last of the service fingerprint submissions. 2009-12-31 03:37:57 +00:00
david
bf20111d05 Another batch of uncategorized service submissions. 2009-12-30 04:08:05 +00:00
batrick
610bd0a55b Merge from Dependencies branch (nmap-exp/patrick/dependencies)
with modifications from [2].

** Short description from [1] **

I have created a patch to NSE that replaces runlevels with a table of
dependencies that clearly outlines what other scripts the script
depends on. The table is of the form:

dependences = {"script1", script2", ...}

Runlevels become an internal representation of the order of scripts
that are generated by the dependencies. Dependencies only enforce
an execution order and not a requirement for execution.

[1] http://seclists.org/nmap-dev/2009/q4/295
[2] http://seclists.org/nmap-dev/2009/q4/446
2009-12-30 02:34:05 +00:00
fyodor
0f367454f3 Changes from discussion w/David 2009-12-29 22:15:03 +00:00
david
72aaaeaca8 A batch of miscellaneous service submissions. About 700 remain. 2009-12-29 02:36:27 +00:00
david
671167227f Add the oracle-sid-brute script from Patrik Karlsson. 2009-12-28 17:35:46 +00:00
david
a181695f68 Update an OS entry based on a service submission. 2009-12-27 06:58:36 +00:00
david
4dd8d5faeb Do all the http service submissions. 2009-12-27 06:57:59 +00:00
david
d5b2404441 Fix the RTSPRequest service probe, which I accidentally changed to read
"RTSP/2.0" instead of "RTSP/1.0" during an integration commit, r16327.
Patch by Matt Selsky.
2009-12-24 22:41:24 +00:00