updates to remove datasource mentions

This commit is contained in:
Greg DiCristofaro 2020-04-16 13:04:38 -04:00
parent 7e35e479f9
commit cb66620dba

View File

@ -44,7 +44,6 @@ from org.sleuthkit.datamodel.blackboardutils.attributes.GeoTrackPoints import Tr
from org.sleuthkit.autopsy.datamodel import ContentUtils from org.sleuthkit.autopsy.datamodel import ContentUtils
from org.sleuthkit.autopsy.ingest import IngestModule from org.sleuthkit.autopsy.ingest import IngestModule
from org.sleuthkit.autopsy.ingest.IngestModule import IngestModuleException from org.sleuthkit.autopsy.ingest.IngestModule import IngestModuleException
from org.sleuthkit.autopsy.ingest import DataSourceIngestModule
from org.sleuthkit.autopsy.ingest import FileIngestModule from org.sleuthkit.autopsy.ingest import FileIngestModule
from org.sleuthkit.autopsy.ingest import IngestModuleFactoryAdapter from org.sleuthkit.autopsy.ingest import IngestModuleFactoryAdapter
from org.sleuthkit.autopsy.ingest import IngestMessage from org.sleuthkit.autopsy.ingest import IngestMessage
@ -65,9 +64,7 @@ import uuid
# Factory that defines the name and details of the module and allows Autopsy # Factory that defines the name and details of the module and allows Autopsy
# to create instances of the modules that will do the analysis. # to create instances of the modules that will do the analysis.
class GPXParserFileIngestModuleFactory(IngestModuleFactoryAdapter):
class GPXParserDataSourceIngestModuleFactory(IngestModuleFactoryAdapter):
moduleName = "GPX Parser" moduleName = "GPX Parser"
@ -84,14 +81,14 @@ class GPXParserDataSourceIngestModuleFactory(IngestModuleFactoryAdapter):
return True return True
def createFileIngestModule(self, ingestOptions): def createFileIngestModule(self, ingestOptions):
return GPXParserDataSourceIngestModule() return GPXParserFileIngestModule()
# Data Source-level ingest module. One gets created per data source. # File level ingest module.
class GPXParserDataSourceIngestModule(FileIngestModule): class GPXParserFileIngestModule(FileIngestModule):
logger = Logger.getLogger( logger = Logger.getLogger(
GPXParserDataSourceIngestModuleFactory.moduleName) GPXParserFileIngestModuleFactory.moduleName)
writeDebugMsgs = False writeDebugMsgs = False
def log(self, level, msg): def log(self, level, msg):
@ -103,7 +100,7 @@ class GPXParserDataSourceIngestModule(FileIngestModule):
self.fileCount = 0 self.fileCount = 0
# Get the module name, it will be needed for adding attributes # Get the module name, it will be needed for adding attributes
self.moduleName = GPXParserDataSourceIngestModuleFactory.moduleName self.moduleName = GPXParserFileIngestModuleFactory.moduleName
# Get the case database and its blackboard. # Get the case database and its blackboard.
self.skCase = Case.getCurrentCase().getSleuthkitCase() self.skCase = Case.getCurrentCase().getSleuthkitCase()
@ -247,11 +244,9 @@ class GPXParserDataSourceIngestModule(FileIngestModule):
self.fileCount += 1 self.fileCount += 1
return IngestModule.ProcessResult.OK return IngestModule.ProcessResult.OK
# Where any shutdown code is run and resources are freed.
def shutDown(self): def shutDown(self):
# As a final part of this example, we'll send a message to the ingest inbox with the number of files found (in this thread)
message = IngestMessage.createMessage( message = IngestMessage.createMessage(
IngestMessage.MessageType.DATA, GPXParserDataSourceIngestModuleFactory.moduleName, IngestMessage.MessageType.DATA, GPXParserFileIngestModuleFactory.moduleName,
str(self.fileCount) + " files found") str(self.fileCount) + " files found")
ingestServices = IngestServices.getInstance().postMessage(message) ingestServices = IngestServices.getInstance().postMessage(message)