diff --git a/lib/controller/checks.py b/lib/controller/checks.py index eea596db6..abc6c0ebe 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -521,15 +521,18 @@ def checkSqlInjection(place, parameter, value): injection.conf.regexp = conf.regexp injection.conf.optimize = conf.optimize - if conf.beep: - beep() + if not kb.alerted: + if conf.beep: + beep() - if conf.alert: - infoMsg = "executing alerting shell command(s) ('%s')" % conf.alert - logger.info(infoMsg) + if conf.alert: + infoMsg = "executing alerting shell command(s) ('%s')" % conf.alert + logger.info(infoMsg) - process = execute(conf.alert, shell=True) - process.wait() + process = execute(conf.alert, shell=True) + process.wait() + + kb.alerted = True # There is no need to perform this test for other # tags diff --git a/lib/core/option.py b/lib/core/option.py index 89654fd29..8aa6fb71f 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1480,6 +1480,7 @@ def _setKnowledgeBaseAttributes(flushAll=True): kb.absFilePaths = set() kb.adjustTimeDelay = None + kb.alerted = False kb.alwaysRefresh = None kb.arch = None kb.authHeader = None