mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-06 17:15:21 +00:00
PhishTank: fix TypeError: the JSON object must be str, not 'bytes'
Use the requests built-in json method instead of json.loads.
This commit is contained in:
parent
a019d43143
commit
7a4db640b1
@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# encoding: utf-8
|
||||
import json
|
||||
import requests
|
||||
from cortexutils.analyzer import Analyzer
|
||||
|
||||
@ -16,7 +15,7 @@ class PhishtankAnalyzer(Analyzer):
|
||||
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)
|
||||
return r.json()
|
||||
|
||||
def summary(self, raw):
|
||||
taxonomies = []
|
||||
|
Loading…
Reference in New Issue
Block a user