Merge branch 'release-4.13.0' of https://github.com/sleuthkit/autopsy into 5566_comment_modules

This commit is contained in:
Raman Arora
2019-09-27 08:35:19 -04:00
44 changed files with 273 additions and 1648 deletions
@@ -29,12 +29,10 @@ class TskContactsParser(ResultSetIterator):
def __init__(self, result_set):
super(TskContactsParser, self).__init__(result_set)
self._DEFAULT_VALUE = ""
self._DEFAULT_ACCOUNT_ADDRESS = None
def get_account_name(self):
return self._DEFAULT_VALUE
def get_contact_name(self):
return self._DEFAULT_VALUE
def get_account_address(self):
return self._DEFAULT_ACCOUNT_ADDRESS
def get_phone(self):
return self._DEFAULT_VALUE
+12 -4
View File
@@ -91,15 +91,23 @@ class FBMessengerAnalyzer(general.AndroidComponentAnalyzer):
self._MODULE_NAME, contactsDb.getDBFile(),
Account.Type.FACEBOOK)
contactsResultSet = contactsDb.runQuery("SELECT fbid, display_name FROM contacts WHERE added_time_ms <> " + self.selfAccountAddress.getUniqueID() )
contactsResultSet = contactsDb.runQuery("SELECT fbid, display_name, added_time_ms FROM contacts WHERE added_time_ms <> 0")
if contactsResultSet is not None:
while contactsResultSet.next():
contactsDBHelper.addContact( contactsResultSet.getString("fbid"), ## unique id for account
contactsResultSet.getString("display_name"), ## contact name
fbid = contactsResultSet.getString("fbid")
contactAddress = Account.Address(contactsResultSet.getString("fbid"), contactsResultSet.getString("display_name"))
dateCreated = contactsResultSet.getLong("added_time_ms") / 1000
## create additional attributes for contact.
additionalAttributes = ArrayList();
additionalAttributes.add(BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED, self._MODULE_NAME, dateCreated))
contactsDBHelper.addContact( contactAddress, ## contact account
"", ## phone
"", ## home phone
"", ## mobile
"") ## email
"", ## email
additionalAttributes)
except SQLException as ex:
self._logger.log(Level.WARNING, "Error processing query result for account", ex)
+1 -1
View File
@@ -34,6 +34,6 @@ def appendAttachmentList(msgBody, attachmentsList):
body = msgBody
if attachmentsList:
body = body + "\n\n------------Attachments------------\n"
body = body + "\n".join(attachmentsList)
body = body + "\n".join(list(filter(None, attachmentsList)))
return body
+2 -2
View File
@@ -113,8 +113,8 @@ class IMOAnalyzer(general.AndroidComponentAnalyzer):
contactsResultSet = friendsDb.runQuery("SELECT buid, name FROM friends")
if contactsResultSet is not None:
while contactsResultSet.next():
friendsDBHelper.addContact( contactsResultSet.getString("buid"), ## unique id for account
contactsResultSet.getString("name"), ## contact name
contactAddress = Account.Address(contactsResultSet.getString("buid"), contactsResultSet.getString("name"))
friendsDBHelper.addContact( contactAddress, ## contact address
"", ## phone
"", ## home phone
"", ## mobile
+4 -6
View File
@@ -142,8 +142,7 @@ class LineAnalyzer(general.AndroidComponentAnalyzer):
contacts_parser = LineContactsParser(contacts_db)
while contacts_parser.next():
helper.addContact(
contacts_parser.get_account_name(),
contacts_parser.get_contact_name(),
contacts_parser.get_account_address(),
contacts_parser.get_phone(),
contacts_parser.get_home_phone(),
contacts_parser.get_mobile_phone(),
@@ -341,11 +340,10 @@ class LineContactsParser(TskContactsParser):
"""
)
)
def get_account_name(self):
return self.result_set.getString("m_id")
def get_contact_name(self):
return self.result_set.getString("server_name")
def get_account_address(self):
return Account.Address(self.result_set.getString("m_id"),
self.result_set.getString("server_name"))
class LineMessagesParser(TskMessagesParser):
"""
+4 -7
View File
@@ -151,8 +151,7 @@ class SkypeAnalyzer(general.AndroidComponentAnalyzer):
contacts_parser = SkypeContactsParser(skype_db)
while contacts_parser.next():
helper.addContact(
contacts_parser.get_account_name(),
contacts_parser.get_contact_name(),
contacts_parser.get_account_address(),
contacts_parser.get_phone(),
contacts_parser.get_home_phone(),
contacts_parser.get_mobile_phone(),
@@ -362,11 +361,9 @@ class SkypeContactsParser(TskContactsParser):
)
)
def get_account_name(self):
return self.result_set.getString("entry_id")
def get_contact_name(self):
return self.result_set.getString("name")
def get_account_address(self):
return Account.Address(self.result_set.getString("entry_id"),
self.result_set.getString("name"))
class SkypeMessagesParser(TskMessagesParser):
"""
+5 -8
View File
@@ -108,8 +108,7 @@ class TextNowAnalyzer(general.AndroidComponentAnalyzer):
contacts_parser = TextNowContactsParser(textnow_db)
while contacts_parser.next():
helper.addContact(
contacts_parser.get_account_name(),
contacts_parser.get_contact_name(),
contacts_parser.get_account_address(),
contacts_parser.get_phone(),
contacts_parser.get_home_phone(),
contacts_parser.get_mobile_phone(),
@@ -267,12 +266,10 @@ class TextNowContactsParser(TskContactsParser):
)
)
def get_account_name(self):
return self.result_set.getString("number")
def get_contact_name(self):
return self.result_set.getString("name")
def get_account_address(self):
return Account.Address(self.result_set.getString("number"),
self.result_set.getString("name"))
def get_phone(self):
return self.result_set.getString("number")
+4 -7
View File
@@ -116,8 +116,7 @@ class ViberAnalyzer(general.AndroidComponentAnalyzer):
contacts_parser = ViberContactsParser(contacts_db)
while contacts_parser.next():
helper.addContact(
contacts_parser.get_account_name(),
contacts_parser.get_contact_name(),
contacts_parser.get_account_address(),
contacts_parser.get_phone(),
contacts_parser.get_home_phone(),
contacts_parser.get_mobile_phone(),
@@ -273,11 +272,9 @@ class ViberContactsParser(TskContactsParser):
)
)
def get_account_name(self):
return self.result_set.getString("number")
def get_contact_name(self):
return self.result_set.getString("name")
def get_account_address(self):
return Account.Address(self.result_set.getString("number"),
self.result_set.getString("name"))
def get_phone(self):
return self.result_set.getString("number")
+5 -8
View File
@@ -170,8 +170,7 @@ class WhatsAppAnalyzer(general.AndroidComponentAnalyzer):
contacts_parser = WhatsAppContactsParser(contacts_db)
while contacts_parser.next():
helper.addContact(
contacts_parser.get_account_name(),
contacts_parser.get_contact_name(),
contacts_parser.get_account_address(),
contacts_parser.get_phone(),
contacts_parser.get_home_phone(),
contacts_parser.get_mobile_phone(),
@@ -410,12 +409,10 @@ class WhatsAppContactsParser(TskContactsParser):
"""
)
)
def get_account_name(self):
return self.result_set.getString("jid")
def get_contact_name(self):
return self.result_set.getString("name")
def get_account_address(self):
return Account.Address(self.result_set.getString("jid"),
self.result_set.getString("name"))
def get_phone(self):
return self.result_set.getString("number")