forked from log2timeline/plaso
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code review: 263060043: Refactored filters log2timeline#154
- Loading branch information
1 parent
b9349f5
commit e80d876
Showing
33 changed files
with
1,000 additions
and
742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ python-plaso (1.3.1-1) unstable; urgency=low | |
|
||
* Auto-generated | ||
|
||
-- Log2Timeline <[email protected]> Sat, 05 Sep 2015 19:14:12 +0200 | ||
-- Log2Timeline <[email protected]> Sat, 05 Sep 2015 19:18:41 +0200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
import logging | ||
"""This file contains an import statement for each filter.""" | ||
|
||
from plaso.filters import dynamic_filter | ||
from plaso.filters import eventfilter | ||
from plaso.filters import filterlist | ||
|
||
from plaso.lib import filter_interface | ||
from plaso.lib import errors | ||
|
||
|
||
def ListFilters(): | ||
"""Generate a list of all available filters.""" | ||
filters = [] | ||
for cl in filter_interface.FilterObject.classes: | ||
filters.append(filter_interface.FilterObject.classes[cl]()) | ||
|
||
return filters | ||
|
||
|
||
def GetFilter(filter_string): | ||
"""Returns the first filter that matches the filter string. | ||
Args: | ||
filter_string: A filter string for any of the available filters. | ||
Returns: | ||
The first FilterObject found matching the filter string. If no FilterObject | ||
is available for this filter string None is returned. | ||
""" | ||
if not filter_string: | ||
return | ||
|
||
for filter_obj in ListFilters(): | ||
try: | ||
filter_obj.CompileFilter(filter_string) | ||
return filter_obj | ||
except errors.WrongPlugin: | ||
logging.debug(u'Filterstring [{}] is not a filter: {}'.format( | ||
filter_string, filter_obj.filter_name)) | ||
from plaso.filters import event_filter | ||
from plaso.filters import filter_list |
Oops, something went wrong.