Nmap Development mailing list archives

Re: [NSE] http.lua and delimiters


From: David Fifield <david () bamsoftware com>
Date: Fri, 3 Oct 2008 09:49:04 -0600

On Fri, Oct 03, 2008 at 09:06:45AM +0200, 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.
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.

Thanks, it is committed.

David Fifield

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


Current thread: