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
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?
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.