Nmap Development mailing list archives

Re: Problem saving pages with http-headers.nse script


From: al bell <ab4250 () gmail com>
Date: Fri, 25 Jan 2013 10:57:32 -0800

I get it now, your example shows how to pass the parameter, which the NSE
does not.....

The GET is issued, but the html itself is not saved in the output.......

This is what should be there:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Go ahead and ScanMe!</title>


1e2e
<link REL="SHORTCUT ICON" HREF="/shared/images/tiny-eyeicon.png"
TYPE="image/png">
<META NAME="ROBOTS" CONTENT="NOARCHIVE">
<link rel="stylesheet" href="/shared/css/insecdb.css" type="text/css">
</HEAD>
<BODY BGCOLOR="#2A0D45" TEXT="#000000">

<TABLE CELLPADDING="0" WIDTH="100%" CELLSPACING="0">
<TR><TD ALIGN="left"><A HREF="/"><IMG BORDER=0 ALT="Home page logo"
SRC="/images/sitelogo.png" HEIGHT=90 WIDTH=168></A></TD>
<TD VALIGN="bottom" ALIGN="right">

......





On Fri, Jan 25, 2013 at 9:38 AM, David Fifield <david () bamsoftware com>wrote:

On Thu, Jan 24, 2013 at 02:49:36PM -0800, al bell wrote:
I am running nmap 6.25 in the following way:

c:\test\scanned_files>nmap -p 80 10.10.6.74 --script http-headers
--script-args useget=/  -oX c:\test\scanned_files\74.xml

The output does not include the html for / , as expected.

When I run nmap with --script-trace, I can see the html on the screen,
but
it is not saved as psart of the xml output. I would expect the HTML to be
saved on the script_output tag.

Any help will be greatly appreciated.

It seems to work for me. The script output is a child of the <port>
element in this case; you might have been looking for it somewhere else.

$ nmap -p 80 --script=http-headers --script-args useget=1 scanme.nmap.org-oX -
...
<port protocol="tcp" portid="80">
  <state state="open" reason="syn-ack" reason_ttl="0"/>
  <service name="http" method="table" conf="3"/>
  <script id="http-headers"
          output="&#xa;  Date: Fri, 25 Jan 2013 17:35:58 GMT&#xa;  Server:
Apache/2.2.14 (Ubuntu)&#xa;  Accept-Ranges: bytes&#xa;  Vary:
Accept-Encoding&#xa;  Connection: close&#xa;  Transfer-Encoding:
chunked&#xa;  Content-Type: text/html&#xa;  &#xa;  (Request type:
GET)&#xa;"/>
</port>
...

David Fifield

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: