OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """Parser for Windows Shortcut (LNK) files.""" | 2 """Parser for Windows Shortcut (LNK) files.""" |
3 | 3 |
4 import uuid | 4 import uuid |
5 | 5 |
6 import pylnk | 6 import pylnk |
7 | 7 |
8 from dfdatetime import filetime as dfdatetime_filetime | 8 from dfdatetime import filetime as dfdatetime_filetime |
9 from dfdatetime import semantic_time as dfdatetime_semantic_time | 9 from dfdatetime import semantic_time as dfdatetime_semantic_time |
10 from dfdatetime import uuid_time as dfdatetime_uuid_time | 10 from dfdatetime import uuid_time as dfdatetime_uuid_time |
11 | 11 |
12 from plaso import dependencies | |
13 from plaso.containers import time_events | 12 from plaso.containers import time_events |
14 from plaso.containers import windows_events | 13 from plaso.containers import windows_events |
15 from plaso.lib import eventdata | 14 from plaso.lib import eventdata |
16 from plaso.lib import specification | 15 from plaso.lib import specification |
17 from plaso.parsers import interface | 16 from plaso.parsers import interface |
18 from plaso.parsers import manager | 17 from plaso.parsers import manager |
19 from plaso.parsers.shared import shell_items | 18 from plaso.parsers.shared import shell_items |
20 | 19 |
21 | 20 |
22 dependencies.CheckModuleVersion(u'pylnk') | |
23 | |
24 | |
25 class WinLnkLinkEvent(time_events.DateTimeValuesEvent): | 21 class WinLnkLinkEvent(time_events.DateTimeValuesEvent): |
26 """Convenience class for a Windows Shortcut (LNK) link event. | 22 """Convenience class for a Windows Shortcut (LNK) link event. |
27 | 23 |
28 Attributes: | 24 Attributes: |
29 birth_droid_file_identifier (str): distributed link tracking brith droid | 25 birth_droid_file_identifier (str): distributed link tracking brith droid |
30 file identifier. | 26 file identifier. |
31 birth_droid_volume_identifier (str): distributed link tracking brith droid | 27 birth_droid_volume_identifier (str): distributed link tracking brith droid |
32 volume identifier. | 28 volume identifier. |
33 command_line_arguments (str): command line arguments. | 29 command_line_arguments (str): command line arguments. |
34 description (str): description of the linked item. | 30 description (str): description of the linked item. |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 parser_mediator, lnk_file.birth_droid_file_identifier, display_name) | 205 parser_mediator, lnk_file.birth_droid_file_identifier, display_name) |
210 except (TypeError, ValueError) as exception: | 206 except (TypeError, ValueError) as exception: |
211 parser_mediator.ProduceExtractionError(( | 207 parser_mediator.ProduceExtractionError(( |
212 u'unable to read birth droid file identifier with error: ' | 208 u'unable to read birth droid file identifier with error: ' |
213 u'{0:s}.').format(exception)) | 209 u'{0:s}.').format(exception)) |
214 | 210 |
215 lnk_file.close() | 211 lnk_file.close() |
216 | 212 |
217 | 213 |
218 manager.ParsersManager.RegisterParser(WinLnkParser) | 214 manager.ParsersManager.RegisterParser(WinLnkParser) |
OLD | NEW |