mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
IDPS: simplify download parser a bit further as suggested by @Tra5is (38ea28d0ad)
This commit is contained in:
parent
38ea28d0ad
commit
2d052a9bde
@ -67,9 +67,9 @@ class Downloader(object):
|
||||
flowbits_noalert = line.replace(' ', '').find('flowbits:noalert;') > -1
|
||||
if flowbits_noalert:
|
||||
pass
|
||||
elif re.match("(\s?)*alert", line):
|
||||
elif re.match("^\s*alert", line):
|
||||
line = "drop %s" % line[line.find('alert')+5:]
|
||||
elif re.match("#(\s?)*alert", line):
|
||||
elif re.match("^#\s*alert", line):
|
||||
line = '#drop %s' % line[line.find('alert')+5:]
|
||||
output.append(line)
|
||||
return '\n'.join(output)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user