bugfix: use sane version of found IP

This commit is contained in:
Jeff Bryner 2014-07-02 18:53:11 -07:00
Родитель 5128e29ac8
Коммит bee13b0066
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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)