Skip to content

Commit

Permalink
Merge pull request #1298 from Labuiga/master
Browse files Browse the repository at this point in the history
add proxies to phishtank_checkurl.py
  • Loading branch information
nusantara-self authored Dec 13, 2024
2 parents 7779c75 + 7b664cc commit 87edcb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions analyzers/PhishTank/phishtank_checkurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ class PhishtankAnalyzer(Analyzer):

def __init__(self):
Analyzer.__init__(self)
self.phishtank_key = self.get_param('config.key', None,
'Missing PhishTank API key')
self.phishtank_key = self.get_param('config.key', None, 'Missing PhishTank API key')
self.proxies = {'http': self.get_param('config.proxy_http', None),
'https': self.get_param('config.proxy_https', None)}

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, headers=postheaders, data=postdata)
r = requests.post(url, headers=postheaders, data=postdata, proxies=self.proxies)
return r.json()

def summary(self, raw):
Expand Down

0 comments on commit 87edcb4

Please sign in to comment.