mirror of
https://github.com/elisspace/autopsy.git
synced 2026-08-30 16:11:57 +00:00
Commented out calls to recent interface changes as they will not workwith recent releases
This commit is contained in:
@@ -55,10 +55,12 @@ from org.sleuthkit.autopsy.ingest import IngestServices
|
||||
from org.sleuthkit.autopsy.ingest import ModuleDataEvent
|
||||
from org.sleuthkit.autopsy.coreutils import Logger
|
||||
from org.sleuthkit.autopsy.casemodule import Case
|
||||
from org.sleuthkit.autopsy.datamodel import ContentUtils
|
||||
from org.sleuthkit.autopsy.casemodule.services import Services
|
||||
from org.sleuthkit.autopsy.casemodule.services import FileManager
|
||||
from org.sleuthkit.autopsy.casemodule.services import Blackboard
|
||||
from org.sleuthkit.autopsy.datamodel import ContentUtils
|
||||
# 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
|
||||
@@ -111,10 +113,12 @@ class ContactsDbIngestModule(DataSourceIngestModule):
|
||||
|
||||
# we don't know how much work there is yet
|
||||
progressBar.switchToIndeterminate()
|
||||
|
||||
# Find files named contacts.db, regardless of parent path
|
||||
|
||||
# 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()
|
||||
|
||||
# Find files named contacts.db, regardless of parent path
|
||||
fileManager = Case.getCurrentCase().getServices().getFileManager()
|
||||
files = fileManager.findFiles(dataSource, "contacts.db")
|
||||
|
||||
@@ -172,11 +176,12 @@ class ContactsDbIngestModule(DataSourceIngestModule):
|
||||
art.addAttribute(BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID(),
|
||||
ContactsDbIngestModuleFactory.moduleName, phone))
|
||||
|
||||
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 are new artifacts
|
||||
IngestServices.getInstance().fireModuleDataEvent(
|
||||
|
||||
@@ -56,7 +56,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.
|
||||
@@ -106,8 +107,9 @@ class FindBigRoundFilesIngestModule(FileIngestModule):
|
||||
# See: http://www.sleuthkit.org/sleuthkit/docs/jni-docs/4.3/classorg_1_1sleuthkit_1_1datamodel_1_1_abstract_file.html
|
||||
def process(self, file):
|
||||
|
||||
# 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()
|
||||
|
||||
# Skip non-files
|
||||
if ((file.getType() == TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS) or
|
||||
@@ -125,11 +127,12 @@ class FindBigRoundFilesIngestModule(FileIngestModule):
|
||||
FindBigRoundFilesIngestModuleFactory.moduleName, "Big and Round 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(
|
||||
|
||||
@@ -51,7 +51,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
|
||||
@@ -112,8 +113,9 @@ class SampleJythonDataSourceIngestModule(DataSourceIngestModule):
|
||||
# we don't know how much work there is yet
|
||||
progressBar.switchToIndeterminate()
|
||||
|
||||
# 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 our example, we will use FileManager to get all
|
||||
# files with the word "test"
|
||||
@@ -141,11 +143,12 @@ class SampleJythonDataSourceIngestModule(DataSourceIngestModule):
|
||||
att = BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID(), SampleJythonDataSourceIngestModuleFactory.moduleName, "Test file")
|
||||
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())
|
||||
|
||||
# To further the example, this code will read the contents of the file and count the number of bytes
|
||||
inputStream = ReadContentInputStream(file)
|
||||
|
||||
@@ -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