From 694c4b72eecd7d3cbf923bd1e274edd1b9a95119 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 17 Feb 2021 12:07:11 -0500 Subject: [PATCH] Added check for invalid creds Without the added check, the script will error out on line 29 since the key doesn't exist in the dict. This at least gives a reason. --- examples/proofpoint_tap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/proofpoint_tap.py b/examples/proofpoint_tap.py index 561191e..b5a0fce 100644 --- a/examples/proofpoint_tap.py +++ b/examples/proofpoint_tap.py @@ -22,6 +22,9 @@ headers = { } responseSiem = requests.request("GET", urlSiem, headers=headers, params=queryString) +if 'Credentials authentication failed' in str(responseSiem.text): + print("Credentials invalid, please edit keys.py and try again") + quit() jsonDataSiem = json.loads(responseSiem.text)