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/700/head
parent
d0a050263e
commit
694c4b72ee
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue