[Nagiosplug-checkins] nagiosplug/contrib check_nmap.py,1.1.1.1,1.2

Matthew Kent mattkent at users.sourceforge.net
Tue Nov 30 19:51:02 CET 2004


Update of /cvsroot/nagiosplug/nagiosplug/contrib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30490

Modified Files:
	check_nmap.py 
Log Message:
Small fix from David Rippel (996800) for newer versions of nmap


Index: check_nmap.py
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/contrib/check_nmap.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- check_nmap.py	28 Feb 2002 06:42:54 -0000	1.1.1.1
+++ check_nmap.py	1 Dec 2004 03:50:37 -0000	1.2
@@ -8,7 +8,7 @@
 # License: GPL
 # Copyright (c)  2000 Jacob Lundqvist (jaclu at galdrion.com)
 #
-_version_ = '1.20'
+_version_ = '1.21'
 #
 #
 # Description:
@@ -25,6 +25,7 @@
 #
 # History
 # -------
+# 1.21	 2004-07-23 rippeld at hillsboroughcounty.org Updated parsing of nmap output to correctly identify closed ports
 # 1.20   2000-07-15 jaclu Updated params to correctly comply to plugin-standard
 #                         moved support classes to utils.py
 # 1.16   2000-07-14 jaclu made options and return codes more compatible with 
@@ -276,7 +277,8 @@
 		if string.find(s,'/')<1:
 		    continue
 		p=string.split(s,'/')[0]
-		self.active_ports.append(int(p))
+		if string.find(l,'open')>1:
+		    self.active_ports.append(int(p))
 	except:
 	    # failure due to strange output...
 	    pass





More information about the Commits mailing list