diff --git a/InternalPythonModules/android/TskContactsParser.py b/InternalPythonModules/android/TskContactsParser.py index 122e6a9445..4e03613bcd 100644 --- a/InternalPythonModules/android/TskContactsParser.py +++ b/InternalPythonModules/android/TskContactsParser.py @@ -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 diff --git a/InternalPythonModules/android/line.py b/InternalPythonModules/android/line.py index b8655b46e8..f8e826542f 100644 --- a/InternalPythonModules/android/line.py +++ b/InternalPythonModules/android/line.py @@ -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): """ diff --git a/InternalPythonModules/android/skype.py b/InternalPythonModules/android/skype.py index 6d0df56259..fe027961ff 100644 --- a/InternalPythonModules/android/skype.py +++ b/InternalPythonModules/android/skype.py @@ -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): """ diff --git a/InternalPythonModules/android/textnow.py b/InternalPythonModules/android/textnow.py index 216864f2e1..8361b0d3eb 100644 --- a/InternalPythonModules/android/textnow.py +++ b/InternalPythonModules/android/textnow.py @@ -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") diff --git a/InternalPythonModules/android/viber.py b/InternalPythonModules/android/viber.py index fb2b77ac7a..54f0b260a0 100644 --- a/InternalPythonModules/android/viber.py +++ b/InternalPythonModules/android/viber.py @@ -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") diff --git a/InternalPythonModules/android/whatsapp.py b/InternalPythonModules/android/whatsapp.py index 8fdb09f13b..09f2521a8d 100644 --- a/InternalPythonModules/android/whatsapp.py +++ b/InternalPythonModules/android/whatsapp.py @@ -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")