From 95824ba5b5fcaab082c1be26e40029b673db468e Mon Sep 17 00:00:00 2001 From: frikky Date: Wed, 10 Aug 2022 19:37:32 +0200 Subject: [PATCH] Added more debug things for Wazuh --- functions/extensions/wazuh/custom-shuffle.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/functions/extensions/wazuh/custom-shuffle.py b/functions/extensions/wazuh/custom-shuffle.py index 92ffa66f..317b2b09 100644 --- a/functions/extensions/wazuh/custom-shuffle.py +++ b/functions/extensions/wazuh/custom-shuffle.py @@ -23,7 +23,6 @@ except Exception as e: # # Global vars - debug_enabled = True pwd = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) json_alert = {} @@ -32,6 +31,12 @@ now = time.strftime("%a %b %d %H:%M:%S %Z %Y") # Set paths log_file = 'integrations.log' +try: + with open("/tmp/shuffle_start.txt", "w+") as tmp: + tmp.write("Script started") +except: + pass + def main(args): debug("# Starting") @@ -68,6 +73,14 @@ def main(args): debug(msg) debug("# Sending message") + + try: + with open("/tmp/shuffle_end.txt", "w+") as tmp: + tmp.write("Script done pre-msg sending") + except: + pass + + send_msg(msg, webhook)