From ff9b4ffff6ff765572b2df28034ec46de05149eb Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Mon, 7 Oct 2019 16:53:59 +0200 Subject: [PATCH 1/2] Do not add a host detail result with the host status. --- ospd/ospd.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ospd/ospd.py b/ospd/ospd.py index b64fdc0d..999669b6 100644 --- a/ospd/ospd.py +++ b/ospd/ospd.py @@ -776,17 +776,11 @@ def parallel_scan(self, scan_id, target): try: ret = self.exec_scan(scan_id, target) if ret == 0: - self.add_scan_host_detail( - scan_id, name='host_status', host=target, value='0' - ) + logger.info("%s: Host scan dead.", target) elif ret == 1: - self.add_scan_host_detail( - scan_id, name='host_status', host=target, value='1' - ) + logger.info("%s: Host scan alived.", target) elif ret == 2: - self.add_scan_host_detail( - scan_id, name='host_status', host=target, value='2' - ) + logger.info("%s: Scan error or status unknown.", target) else: logger.debug('%s: No host status returned', target) except Exception as e: # pylint: disable=broad-except From 7fcc502af7baafc6c17eeb73a86f8a9428c7277f Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Mon, 7 Oct 2019 16:59:32 +0200 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59da2b3d..924339f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Use ordered dictionary to maintain the results order. [#119](https://github.com/greenbone/ospd/pull/119) - Refactor ospd. [#120](https://github.com/greenbone/ospd/pull/120) - Set default unix socket path to /var/run/ospd/ospd.sock and default pid file path to /var/run/ospd.pid. [#140](https://github.com/greenbone/ospd/pull/140) +- Do not add a host detail result with the host status. [#145](https://github.com/greenbone/ospd/pull/145) ### Fixed - Fix scan progress. [#47](https://github.com/greenbone/ospd/pull/47)