#66 add summary() and new short report in Abuse Finder

This commit is contained in:
Jerome Leonard 2017-06-28 18:00:24 +02:00
parent c80af57f0a
commit b24c05001a
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "Abuse_Finder",
"version": "1.0",
"version": "2.0",
"author": "CERT-BDF",
"url": "https://github.com/CERT-BDF/Cortex-Analyzers",
"license": "AGPL-V3",

View File

@ -14,6 +14,14 @@ logging.getLogger("tldextract").setLevel(logging.CRITICAL)
class AbuseFinderAnalyzer(Analyzer):
def summary(self, raw):
taxonomies = []
if raw['abuse_finder'] and raw['abuse_finder'].get('abuse'):
for abuse in raw['abuse_finder']['abuse']:
taxonomies.append(self.build_taxonomy("info", "Abuse_Finder", "Address", abuse))
return {"taxonomies": taxonomies}
def abuse(self):
if self.data_type == "ip":
return ip_abuse(self.getData())