Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: NSE issue with shortport
From: "Eddie Bell" <ejlbell () gmail com>
Date: Wed, 14 Nov 2007 20:13:27 +0000

I don't believe there is a way to set the reason. Although it
shouldn't be too hard to add.

On 14/11/2007, Thomas Buchanan <TBuchanan () thecompassgrp net> wrote:
-----Original Message-----
From: nmap-dev-bounces () insecure org
[mailto:nmap-dev-bounces () insecure org] On Behalf Of Eddie Bell
Sent: Wednesday, November 14, 2007 1:46 PM
To: Thomas Buchanan
Cc: nmap-dev () insecure org
Subject: Re: NSE issue with shortport

Looks like portnumber() doesn't have support for that form of
construct

   if (port.protocol == proto and port.state == state)

Which will never be true as port.state is a string and state is a
table. I've attached a patch, could you try it out?

- eddie



The patch worked like a charm.  The rule matches correctly, and the
script runs against the system.

Reviewing the output brings up another question:  Is there a way to
modify the "reason" attribute for a port from NSE?  In this script, we
have the ability to change an "open|filtered" port state to "open", but
the reason is still listed as "no-response".  Reviewing the online docs
for NSE, it doesn't appear that the nmap.set_port_state function allows
modification to the reason attribute, but I haven't reviewed the code to
see if that's actually the case.

Thanks,

Thomas


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


  By Date           By Thread  

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