adding check if "from" is in the "received" header row

pull/665/head
nighttardis 2020-11-30 18:45:53 -06:00
parent bbc68f4f2d
commit 2a4b215026
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. Extract IP addresses from received headers that are not private.
""" """
for received in self.__parser.received: for received in self.__parser.received:
if "from" not in received:
continue
tokens = received["from"].split(" ") tokens = received["from"].split(" ")
ip = None ip = None
for token in tokens: for token in tokens: