From bee13b0066e33d835a2d770dda0038b595458768 Mon Sep 17 00:00:00 2001 From: Jeff Bryner Date: Wed, 2 Jul 2014 18:53:11 -0700 Subject: [PATCH] bugfix: use sane version of found IP --- mq/plugins/sshdFindIP.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mq/plugins/sshdFindIP.py b/mq/plugins/sshdFindIP.py index 75fb0b8a..532330f7 100644 --- a/mq/plugins/sshdFindIP.py +++ b/mq/plugins/sshdFindIP.py @@ -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) \ No newline at end of file