mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #5683 from markmckinnon/6020-Viber-Parser-produces-an-IllegalArgumentException-from-CommHelper
6020 viber parser produces an illegal argument exception from comm helper
This commit is contained in:
commit
c78c38e870
@ -117,13 +117,25 @@ 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 (not(not contacts_parser.get_phone() or contacts_parser.get_phone().isspace())):
|
||||||
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()
|
||||||
|
)
|
||||||
|
# Check if contact_name is blank and if it is not create a TSK_CONTACT otherwise ignore as not Contact Info
|
||||||
|
elif (not(not contacts_parser.get_contact_name() or contacts_parser.get_contact_name().isspace())):
|
||||||
|
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)
|
||||||
|
|
||||||
|
# Post the artifact to blackboard
|
||||||
|
current_case.getBlackboard().postArtifact(artifact, self._PARSER_NAME)
|
||||||
|
|
||||||
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)
|
||||||
@ -268,8 +280,8 @@ class ViberContactsParser(TskContactsParser):
|
|||||||
def __init__(self, contact_db):
|
def __init__(self, contact_db):
|
||||||
super(ViberContactsParser, self).__init__(contact_db.runQuery(
|
super(ViberContactsParser, self).__init__(contact_db.runQuery(
|
||||||
"""
|
"""
|
||||||
SELECT C.display_name AS name,
|
SELECT C.display_name AS name,
|
||||||
D.data2 AS number
|
coalesce(D.data2, D.data1, D.data3) AS number
|
||||||
FROM phonebookcontact AS C
|
FROM phonebookcontact AS C
|
||||||
JOIN phonebookdata AS D
|
JOIN phonebookdata AS D
|
||||||
ON C._id = D.contact_id
|
ON C._id = D.contact_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user