mirror of
https://github.com/elisspace/autopsy.git
synced 2026-08-30 08:01:57 +00:00
Commented out calls to recent interface changes as they will not workwith recent releases
This commit is contained in:
@@ -53,7 +53,8 @@ from org.sleuthkit.autopsy.coreutils import Logger
|
||||
from org.sleuthkit.autopsy.casemodule import Case
|
||||
from org.sleuthkit.autopsy.casemodule.services import Services
|
||||
from org.sleuthkit.autopsy.casemodule.services import FileManager
|
||||
from org.sleuthkit.autopsy.casemodule.services import Blackboard
|
||||
# This will work in 4.0.1 and beyond
|
||||
# from org.sleuthkit.autopsy.casemodule.services import Blackboard
|
||||
|
||||
# Factory that defines the name and details of the module and allows Autopsy
|
||||
# to create instances of the modules that will do the anlaysis.
|
||||
@@ -114,8 +115,9 @@ class SampleJythonFileIngestModule(FileIngestModule):
|
||||
(file.isFile() == False)):
|
||||
return IngestModule.ProcessResult.OK
|
||||
|
||||
# This will work in 4.0.1 and beyond
|
||||
# Use blackboard class to index blackboard artifacts for keyword search
|
||||
blackboard = Case.getCurrentCase().getServices().getBlackboard()
|
||||
# blackboard = Case.getCurrentCase().getServices().getBlackboard()
|
||||
|
||||
# For an example, we will flag files with .txt in the name and make a blackboard artifact.
|
||||
if file.getName().lower().endswith(".txt"):
|
||||
@@ -130,11 +132,12 @@ class SampleJythonFileIngestModule(FileIngestModule):
|
||||
SampleJythonFileIngestModuleFactory.moduleName, "Text Files")
|
||||
art.addAttribute(att)
|
||||
|
||||
try:
|
||||
# index the artifact for keyword search
|
||||
blackboard.indexArtifact(art)
|
||||
except Blackboard.BlackboardException as e:
|
||||
self.log(Level.SEVERE, "Error indexing artifact " + art.getDisplayName())
|
||||
# This will work in 4.0.1 and beyond
|
||||
#try:
|
||||
# # index the artifact for keyword search
|
||||
# blackboard.indexArtifact(art)
|
||||
#except Blackboard.BlackboardException as e:
|
||||
# self.log(Level.SEVERE, "Error indexing artifact " + art.getDisplayName())
|
||||
|
||||
# Fire an event to notify the UI and others that there is a new artifact
|
||||
IngestServices.getInstance().fireModuleDataEvent(
|
||||
|
||||
Reference in New Issue
Block a user