Skip to content

Commit

Permalink
Migrated MacOS keychain construct-based plugin to use dtfabric log2ti…
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Aug 23, 2018
1 parent 8b8965d commit b500b79
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plaso/parsers/mac_keychain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
# indicates which specific tool, or all, is able to use this entry.


import binascii
import codecs
import collections
import os

from dfdatetime import time_elements as dfdatetime_time_elements

Expand Down Expand Up @@ -71,6 +69,7 @@ class KeychainApplicationRecordEventData(events.EventData):
account_name (str): name of the account.
comments (str): comments added by the user.
entry_name (str): name of the entry.
ssgp_hash (str): password / cert hash formatted as an hexadecimal string.
text_description (str): description.
"""

Expand All @@ -83,6 +82,7 @@ def __init__(self):
self.account_name = None
self.comments = None
self.entry_name = None
self.ssgp_hash = None
self.text_description = None


Expand Down Expand Up @@ -547,7 +547,7 @@ def _ReadRecordSchemaIndexes(self, tables, file_object, record_offset):
Raises:
ParseError: if the record cannot be read.
"""
record_header = self._ReadRecordHeader(file_object, record_offset)
_ = self._ReadRecordHeader(file_object, record_offset)

attribute_value_offsets = self._ReadRecordAttributeValueOffset(
file_object, record_offset + 24, 5)
Expand Down Expand Up @@ -591,7 +591,7 @@ def _ReadRecordSchemaInformation(self, tables, file_object, record_offset):
Raises:
ParseError: if the record cannot be read.
"""
record_header = self._ReadRecordHeader(file_object, record_offset)
_ = self._ReadRecordHeader(file_object, record_offset)

attribute_value_offsets = self._ReadRecordAttributeValueOffset(
file_object, record_offset + 24, 2)
Expand Down Expand Up @@ -739,7 +739,7 @@ def _ParseDateTimeValue(self, parser_mediator, date_time_value):
try:
return dfdatetime_time_elements.TimeElements(
time_elements_tuple=time_elements_tuple)
except ValueError as exception:
except ValueError:
parser_mediator.ProduceExtractionError(
'invalid date and time value: {0!s}'.format(date_time_value))
return None
Expand Down Expand Up @@ -880,7 +880,7 @@ def ParseFileObject(self, parser_mediator, file_object, **kwargs):
"""
try:
file_header = self._ReadFileHeader(file_object)
except (ValueError, errors.ParseError) as exception:
except (ValueError, errors.ParseError):
raise errors.UnableToParseFile('Unable to parse file header.')

tables = self._ReadTablesArray(file_object, file_header.tables_array_offset)
Expand Down

0 comments on commit b500b79

Please sign in to comment.