Skip to content

Commit

Permalink
#793 remove duplicates of reported observables
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Oct 14, 2020
1 parent 777fc06 commit 65c00ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions analyzers/EmlParser/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ def summary(self, raw):

def artifacts(self, raw):
artifacts = []
urls = list(iocextract.extract_urls(str(raw)))
ipv4s = list(iocextract.extract_ipv4s(str(raw)))
mail_addresses = list(iocextract.extract_emails(str(raw)))
hashes = list(iocextract.extract_hashes(str(raw)))
# report a list of uniq IOCs
urls = list(set(list(iocextract.extract_urls(str(raw), strip=True))))
ipv4s = list(set(list(iocextract.extract_ipv4s(str(raw)))))
mail_addresses = list(set(list(iocextract.extract_emails(str(raw)))))
hashes = list(set(list(iocextract.extract_hashes(str(raw)))))

if urls:
for u in urls:
Expand Down

0 comments on commit 65c00ac

Please sign in to comment.