зеркало из https://github.com/mozilla/MozDef.git
Update slapd importer with local timezone
Signed-off-by: Brandon Myers <bmyers@mozilla.com>
This commit is contained in:
Родитель
1ae54e25f6
Коммит
d206fa157c
|
@ -11,6 +11,7 @@ from time import sleep
|
||||||
import requests
|
import requests
|
||||||
import dateutil.parser
|
import dateutil.parser
|
||||||
import datetime
|
import datetime
|
||||||
|
from dateutil.tz import tzlocal
|
||||||
import json
|
import json
|
||||||
from requests_futures.sessions import FuturesSession
|
from requests_futures.sessions import FuturesSession
|
||||||
|
|
||||||
|
@ -190,7 +191,7 @@ def searchforBind(line,bindDetails):
|
||||||
for bindConn in bindConnre.findall(line):
|
for bindConn in bindConnre.findall(line):
|
||||||
if '{0}:{1}:{2}'.format(bindConn[0],bindConn[1],bindConn[2]) not in bindDetails.keys():
|
if '{0}:{1}:{2}'.format(bindConn[0],bindConn[1],bindConn[2]) not in bindDetails.keys():
|
||||||
#a new bind transaction we've not seen with default values
|
#a new bind transaction we've not seen with default values
|
||||||
bindDetails['{0}:{1}:{2}'.format(bindConn[0],bindConn[1],bindConn[2])]=dict(conn=bindConn[0],op=bindConn[1],dn=bindConn[2],errCode=None,result='unknown',ipAddress='0.0.0.0',eventtime=dateutil.parser.parse(line[:20],fuzzy=True).isoformat())
|
bindDetails['{0}:{1}:{2}'.format(bindConn[0],bindConn[1],bindConn[2])]=dict(conn=bindConn[0],op=bindConn[1],dn=bindConn[2],errCode=None,result='unknown',ipAddress='0.0.0.0',eventtime=dateutil.parser.parse(line[:20],fuzzy=True,tzinfos=tzlocal).isoformat())
|
||||||
|
|
||||||
def searchforBindResult(line,bindDetails,linecache):
|
def searchforBindResult(line,bindDetails,linecache):
|
||||||
'''match outstanding binds without results to any new RESULT lines'''
|
'''match outstanding binds without results to any new RESULT lines'''
|
||||||
|
|
Загрузка…
Ссылка в новой задаче