LEFT | RIGHT |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """The extraction front-end.""" | 2 """The extraction front-end.""" |
3 | 3 |
4 import logging | 4 import logging |
5 import os | 5 import os |
6 | 6 |
7 from dfvfs.lib import definitions as dfvfs_definitions | 7 from dfvfs.lib import definitions as dfvfs_definitions |
8 from dfvfs.resolver import context | 8 from dfvfs.resolver import context |
9 | 9 |
10 from plaso import parsers # pylint: disable=unused-import | 10 from plaso import parsers # pylint: disable=unused-import |
(...skipping 19 matching lines...) Expand all Loading... |
30 _SOURCE_TYPES_TO_PREPROCESS = frozenset([ | 30 _SOURCE_TYPES_TO_PREPROCESS = frozenset([ |
31 dfvfs_definitions.SOURCE_TYPE_DIRECTORY, | 31 dfvfs_definitions.SOURCE_TYPE_DIRECTORY, |
32 dfvfs_definitions.SOURCE_TYPE_STORAGE_MEDIA_DEVICE, | 32 dfvfs_definitions.SOURCE_TYPE_STORAGE_MEDIA_DEVICE, |
33 dfvfs_definitions.SOURCE_TYPE_STORAGE_MEDIA_IMAGE]) | 33 dfvfs_definitions.SOURCE_TYPE_STORAGE_MEDIA_IMAGE]) |
34 | 34 |
35 def __init__(self): | 35 def __init__(self): |
36 """Initializes the front-end object.""" | 36 """Initializes the front-end object.""" |
37 super(ExtractionFrontend, self).__init__() | 37 super(ExtractionFrontend, self).__init__() |
38 self._collection_process = None | 38 self._collection_process = None |
39 self._debug_mode = False | 39 self._debug_mode = False |
40 self._enable_profiling = False | |
41 # TODO: remove after testing. | 40 # TODO: remove after testing. |
42 self._experimental = False | 41 self._experimental = False |
43 self._filter_expression = None | 42 self._filter_expression = None |
44 self._filter_object = None | 43 self._filter_object = None |
45 self._mount_path = None | 44 self._mount_path = None |
46 self._profiling_directory = None | 45 self._profiling_directory = None |
47 self._profiling_sample_rate = self._DEFAULT_PROFILING_SAMPLE_RATE | 46 self._profiling_sample_rate = self._DEFAULT_PROFILING_SAMPLE_RATE |
48 self._profiling_type = u'all' | 47 self._profiling_type = u'all' |
49 self._use_zeromq = True | 48 self._use_zeromq = True |
50 self._resolver_context = context.Context() | 49 self._resolver_context = context.Context() |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 Returns: | 215 Returns: |
217 StorageWriter: storage writer. | 216 StorageWriter: storage writer. |
218 """ | 217 """ |
219 self._CheckStorageFile(storage_file_path) | 218 self._CheckStorageFile(storage_file_path) |
220 | 219 |
221 if self._experimental: | 220 if self._experimental: |
222 return storage_sqlite_file.SQLiteStorageFileWriter( | 221 return storage_sqlite_file.SQLiteStorageFileWriter( |
223 session, storage_file_path) | 222 session, storage_file_path) |
224 | 223 |
225 return storage_zip_file.ZIPStorageFileWriter(session, storage_file_path) | 224 return storage_zip_file.ZIPStorageFileWriter(session, storage_file_path) |
226 | |
227 def DisableProfiling(self): | |
228 """Disabled profiling.""" | |
229 self._enable_profiling = False | |
230 | 225 |
231 def GetHashersInformation(self): | 226 def GetHashersInformation(self): |
232 """Retrieves the hashers information. | 227 """Retrieves the hashers information. |
233 | 228 |
234 Returns: | 229 Returns: |
235 list[tuple]: contains: | 230 list[tuple]: contains: |
236 | 231 |
237 str: hasher name | 232 str: hasher name |
238 str: hahser description | 233 str: hahser description |
239 """ | 234 """ |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 | 394 |
400 return processing_status | 395 return processing_status |
401 | 396 |
402 def SetUseZeroMQ(self, use_zeromq=True): | 397 def SetUseZeroMQ(self, use_zeromq=True): |
403 """Sets whether the frontend is using ZeroMQ for queueing or not. | 398 """Sets whether the frontend is using ZeroMQ for queueing or not. |
404 | 399 |
405 Args: | 400 Args: |
406 use_zeromq (Optional[bool]): True if ZeroMQ should be used for queuing. | 401 use_zeromq (Optional[bool]): True if ZeroMQ should be used for queuing. |
407 """ | 402 """ |
408 self._use_zeromq = use_zeromq | 403 self._use_zeromq = use_zeromq |
LEFT | RIGHT |