mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-11 23:46:15 +00:00
Merge pull request #5274 from dannysmyda/5588-add-id-attribute
5588 add id attribute to contacts in message parsers
This commit is contained in:
commit
3154189cfc
@ -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
|
||||
|
@ -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):
|
||||
"""
|
||||
|
@ -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):
|
||||
"""
|
||||
|
@ -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")
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user