mirror of https://github.com/MISP/PyMISP
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.pull/749/head
parent
e183dbc577
commit
25e44e7d8d
|
@ -22,6 +22,9 @@ headers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
responseSiem = requests.request("GET", urlSiem, headers=headers, params=queryString)
|
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)
|
jsonDataSiem = json.loads(responseSiem.text)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue