Nmap Development mailing list archives

Re: [NSE] http.lua and delimiters


From: David Fifield <david () bamsoftware com>
Date: Thu, 2 Oct 2008 19:07:47 -0600

On Thu, Oct 02, 2008 at 11:21:14PM +0100, jah wrote:
On 02/10/2008 05:00, David Fifield wrote:
The attached patch adds to the previous one with the following:

The library returns status-line: {status, status-line, header, body} if
the status code is successfully matched - otherwise it's nil, the same
as status.  I've updated the scripts nsedoc with this info and attached
a possible patch for docs/scripting.xml.

The test for the shortest header when the response matches both \r\n\r\n
and \n\n.  This was present during the testing I did yesterday.

A new pattern to split the header from the body: \n\r\n.  I managed to
hit (once) the code which catches responses where there is no clear
separation between header and body and this pattern was introduced in
reaction to that one response caught by this code  (The same code I was
thinking of removing).  The new pattern wasn't present during yesterdays
testing, but more testing has been done since then to ensure that this
addition doesn't cause side-effects (and so far, it hasn't).  I've
decided to leave the catching code in too as there's the possibility
we'll discover other ways to separate header from body (a possibility
might be \r\n\r).

Thanks, this looks good and the updates to the documentation are
especially appreciated. I have committed it.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: