Skip to content

Commit

Permalink
#181 improve maliciousness evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Feb 9, 2018
1 parent 28ad170 commit a77bdb8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions analyzers/PhishTank/phishtank_checkurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ def summary(self, raw):

if 'in_database' in raw and raw['in_database'] == True:
value = "\"{}\"".format(raw['in_database'])
if raw.get('verified'):
if raw.get('verified') and raw.get('valid'):
level = "malicious"
elif ( raw.get('verified') and raw.get('valid') == False):
level = "safe"
else:
level = "suspicious"
else:
level = "safe"
level = "unknown"
value = "\"False\""

taxonomies.append(self.build_taxonomy(level, "PhishTank", "In_Database", value))
Expand All @@ -56,7 +58,8 @@ def run(self):
'in_database': r['results']['in_database'],
'phish_detail_page': r['results']['phish_detail_page'],
'verified': r['results']['verified'],
'verified_at': r['results']['verified_at']
'verified_at': r['results']['verified_at'],
'valid':r['results']['valid']
})
else:
self.report({
Expand Down

0 comments on commit a77bdb8

Please sign in to comment.