Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule Class Reference

Inherits org.sleuthkit.autopsy.ingest.FileIngestModuleAdapter.

Public Member Functions

ProcessResult process (AbstractFile abstractFile)
 
void shutDown ()
 
void startUp (IngestJobContext context) throws IngestModuleException
 

Private Attributes

SevenZipExtractor archiveExtractor
 
DocumentEmbeddedContentExtractor documentExtractor
 
FileTypeDetector fileTypeDetector
 
long jobId
 

Static Private Attributes

static final Object execMapLock = new Object()
 
static final Map< Long, FileTaskExecutor > fileTaskExecsByJob = new HashMap<>()
 
static final ConcurrentHashMap< Long, ConcurrentHashMap< Long, Archive > > mapOfDepthTrees = new ConcurrentHashMap<>()
 
static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter()
 
static final String TASK_RETRY_STATS_LOG_NAME = "task_retry_stats"
 
static final Logger taskStatsLogger = ApplicationLoggers.getLogger(TASK_RETRY_STATS_LOG_NAME)
 

Detailed Description

A file level ingest module that extracts embedded files from supported archive and document formats.

Definition at line 55 of file EmbeddedFileExtractorIngestModule.java.

Member Function Documentation

ProcessResult org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.process ( AbstractFile  file)

Processes a file. Called between calls to startUp() and shutDown(). Will be called for each file in a data source.

IMPORTANT: In addition to returning ProcessResult.OK or ProcessResult.ERROR, modules should log all errors using methods provided by the org.sleuthkit.autopsy.coreutils.Logger class. Log messages should include the name and object ID of the data being processed and any other information that would be useful for debugging. If an exception has been caught by the module, the exception should be sent to the logger along with the log message so that a stack trace will appear in the application log.

Parameters
fileThe file to analyze.
Returns
A result code indicating success or failure of the processing.

Implements org.sleuthkit.autopsy.ingest.FileIngestModule.

Definition at line 171 of file EmbeddedFileExtractorIngestModule.java.

References org.sleuthkit.autopsy.ingest.IngestModule.ProcessResult.OK.

void org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.shutDown ( )

Invoked by Autopsy when an ingest job is completed (either because the data has been analyzed or because the job was cancelled), before the ingest module instance is discarded. The module should respond by doing things like releasing private resources, submitting final results, and posting a final ingest message.

IMPORTANT: If the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. See IngestModuleReferenceCounter.

Implements org.sleuthkit.autopsy.ingest.IngestModule.

Definition at line 207 of file EmbeddedFileExtractorIngestModule.java.

References org.sleuthkit.autopsy.threadutils.TaskRetryUtil.getTotalFailedTasksCount(), org.sleuthkit.autopsy.threadutils.TaskRetryUtil.getTotalTaskAttemptTimeOutsCount(), org.sleuthkit.autopsy.threadutils.TaskRetryUtil.getTotalTaskRetriesCount(), and org.sleuthkit.autopsy.threadutils.TaskRetryUtil.getTotalTasksCount().

void org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.startUp ( IngestJobContext  context) throws IngestModuleException

Invoked by Autopsy to allow an ingest module instance to set up any internal data structures and acquire any private resources it will need during an ingest job. If the module depends on loading any resources, it should do so in this method so that it can throw an exception in the case of an error and alert the user. Exceptions that are thrown from startUp() are logged and stop processing of the data source.

IMPORTANT: If the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. See IngestModuleReferenceCounter.

IMPORTANT: Start up IngestModuleException messages are displayed to the user, if a user is present. Therefore, an exception to the policy that exception messages are not localized is appropriate in this method. Also, the exception messages should be user-friendly.

Parameters
contextProvides data and services specific to the ingest job and the ingest pipeline of which the module is a part.
Exceptions
org.sleuthkit.autopsy.ingest.IngestModule.IngestModuleException

Implements org.sleuthkit.autopsy.ingest.IngestModule.

Definition at line 81 of file EmbeddedFileExtractorIngestModule.java.

References org.sleuthkit.autopsy.casemodule.Case.getCurrentCase(), org.sleuthkit.autopsy.ingest.IngestJobContext.getJobId(), org.sleuthkit.autopsy.casemodule.Case.getModuleDirectory(), and org.sleuthkit.autopsy.casemodule.Case.getModuleOutputDirectoryRelativePath().

Member Data Documentation

SevenZipExtractor org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.archiveExtractor
private

Definition at line 66 of file EmbeddedFileExtractorIngestModule.java.

DocumentEmbeddedContentExtractor org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.documentExtractor
private

Definition at line 65 of file EmbeddedFileExtractorIngestModule.java.

final Object org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.execMapLock = new Object()
staticprivate

Definition at line 59 of file EmbeddedFileExtractorIngestModule.java.

final Map<Long, FileTaskExecutor> org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.fileTaskExecsByJob = new HashMap<>()
staticprivate

Definition at line 61 of file EmbeddedFileExtractorIngestModule.java.

FileTypeDetector org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.fileTypeDetector
private

Definition at line 67 of file EmbeddedFileExtractorIngestModule.java.

long org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.jobId
private

Definition at line 68 of file EmbeddedFileExtractorIngestModule.java.

final ConcurrentHashMap<Long, ConcurrentHashMap<Long, Archive> > org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.mapOfDepthTrees = new ConcurrentHashMap<>()
staticprivate

Definition at line 63 of file EmbeddedFileExtractorIngestModule.java.

final IngestModuleReferenceCounter org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.refCounter = new IngestModuleReferenceCounter()
staticprivate

Definition at line 64 of file EmbeddedFileExtractorIngestModule.java.

final String org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.TASK_RETRY_STATS_LOG_NAME = "task_retry_stats"
staticprivate

Definition at line 57 of file EmbeddedFileExtractorIngestModule.java.

final Logger org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule.taskStatsLogger = ApplicationLoggers.getLogger(TASK_RETRY_STATS_LOG_NAME)
staticprivate

Definition at line 58 of file EmbeddedFileExtractorIngestModule.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Mon Nov 28 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.