From 97ac6821ce4a1c05f6cc7a11d3f8cafb0d05a4b2 Mon Sep 17 00:00:00 2001 From: Raman Date: Wed, 11 Sep 2019 15:49:26 -0400 Subject: [PATCH] Updated AppDBParserHelper to take in a Account.Address for self account, instead of just an account id. --- .../sleuthkit/autopsy/coreutils/AppDBParserHelper.java | 6 +++--- InternalPythonModules/android/imo.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/AppDBParserHelper.java b/Core/src/org/sleuthkit/autopsy/coreutils/AppDBParserHelper.java index 0b6f567b87..538ea07098 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/AppDBParserHelper.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/AppDBParserHelper.java @@ -142,17 +142,17 @@ public final class AppDBParserHelper { * @param dbFile database file being parsed by the module * @param accountsType account types created by this module * @param selfAccountType self account type to be created for this module - * @param selfAccountId account unique id for the self account + * @param selfAccountAddress account unique id for the self account * * @throws TskCoreException */ - public AppDBParserHelper(String moduleName, AbstractFile dbFile, Account.Type accountsType, Account.Type selfAccountType, String selfAccountId) throws TskCoreException { + public AppDBParserHelper(String moduleName, AbstractFile dbFile, Account.Type accountsType, Account.Type selfAccountType, Account.Address selfAccountAddress) throws TskCoreException { this.moduleName = moduleName; this.dbAbstractFile = dbFile; this.accountsType = accountsType; - this.selfAccountInstance = Case.getCurrentCase().getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(selfAccountType, selfAccountId, moduleName, dbFile); + this.selfAccountInstance = Case.getCurrentCase().getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(selfAccountType, selfAccountAddress.getUniqueID(), moduleName, dbFile); } /** diff --git a/InternalPythonModules/android/imo.py b/InternalPythonModules/android/imo.py index 0bb1b913b2..9b3ec78528 100644 --- a/InternalPythonModules/android/imo.py +++ b/InternalPythonModules/android/imo.py @@ -56,7 +56,7 @@ class IMOAnalyzer(general.AndroidComponentAnalyzer): self._logger = Logger.getLogger(self.__class__.__name__) def analyze(self, dataSource, fileManager, context): - selfAccountId = None + selfAccountAddress = None accountDbs = AppSQLiteDB.findAppDatabases(dataSource, "accountdb.db", True, "com.imo.android.imous") for accountDb in accountDbs: try: @@ -65,8 +65,8 @@ class IMOAnalyzer(general.AndroidComponentAnalyzer): # We can determine the IMO user ID of the device owner. # Therefore we can create and use a app account and use that # as a 'self' account instead of a Device account - if not selfAccountId: - selfAccountId = accountResultSet.getString("name") + if not selfAccountAddress: + selfAccountAddress = Account.Address(accountResultSet.getString("uid"), accountResultSet.getString("name")) except SQLException as ex: self._logger.log(Level.SEVERE, "Error processing query result for account", ex) @@ -77,7 +77,7 @@ class IMOAnalyzer(general.AndroidComponentAnalyzer): for friendsDb in friendsDbs: try: friendsDBHelper = AppDBParserHelper("IMO Parser", friendsDb.getDBFile(), - Account.Type.IMO, Account.Type.IMO, selfAccountId ) + Account.Type.IMO, Account.Type.IMO, selfAccountAddress ) contactsResultSet = friendsDb.runQuery("SELECT buid, name FROM friends") if contactsResultSet is not None: while contactsResultSet.next():