зеркало из https://github.com/mozilla/MozDef.git
bugfix: use sane version of found IP
This commit is contained in:
Родитель
5128e29ac8
Коммит
bee13b0066
|
@ -40,8 +40,9 @@ class message(object):
|
|||
if 'summary' in message.keys():
|
||||
if 'details' in message.keys() and isinstance(message['details'], dict):
|
||||
if 'sourceipaddress' not in message['details'].keys():
|
||||
for w in message['summary'].strip().split():
|
||||
if isIP(w):
|
||||
message['details']['sourceipaddress'] = w
|
||||
for word in message['summary'].strip().split():
|
||||
saneword = word.strip().strip('"').strip("'")
|
||||
if isIP(saneword):
|
||||
message['details']['sourceipaddress'] = saneword
|
||||
|
||||
return (message, metadata)
|
Загрузка…
Ссылка в новой задаче