1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00
Commit Graph

38 Commits

Author SHA1 Message Date
joao
a2dcbb7cd5 Fixing a bug where getPipelineMax was not returning any value, when it sould, at least, return 1. 2009-08-15 14:32:17 +00:00
joao
0a3a1b091c Applying a lot of new features to http.lua:
- Cookie Support
- Pipelining Support
- New lib modularization (previously, single functions were taking care of too many tasks, we have splitted these tasks for better code reuse)
2009-08-12 01:40:06 +00:00
batrick
990cb8965d Removed unused bopt variable. 2009-08-11 05:56:41 +00:00
batrick
ac55b3ca78 Fixed a regexp escape sequence and shortened code. 2009-08-10 12:51:14 +00:00
joao
6218ce14a5 Added POST and HEAD support to http.lua 2009-07-24 08:00:32 +00:00
batrick
67f31fd170 Fixed a global access for 'opts' using check_globals script. 2009-07-15 14:16:14 +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
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
joao
53c5e64c43 Fixed local/global issues with some vars 2009-07-05 09:59:02 +00:00
batrick
1963fe7b96 Removed some code that did nothing. 2009-07-03 04:05:10 +00:00
ron
c213cc97b1 Added an initial WebDAV vulnerability-detection attempt for testing 2009-05-19 20:56:07 +00:00
jah
d757338fa2 Fix http.table_augment which was preventing user-supplied HTTP headers from
being sent in HTTP requests.
2009-05-03 19:03:53 +00:00
david
54a8caae65 Make http.request conform to its documentation; it now interprets any header
fields passed to it and adds them to the request. Previously it ignored them,
relying on http.get to concatentate the header fields into a string for it.
2009-03-01 19:02:33 +00:00
batrick
b901089c19 Corrected documentation. 2008-12-01 04:12:13 +00:00
jah
fece92c4f7 Add http-alt and https-alt to the services handled by html-title.nse
Modified http.request() to connect using ssl for the https-alt service.
html-title.nse can now deal with a redirect which changes the url scheme
as long as a port is present in the url and it is the port being scanned.
2008-11-17 22:06:58 +00:00
jah
c38aa90312 Fix http.lua which ignores port.protocol and assumes it to be 'tcp' even if it is 'udp'.
Now http.request() returns nil if port.protocol is not 'tcp'.
Changed the portrule in html-title.nse to accept only TCP ports.

Fixed a redirect rule in html-title.nse which was comparing the string url.port with
the number port.number - which would always be false.
2008-11-10 22:55:08 +00:00
david
5f166e19ec Don't use empty parentheses when referring to functions by name in NSE
documentation.
2008-11-07 22:49:49 +00:00
david
bf635081c3 Proofread and update documentation of http, ipOps, and listop. 2008-10-24 04:59:36 +00:00
david
7e15f259a4 Standardize the @copyright fields of NSE modules; change "See nmaps COPYING for
license" to "Same as Nmap--See http://nmap.org/book/man-legal.html" like
scripts commonly use. I added the field to some modules I know to be under the
Nmap license: bin, datafiles, dns, nmap, unpwdb. I left alone bin, bit, pcre,
and url, which come from outside sources.
2008-10-24 00:44:22 +00:00
david
dafa60743b Break description summaries in http.lua into their own paragraphs. 2008-10-16 23:37:54 +00:00
david
12e34eb5b0 Reformat and merge documentation for some NSE modules: comm, datafiles, dns,
http, ipOps, listop, and match. This is mainly merging the best documentation
from the module source and scripting.xml into the module, with the aim of
making the source code the canonical source for module documentation.
2008-10-15 22:03:14 +00:00
sven
83ec6aa665 It is unnecessary to prefer targetname over the ip in the request()
function since host is only passed to socket:connect() which would have to
resolve the targetname back to the ip.
2008-10-03 17:17:45 +00:00
david
d8e40a3546 Add Sven's modifications to http.lua. In his words:
It is unnecessary to prefer targetname over the ip in the request()
function since host is only passed to socket:connect() which would have to
resolve the targetname back to the ip.
I've rewritten the header/body separation to use a single regex which
should do the same as your code and since the first match is non-greedy
should always prefer the shorter version.
I've done something similar for the header splitting.
I've removed the type checks for header and body since they are always
strings.
2008-10-03 15:43:38 +00:00
david
ebaf939f5f Make the http NSE module better handle different delimiters in the headers of
messages (and in the body when chunked encoding is used). The patch is from
jah.
2008-10-03 01:00:55 +00:00
fyodor
f67049b2d3 o Fix a bug in the NSE http library which would cause some scripts to
give the error: SCRIPT ENGINE: C:\Program
  Files\Nmap\nselib/http.lua:77: attempt to call field 'parse' (a nil
  value) [Jah]

Also added Win2K dependencies section to nmap-install (I should have
done a separate checkin for that)
2008-09-03 06:22:13 +00:00
fyodor
8b29c19a76 o The NSE http library now supports chunked encoding. [Sven Klemm] 2008-08-29 09:24:24 +00:00
batrick
670792a4a6 Updated all libraries documentation.
packet and url both need more work.
2008-08-18 04:03:45 +00:00
batrick
462c289f4a Fixed all the modules to give a default name if absent.
Also necessary for the documentation system to know the name
of the module.
2008-08-16 04:20:15 +00:00
fyodor
22fac0e3e5 apply patch by Jah to handle some bogus responses from some devices. See http://seclists.org/nmap-dev/2008/q2/0731.html and http://seclists.org/nmap-dev/2008/q2/0732.html 2008-06-29 04:26:20 +00:00
batrick
b589575472 Applied Jah's patch for http.lua discussed in:
http://seclists.org/nmap-dev/2008/q2/0833.html
2008-06-23 03:42:57 +00:00
batrick
77437b3998 Updated incorrectly applied patch for http.lua's use of stdnse.make_buffer()
See: http://seclists.org/nmap-dev/2008/q2/0823.html
2008-06-21 20:49:30 +00:00
batrick
0c57267b76 http library now uses make_buffer correctly. 2008-06-21 19:18:56 +00:00
fyodor
92e39aa66f o Update the HTTP library to use the new timing_level functionality to
set connection and response timeouts. An error preventing the new
  timing_level feature from working was also fixed.  [Jah]
2008-06-18 00:15:27 +00:00
fyodor
76f7cced70 change http User-Agent header value to: Mozilla/5.0 (compatible; Nmap Scripting Engine; http://nmap.org/book/nse.html) 2008-05-31 03:24:25 +00:00
david
8663003c36 The NSE HTTP library now uses the host name specified on the command
line when making requests, which improves script scanning against web
servers with virtual hosts. Thanks to Sven Klemm for the patch.
2008-05-20 06:13:26 +00:00
fyodor
61b976a45c o Nmap now saves the target name (if any) specified on the command
line, since this can differ from the reverse DNS results.  It can be
  particularly important when doing HTTP tests against virtual hosts.
  The data can be accessed from target->HostName() from Nmap proper
  and host.targetname from NSE scripts.  The NSE HTTP library now uses
  this for the Host header.  Thanks to Sven Klemm for adding this
  useful feature.
2008-02-04 22:10:29 +00:00
fyodor
0e65f2e091 oops -- forgot to add this when I committed the other http library changes. Thanks to Kris for noticing the omission 2008-02-01 03:23:50 +00:00