Home page logo
/

nmap-dev logo Nmap Development mailing list archives

NSE http lib cookies
From: Ryan Dewhurst <ryandewhurst () gmail com>
Date: Mon, 14 Mar 2011 10:29:27 +0000

Hi,

I am attempting to write a NSE script for an experiment however I am having
trouble accessing HTTP response cookies from the http lib. I think this is
due to my lack of understanding of how LUA works.

What I am trying to do is send a HTTP request, then access the HTTP response
cookies for later manipulation. I managed to do this by using strsplit() on
rawheaders() but then noticed the cookies() method and thought it would be
cleaner to use.

I thought the following would have worked, but it does not:
result.cookies[1].name

Here is a pastie of the code:
http://pastie.org/1669666

Here is the command I am using:
nmap -sT www.bbc.co.uk -n -PN -p 80,443 --script=http-null-cookie-fpd.nse

I suspect its just a case of me not knowing the syntax however have spent
many hours trying different variations.

Thank you,
Ryan

Ryan Dewhurst

blog www.ethicalhack3r.co.uk
projects www.dvwa.co.uk | www.webwordcount.com
twitter www.twitter.com/ethicalhack3r
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]