SevenZipExtractor and ImageExtractor accessibility

Get help with module writing or platform code changes.

Moderator: carrier

SevenZipExtractor and ImageExtractor accessibility

Postby Cube » Thu Dec 08, 2016 3:49 pm

Hi all,

I'm developing a Jython file ingest module in order to automatically extract files (filtered by mime-type) from a data source. I chose this directory: "C:\autopsy\case\path\Export\$dataSourceName\" as directory output and I would like to implement a JFileChooser to change the destination directory.

However, I'm facing a problem with the archive extraction feature. The Embedded File Extractor ingest module extracts the archive contents in a hardcoded directory and there's no possible change it by GUI. Furthermore, the SevenZipExtractor and ImageExtractor classes are defined "package private", so I can't import them from my module to customize the directory output.
So, all the files will be extracted into "...\Export\$dataSourceName\" directory (or the one chose by user) but all the archives will be into module directory output, mixed with those of the other data sources.

Since I must to perform this extraction on about 100 (or more) device images and I will run my ingest module on multiple images simultaneously, I really can't re-organize the extracted archive in their respective data source (or user chose) directory. It will be a very expensive and mechanical activity.

I thoughts of two solutions:
1) change the access specifiers of the SevenZipExtractor and ImageExtractor classes, in order to make them accessible.
2) create a browse button in the embedded file extractor panel settings, in order to choose the directory output.

Any other suggestions? I'm available for pull request.

Cube
Cube
 
Posts: 7
Joined: Tue Apr 05, 2016 5:21 pm

Re: SevenZipExtractor and ImageExtractor accessibility

Postby Cube » Fri Dec 09, 2016 4:15 pm

An update:

while I was testing my modules, I noticed that the embedded extraction module makes available the files contained into the archives as well as extract them to the "ModuleOutput" directory.

So, I can run the "embedded extraction" module in pipeline with my module and I will get two extraction phases:
1) extraction to the ModuleOuput directory. The files will be organized in directory with the same name as the respective archive
2) extraction to the default directory output of my module. The files will be extracted in the root directory, not organized in directory-archive. :roll:

It's a good solution. For now, the directory hierarchy is not necessary.

In any case, I'm glad to hear some alternative solution which allows to organize the files inside their directory-archive.

Cube
Cube
 
Posts: 7
Joined: Tue Apr 05, 2016 5:21 pm


Return to Autopsy Developers Corner

Who is online

Users browsing this forum: Google [Bot] and 1 guest