Verify SSL Certificates for Requests.

This commit is contained in:
pixeebot[bot] 2024-05-02 03:43:55 +00:00 committed by GitHub
parent 3ff9520114
commit a2621fc05b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,7 +39,7 @@ def watch_iocs():
iocs_list = [] iocs_list = []
to_delete = [] to_delete = []
try: try:
res = requests.get(w["url"], verify=False) res = requests.get(w["url"], verify=True)
if res.status_code == 200: if res.status_code == 200:
content = json.loads(res.content) content = json.loads(res.content)
iocs_list = content["iocs"] if "iocs" in content else [] iocs_list = content["iocs"] if "iocs" in content else []
@ -88,7 +88,7 @@ def watch_whitelists():
elements = [] elements = []
to_delete = [] to_delete = []
try: try:
res = requests.get(w["url"], verify=False) res = requests.get(w["url"], verify=True)
if res.status_code == 200: if res.status_code == 200:
content = json.loads(res.content) content = json.loads(res.content)
elements = content["elements"] if "elements" in content else [] elements = content["elements"] if "elements" in content else []