Skip to content

Commit

Permalink
Merge pull request #1271 from emalderson/fix_PhishTank
Browse files Browse the repository at this point in the history
PhishTank fix: add User-Agent header to make phishtank api work again
  • Loading branch information
nusantara-self authored Sep 18, 2024
2 parents ee1e423 + 7e87c60 commit 89a9f65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion analyzers/PhishTank/phishtank_checkurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 89a9f65

Please sign in to comment.