From 7e87c60178718d4c4b44432ee48b78bbac74e3d2 Mon Sep 17 00:00:00 2001 From: emalderson Date: Mon, 29 Jul 2024 01:57:48 +0200 Subject: [PATCH] fix: add User-Agent header to make phishtank api work again --- analyzers/PhishTank/phishtank_checkurl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analyzers/PhishTank/phishtank_checkurl.py b/analyzers/PhishTank/phishtank_checkurl.py index 63946408b..bf1d2f37f 100755 --- a/analyzers/PhishTank/phishtank_checkurl.py +++ b/analyzers/PhishTank/phishtank_checkurl.py @@ -13,8 +13,9 @@ def __init__(self): def phishtank_checkurl(self, data): url = 'https://checkurl.phishtank.com/checkurl/' + postheaders = {"User-Agent": "phishtank/cortex"} postdata = {'url': data, 'format': 'json', 'app_key': self.phishtank_key} - r = requests.post(url, data=postdata) + r = requests.post(url, headers=postheaders, data=postdata) return r.json() def summary(self, raw):