diff --git a/pythonExamples/Aug2015DataSourceTutorial/FindContactsDb.py b/pythonExamples/Aug2015DataSourceTutorial/FindContactsDb.py index d3071bfe4b..27f9be6161 100644 --- a/pythonExamples/Aug2015DataSourceTutorial/FindContactsDb.py +++ b/pythonExamples/Aug2015DataSourceTutorial/FindContactsDb.py @@ -113,7 +113,7 @@ class ContactsDbIngestModule(DataSourceIngestModule): progressBar.switchToIndeterminate() # Use blackboard class to index blackboard artifacts for keyword search - blackboard = Case.getCurrentCase().getServices().getBlackboard() + blackboard = Case.getCurrentCase().getSleuthkitCase().getBlackboard() # Find files named contacts.db, regardless of parent path fileManager = Case.getCurrentCase().getServices().getFileManager() diff --git a/pythonExamples/Aug2015DataSourceTutorial/RunExe.py b/pythonExamples/Aug2015DataSourceTutorial/RunExe.py index 4544c1884c..230aba11f8 100644 --- a/pythonExamples/Aug2015DataSourceTutorial/RunExe.py +++ b/pythonExamples/Aug2015DataSourceTutorial/RunExe.py @@ -145,7 +145,7 @@ class RunExeIngestModule(DataSourceIngestModule): # Add each argument in its own line. I.e. "-f foo" would be two calls to .add() cmd.add(imagePaths[0]) - processBuilder = ProcessBuilder(cmd); + processBuilder = ProcessBuilder(cmd) processBuilder.redirectOutput(reportFile) ExecUtil.execute(processBuilder, DataSourceIngestModuleProcessTerminator(self.context)) diff --git a/pythonExamples/July2015FileTutorial_BigRound/FindBigRoundFiles.py b/pythonExamples/July2015FileTutorial_BigRound/FindBigRoundFiles.py index ae8235d007..5bf710e9d5 100644 --- a/pythonExamples/July2015FileTutorial_BigRound/FindBigRoundFiles.py +++ b/pythonExamples/July2015FileTutorial_BigRound/FindBigRoundFiles.py @@ -109,7 +109,7 @@ class FindBigRoundFilesIngestModule(FileIngestModule): def process(self, file): # Use blackboard class to index blackboard artifacts for keyword search - blackboard = Case.getCurrentCase().getServices().getBlackboard() + blackboard = Case.getCurrentCase().getSleuthkitCase().getBlackboard() # Skip non-files if ((file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS) or @@ -131,7 +131,7 @@ class FindBigRoundFilesIngestModule(FileIngestModule): try: # post the artifact for listeners of artifact events - blackboard.postArtifact(art) + blackboard.postArtifact(art, FindBigRoundFilesIngestModuleFactory.moduleName) except Blackboard.BlackboardException as e: self.log(Level.SEVERE, "Error indexing artifact " + art.getDisplayName()) diff --git a/pythonExamples/Registry_Example.py b/pythonExamples/Registry_Example.py index b980d4b831..fb06e5c971 100644 --- a/pythonExamples/Registry_Example.py +++ b/pythonExamples/Registry_Example.py @@ -179,6 +179,10 @@ class RegistryExampleIngestModule(DataSourceIngestModule): artType = skCase.getArtifactType("TSK_REGISTRY_RUN_KEYS") try: + addArtifactAttributeType(String + attrTypeString, TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE + valueType, String + displayName) attributeIdRunKeyName = skCase.addArtifactAttributeType("TSK_REG_RUN_KEY_NAME", BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, "Run Key Name") except: self.log(Level.INFO, "Attributes Creation Error, TSK_REG_RUN_KEY_NAME, May already exist. ") @@ -207,7 +211,7 @@ class RegistryExampleIngestModule(DataSourceIngestModule): # post the artifact for listeners of artifact events try: - skCase.getBlackboard().postArtifact(art) + skCase.getBlackboard().postArtifact(art, moduleName) except: self._logger.log(Level.WARNING, "Error indexing artifact " + art.getDisplayName()) diff --git a/pythonExamples/dataSourceIngestModule.py b/pythonExamples/dataSourceIngestModule.py index 1ecd859d9e..ecb4f01477 100644 --- a/pythonExamples/dataSourceIngestModule.py +++ b/pythonExamples/dataSourceIngestModule.py @@ -115,7 +115,7 @@ class SampleJythonDataSourceIngestModule(DataSourceIngestModule): progressBar.switchToIndeterminate() # Use blackboard class to index blackboard artifacts for keyword search - blackboard = Case.getCurrentCase().getServices().getBlackboard() + blackboard = Case.getCurrentCase().getSleuthkitCase().getBlackboard() # For our example, we will use FileManager to get all # files with the word "test" @@ -147,7 +147,7 @@ class SampleJythonDataSourceIngestModule(DataSourceIngestModule): try: # post the artifact for listeners of artifact events. - blackboard.postArtifact(art) + blackboard.postArtifact(art, SampleJythonDataSourceIngestModuleFactory.moduleName) except Blackboard.BlackboardException as e: self.log(Level.SEVERE, "Error indexing artifact " + art.getDisplayName()) diff --git a/pythonExamples/fileIngestModule.py b/pythonExamples/fileIngestModule.py index ea759ab144..f72f1c4792 100644 --- a/pythonExamples/fileIngestModule.py +++ b/pythonExamples/fileIngestModule.py @@ -117,7 +117,7 @@ class SampleJythonFileIngestModule(FileIngestModule): return IngestModule.ProcessResult.OK # Use blackboard class to index blackboard artifacts for keyword search - blackboard = Case.getCurrentCase().getServices().getBlackboard() + blackboard = Case.getCurrentCase().getSleuthkitCase().getBlackboard() # For an example, we will flag files with .txt in the name and make a blackboard artifact. if file.getName().lower().endswith(".txt"): @@ -135,7 +135,7 @@ class SampleJythonFileIngestModule(FileIngestModule): try: # post the artifact for listeners of artifact events - blackboard.postArtifact(art) + blackboard.postArtifact(art, SampleJythonFileIngestModuleFactory.moduleName) except Blackboard.BlackboardException as e: self.log(Level.SEVERE, "Error indexing artifact " + art.getDisplayName())