From 042bf2bb2f8c90393d61f9e8fbaf777676a16366 Mon Sep 17 00:00:00 2001 From: Hannah Ward Date: Wed, 17 Aug 2016 09:30:15 +0100 Subject: [PATCH] Added virustotal module --- misp_modules/modules/expansion/virustotal.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misp_modules/modules/expansion/virustotal.py b/misp_modules/modules/expansion/virustotal.py index 474b604..930872e 100755 --- a/misp_modules/modules/expansion/virustotal.py +++ b/misp_modules/modules/expansion/virustotal.py @@ -35,8 +35,11 @@ def handler(q=False): if "domain" in q: r["results"] += getDomain(q["domain"], key) - with open("/home/hward/debug.txt", "w") as f: - f.write(json.dumps(r)) + uniq = [] + for res in r["results"]: + if res not in uniq: + uniq.append(res) + r["results"] = uniq return r def getIP(ip, key, do_not_recurse = False):