Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: NSE issue with shortport
From: Fyodor <fyodor () insecure org>
Date: Thu, 15 Nov 2007 13:03:49 -0800

On Thu, Nov 15, 2007 at 08:51:22PM +0000, Matthew Boyle wrote:

From: TBuchanan () thecompassgrp net
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.

something like this?

it automatically sets the port to have a new reason ("script-set") when you modify its state.  mostly this is a lot 
easier than finding the correct reason_code from the user's (possibly ambiguous or incorrect) string, but also 
because i think this is a more accurate representation of what happened.  though i suppose we could guess that, say, 
a UDP port is being set to "open" because we've received a udp-response).

it also adds an extra "reason" field to the port-table for good measure.  this is a bit flakey: changing the port 
state doesn't update it.  i'm not sure if this is likely to be a problem, or just a potential source of minor 
confusion, but i certainly can't see a sane way of doing it.

Looks good Matt!  I just applied your patch to SVN.

-F

_______________________________________________
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 ]
AlienVault