Closed ilyaglow closed 6 years ago
Hi @ilyaglow. That's a good catch. @ecapuano were you aware that PhishTank changed their API URL to HTTPS instead of HTTP while not indicating so in https://www.phishtank.com/api_info.php?
@ilyaglow can you rebase your PR on develop instead of master please? Also, the summary()
function is not working because of a var eval error (boolean instead of a string):
--- phishtank_checkurl.py.orig 2017-11-01 20:28:39.220451912 +0100
+++ phishtank_checkurl.py 2017-11-01 21:05:17.922238589 +0100
@@ -19,7 +19,7 @@
'Missing PhishTank API key')
def phishtank_checkurl(self, data):
- url = 'http://checkurl.phishtank.com/checkurl/'
+ url = 'https://checkurl.phishtank.com/checkurl/'
postdata = {'url': data, 'format':'json','app_key': self.phishtank_key}
r = requests.post(url, data=postdata)
return json.loads(r.content)
@@ -29,7 +29,7 @@
value = "\"False\""
level = ""
- if 'in_database' in raw and raw['in_database'] == "True":
+ if 'in_database' in raw and raw['in_database'] == True:
value = "\"{}\"".format(raw['in_database'])
if raw.get('verified'):
You can add that change to your PR or I'll do it. Thanks.
Hey @saadkadhi. Sure, hope you don't mind that I sent a new PR.
Gotta love undocumented API changes! Nice catch @ilyaglow
Closed by PR #128
Request Type
Bug
Work Environment
Description
PhishTank analyzer fails because
http://checkurl.phishtank.com
is redirected to main website. Also it seems that summary function call fails too.Steps to Reproduce
Possible Solutions
HTTP scheme should be replaced with HTTPS.
It looks like
summary()
call is unnecessary now, so it may be removed from the main function.