mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-07 17:38:53 +00:00
use ignoreolderthandays everywhere instead of ignoredays, for understanding
This commit is contained in:
parent
fa77206bd7
commit
3876bfb84b
@ -21,7 +21,7 @@ class FireholBlocklistsAnalyzer(Analyzer):
|
||||
|
||||
# Get config parameters
|
||||
self.path = self.getParam('config.blocklistpath', '/tmp/fireholblocklists')
|
||||
self.ignoredays = self.getParam('config.ignoredays', 365)
|
||||
self.ignoreolderthandays = self.getParam('config.ignoreolderthandays', 365)
|
||||
self.utc = pytz.UTC
|
||||
self.now = dt.datetime.now(tz=self.utc)
|
||||
|
||||
@ -73,7 +73,7 @@ class FireholBlocklistsAnalyzer(Analyzer):
|
||||
datestr = re.sub('# Source File Date: ', '', l.rstrip('\n'))
|
||||
date = parse(datestr)
|
||||
file_date[ipsetname] = str(date)
|
||||
if (self.now - date).days > self.ignoredays:
|
||||
if (self.now - date).days > self.ignoreolderthandays:
|
||||
break
|
||||
description[ipsetname] += re.sub(r'^\[.*\] \(.*\) [a-zA-Z0-9.\- ]*$', '', l.lstrip('# '))\
|
||||
.replace('\n\n', '\n')
|
||||
@ -96,7 +96,7 @@ class FireholBlocklistsAnalyzer(Analyzer):
|
||||
datestr = re.sub('# Source File Date: ', '', l.rstrip('\n'))
|
||||
date = parse(datestr)
|
||||
file_date[ipsetname] = str(date)
|
||||
if (self.now - date).days > self.ignoredays:
|
||||
if (self.now - date).days > self.ignoreolderthandays:
|
||||
break
|
||||
description[netsetname] += re.sub(r'^\[.*\] \(.*\) [a-zA-Z0-9.\- ]*$', '', l.lstrip('# '))\
|
||||
.replace('\n\n', '\n')
|
||||
|
Loading…
Reference in New Issue
Block a user