mirror of https://github.com/MISP/PyMISP
Merge pull request #665 from nighttardis/main
adding check if "from" is in the "received" header rowpull/667/head
commit
2c5f5b8662
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue