Nmap Development mailing list archives

Re: [NSE] NSE HTTP library


From: Kris Katterjohn <katterjohn () gmail com>
Date: Thu, 17 Jan 2008 00:40:00 -0600

Sven Klemm wrote:
I've written a HTTP library for NSE in lua. I implemented the
following 3 functions so far: http.get( host, port, path ),
http.request( host, port, request ) and http.get_url( url ).

The host parameter may either be a string or table. The port parameter
may either be a number or a table. This means you can directly pass
the host or port tables you get from nmap into these functions.

The return value of the functions is a table with the following
structure: {status = 200, header = {}, body ="<html>...</html>"}
The header table has an entry for each received header with the header
name being the key.
Status is the HTTP Status code of the request. In case of an error
status is nil. body is a string containing the body of the request.

The library supports http as well as https.


I had this very idea a while ago, but I never did it.  I haven't tested 
it yet (it's past my bedtime now), but it looks really cool! :)

I've also attached a sample script that checks for publicly accessible
svn-Metadata that demonstrates the usage.

It would be really cool if this could be integrated into nmap.


Yeah it would... you're becoming a new NSE guy ;)

Cheers,
Sven


Thanks,
Kris Katterjohn

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


Current thread: