Nmap Development mailing list archives
[PATCHed] nmap.set_port_state() and "Duplicate port" messages
From: Kris Katterjohn <katterjohn () gmail com>
Date: Thu, 27 Mar 2008 17:28:30 -0500
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey everyone, I've just checked-in a patch for the NSE nmap.set_port_state() function. If this function was used to set a port's state, but the port was already in that state, Nmap prints a "Duplicate port" message and the state reason gets set to "script-set" even though was discovered before the script was run. Now it just checks to see if the requested port is in the requested state and does nothing if that's the case. This way the individual scripts don't have to check the state before setting it, the duplicate messages aren't printed, and the state reason is accurate. I first noticed this when using -sV and Brandon's nbstat.nse script, but other scripts would do the same thing because none of them checked for the current port state (and I don't think they should have to). Do I need to update the docs for this? It seems like this should be the expected behavior so it doesn't need to be explicitly pointed out (I initially thought so). Thanks, Kris Katterjohn -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQIVAwUBR+wfjf9K37xXYl36AQLmhA//Tw3R5OAOFiUeZcJIcdlnQDyVXrE8UwvQ vHcDa+76Vf+GZK1FHcAY7XIXOL4e/G81kAwHsYtlzm3OzLZxrBYUbae5B7uul+Z9 BPUwLdfJyfX3hnuWj0Ue9Pfc2H8YKl4+nibIr58WJPuASPBoIDBDQmzvwwao1XC6 Nr2AxNgOxyQceCpIt7vObq0EEiBMs4GPHwlIEXTS6zt+QX5raMTgnrUGDUjCFMkC HQtO5NLfNJCg7wDlLHBwnDzyZWYqrxIfRKz03DeLIZHGQHTazmoPm3VlEM2vFltY 25WNgWR2Kt6e+8USCMEfZuMb5YgiUliDzBgYuz93AM0Knwb+ftuQGC/hH2/UogP1 WCna4e4/0RdUOQFzvA3Byvq0tnZMdxwFhj+AlLa6IW0SpO9nt/PmrX17YNuLPoN5 jzM02vfPC4VzQ8Kf2NkLfQHU68iW/Kgr+oTRWa7Sf1UogDIF+A/MAEGppu38+O1F OzlVnPPzVOztEPKxVdDkqt+Gp2hTwKYOXAbvGRxKyDICbHpwRoCsXj1KIuFbjlUm dSowDYP8e3JftnZG0nzuViH4DNr2uuF+/g3QHu/xujoQdI7fAGNbzKS20XGasMjE 0dAHgj3x8/uuIVzBniM444jpnYmYkygdknXYFsIzmjvLL8TQTJpWCNsXDImUpLjd 1iFPDhqDqmY= =TiWJ -----END PGP SIGNATURE----- _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCHed] nmap.set_port_state() and "Duplicate port" messages Kris Katterjohn (Mar 27)