Skip to content

Commit

Permalink
add proxies to phistank_checkurl.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Labuiga committed Dec 4, 2024
1 parent 6a0c1ff commit 7b664cc
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 7b664cc

Please sign in to comment.