mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Update viber.py
If contact does not have an email or phone number then create a TSK_Contact artifact outside of comms helper so we do not loose the contact.
This commit is contained in:
parent
bd5f846d24
commit
64d73e0434
@ -117,13 +117,28 @@ class ViberAnalyzer(general.AndroidComponentAnalyzer):
|
|||||||
try:
|
try:
|
||||||
contacts_parser = ViberContactsParser(contacts_db)
|
contacts_parser = ViberContactsParser(contacts_db)
|
||||||
while contacts_parser.next():
|
while contacts_parser.next():
|
||||||
helper.addContact(
|
if contacts_parser.get_phone() is not None:
|
||||||
contacts_parser.get_contact_name(),
|
helper.addContact(
|
||||||
contacts_parser.get_phone(),
|
contacts_parser.get_contact_name(),
|
||||||
contacts_parser.get_home_phone(),
|
contacts_parser.get_phone(),
|
||||||
contacts_parser.get_mobile_phone(),
|
contacts_parser.get_home_phone(),
|
||||||
contacts_parser.get_email()
|
contacts_parser.get_mobile_phone(),
|
||||||
)
|
contacts_parser.get_email()
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
current_case = Case.getCurrentCase().getSleuthkitCase()
|
||||||
|
attributes = ArrayList()
|
||||||
|
artifact = contacts_db.getDBFile().newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT)
|
||||||
|
attributes.add(BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), self._PARSER_NAME, contacts_parser.get_contact_name()))
|
||||||
|
artifact.addAttributes(attributes)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Post the artifact to blackboard
|
||||||
|
current_case.getBlackboard().postArtifact(artifact, self._PARSER_NAME)
|
||||||
|
except Blackboard.BlackboardException as e:
|
||||||
|
self.log(Level.WARNING, "Error adding viber contacts artifact to case database.", ex )
|
||||||
|
self._logger.log(Level.WARNING, traceback.format_exc())
|
||||||
|
|
||||||
contacts_parser.close()
|
contacts_parser.close()
|
||||||
except SQLException as ex:
|
except SQLException as ex:
|
||||||
self._logger.log(Level.WARNING, "Error querying the viber database for contacts.", ex)
|
self._logger.log(Level.WARNING, "Error querying the viber database for contacts.", ex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user