Merge pull request #665 from nighttardis/main

adding check if "from" is in the "received" header row
pull/667/head
Raphaël Vinot 2020-12-01 14:11:03 +01:00 committed by GitHub
commit 2c5f5b8662
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -217,6 +217,8 @@ class EMailObject(AbstractMISPObjectGenerator):
Extract IP addresses from received headers that are not private.
"""
for received in self.__parser.received:
if "from" not in received:
continue
tokens = received["from"].split(" ")
ip = None
for token in tokens: