From: TBuchanan_at_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.
--matt
_________________________________________________________________
The next generation of MSN Hotmail has arrived - Windows Live Hotmail
http://www.newhotmail.co.uk
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Received on Nov 15 2007