Nmap Development mailing list archives

Re: [NSE] http.lua and delimiters


From: jah <jah () zadkiel plus com>
Date: Fri, 03 Oct 2008 13:52:17 +0100

On 03/10/2008 08:06, Sven Klemm wrote:
thanks for your patch. Had never thought so many HTTP server wouldn't
speak proper HTTP. I've attached a patch with a few minor modifications.

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.
Well spotted, you're quite right (your patch doesn't remove
host.targetname).
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. 
It looks good Sven,  I haven't seen any difference in the results - just
nicer, ninja-style code!

Regards,

jah

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


Current thread: