зеркало из https://github.com/mozilla/MozDef.git
Even more cleanups
This commit is contained in:
Родитель
ccc7aae3c8
Коммит
fa67e3d5d7
|
@ -11,7 +11,6 @@ import os
|
|||
import re
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), "../../lib"))
|
||||
from utilities.toUTC import toUTC
|
||||
import pdb
|
||||
|
||||
|
||||
class message(object):
|
||||
|
|
|
@ -33,11 +33,11 @@ class message(object):
|
|||
if message['details']['program'] == 'su':
|
||||
msg_unparsed = message['summary']
|
||||
if msg_unparsed.startswith('pam_unix'):
|
||||
accepted_search = re.search(self.session_regexp, msg_unparsed)
|
||||
if accepted_search:
|
||||
message['details']['originuser'] = accepted_search.group('originuser')
|
||||
message['details']['status'] = accepted_search.group('status')
|
||||
message['details']['uid'] = accepted_search.group('uid')
|
||||
message['details']['username'] = accepted_search.group('username')
|
||||
session_search = re.search(self.session_regexp, msg_unparsed)
|
||||
if session_search:
|
||||
message['details']['originuser'] = session_search.group('originuser')
|
||||
message['details']['status'] = session_search.group('status')
|
||||
message['details']['uid'] = session_search.group('uid')
|
||||
message['details']['username'] = session_search.group('username')
|
||||
|
||||
return (message, metadata)
|
||||
|
|
|
@ -30,10 +30,6 @@ session_su['details']['program'] = 'su'
|
|||
session_su['details']['hostname'] = 'irc1.dmz.scl3.mozilla.com'
|
||||
|
||||
|
||||
# msgs.append(u'')
|
||||
# msgs.append(u'')
|
||||
# msgs.append(u'')
|
||||
#
|
||||
class TestSuSessionOpenedMessageV1():
|
||||
def setup(self):
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче