diff options
author | Matthew Kent <mattkent@users.sourceforge.net> | 2004-12-01 03:50:37 +0000 |
---|---|---|
committer | Matthew Kent <mattkent@users.sourceforge.net> | 2004-12-01 03:50:37 +0000 |
commit | 8c81cf5bd0fc95e8ba08dee99d7bba13b890037b (patch) | |
tree | 392a468feee72cfb42c3b953fc18ffa2e5a6f858 | |
parent | 3857e368e9dfdd5bcd2649a97e42425fa71d1ad0 (diff) | |
download | monitoring-plugins-8c81cf5bd0fc95e8ba08dee99d7bba13b890037b.tar.gz |
Small fix from David Rippel (996800) for newer versions of nmap
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@958 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | contrib/check_nmap.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/check_nmap.py b/contrib/check_nmap.py index 4f53406d..07f6d7fa 100644 --- a/contrib/check_nmap.py +++ b/contrib/check_nmap.py @@ -8,7 +8,7 @@ # License: GPL # Copyright (c) 2000 Jacob Lundqvist (jaclu@galdrion.com) # -_version_ = '1.20' +_version_ = '1.21' # # # Description: @@ -25,6 +25,7 @@ _version_ = '1.20' # # History # ------- +# 1.21 2004-07-23 rippeld@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 @@ class CheckNmap: 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 |