diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DataSourceModulesWrapper.java b/Core/src/org/sleuthkit/autopsy/discovery/DataSourceModulesWrapper.java index 456aa7bfac..9d48827b30 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DataSourceModulesWrapper.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DataSourceModulesWrapper.java @@ -21,7 +21,7 @@ package org.sleuthkit.autopsy.discovery; import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeIdModuleFactory; import org.sleuthkit.autopsy.modules.hashdatabase.HashLookupModuleFactory; -import org.sleuthkit.autopsy.modules.pictureanalysis.PictureAnalysisIngestModuleFactory; +import org.sleuthkit.autopsy.modules.pictureanalyzer.PictureAnalyzerIngestModuleFactory; import org.sleuthkit.datamodel.IngestJobInfo; import org.sleuthkit.datamodel.IngestModuleInfo; @@ -118,7 +118,7 @@ class DataSourceModulesWrapper { * data source. */ private void updateExifStatus(IngestModuleInfo moduleInfo) { - if (!exifModuleRun && moduleInfo.getDisplayName().equals(PictureAnalysisIngestModuleFactory.getModuleName())) { + if (!exifModuleRun && moduleInfo.getDisplayName().equals(PictureAnalyzerIngestModuleFactory.getModuleName())) { exifModuleRun = true; } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryLoader.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryLoader.java index b313ef8fb8..59614ab573 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryLoader.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryLoader.java @@ -39,7 +39,7 @@ import org.sleuthkit.autopsy.modules.photoreccarver.PhotoRecCarverIngestModuleFa import org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorModuleFactory; import org.sleuthkit.autopsy.modules.encryptiondetection.EncryptionDetectionModuleFactory; import org.sleuthkit.autopsy.centralrepository.ingestmodule.CentralRepoIngestModuleFactory; -import org.sleuthkit.autopsy.modules.pictureanalysis.PictureAnalysisIngestModuleFactory; +import org.sleuthkit.autopsy.modules.pictureanalyzer.PictureAnalyzerIngestModuleFactory; import org.sleuthkit.autopsy.modules.vmextractor.VMExtractorIngestModuleFactory; import org.sleuthkit.autopsy.python.JythonModuleLoader; @@ -60,7 +60,7 @@ final class IngestModuleFactoryLoader { add(FileTypeIdModuleFactory.class.getCanonicalName()); add(FileExtMismatchDetectorModuleFactory.class.getCanonicalName()); add(EmbeddedFileExtractorModuleFactory.class.getCanonicalName()); - add(PictureAnalysisIngestModuleFactory.class.getCanonicalName()); + add(PictureAnalyzerIngestModuleFactory.class.getCanonicalName()); add("org.sleuthkit.autopsy.keywordsearch.KeywordSearchModuleFactory"); //NON-NLS add("org.sleuthkit.autopsy.thunderbirdparser.EmailParserModuleFactory"); //NON-NLS add(EncryptionDetectionModuleFactory.class.getCanonicalName()); diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/Bundle.properties-MERGED deleted file mode 100755 index f56d8b1526..0000000000 --- a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/Bundle.properties-MERGED +++ /dev/null @@ -1,3 +0,0 @@ -PictureAnalysisIngestModule.cannot_run_file_type=Cannot run file type detection. -PictureAnalysisIngestModuleFactory.module_description=Performs general analysis on picture files, including extracting EXIF metadata and converting between formats. -PictureAnalysisIngestModuleFactory.module_name=Picture Analysis diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/Bundle.properties-MERGED new file mode 100755 index 0000000000..47473cdb93 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/Bundle.properties-MERGED @@ -0,0 +1,3 @@ +PictureAnalyzerIngestModule.cannot_run_file_type=Cannot run file type detection. +PictureAnalyzerIngestModuleFactory.module_description=Performs general analysis on picture files, including extracting EXIF metadata and converting between formats. +PictureAnalyzerIngestModuleFactory.module_name=Picture Analyzer diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/Bundle_ja.properties similarity index 60% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/Bundle_ja.properties rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/Bundle_ja.properties index c0a4bc72d4..0a785a163b 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/Bundle_ja.properties @@ -1 +1 @@ -PictureAnalysisIngestModule.cannot_run_file_type=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306e\u691c\u51fa\u3092\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3002 +PictureAnalyzerIngestModule.cannot_run_file_type=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306e\u691c\u51fa\u3092\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3002 diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/PictureAnalysisIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/PictureAnalyzerIngestModule.java similarity index 89% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/PictureAnalysisIngestModule.java rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/PictureAnalyzerIngestModule.java index 12de4bc1aa..77d8a51df4 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/PictureAnalysisIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/PictureAnalyzerIngestModule.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.modules.pictureanalysis; +package org.sleuthkit.autopsy.modules.pictureanalyzer; import java.util.Collection; @@ -25,7 +25,7 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.ingest.FileIngestModuleAdapter; import org.sleuthkit.autopsy.ingest.IngestJobContext; -import org.sleuthkit.autopsy.modules.pictureanalysis.spi.PictureProcessor; +import org.sleuthkit.autopsy.modules.pictureanalyzer.spi.PictureProcessor; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; import org.sleuthkit.datamodel.AbstractFile; @@ -37,7 +37,7 @@ import org.sleuthkit.datamodel.TskData; * module acts as a container for multiple PictureProcessors, which are the * classes that do the work mentioned in the examples above. */ -public class PictureAnalysisIngestModule extends FileIngestModuleAdapter { +public class PictureAnalyzerIngestModule extends FileIngestModuleAdapter { private FileTypeDetector fileTypeDetector; private Collection registry; @@ -71,7 +71,7 @@ public class PictureAnalysisIngestModule extends FileIngestModuleAdapter { @Override @NbBundle.Messages({ - "PictureAnalysisIngestModule.cannot_run_file_type=Cannot run file type detection." + "PictureAnalyzerIngestModule.cannot_run_file_type=Cannot run file type detection." }) public void startUp(IngestJobContext context) throws IngestModuleException { registry = Lookup.getDefault().lookupAll(PictureProcessor.class); @@ -79,7 +79,7 @@ public class PictureAnalysisIngestModule extends FileIngestModuleAdapter { try { fileTypeDetector = new FileTypeDetector(); } catch (FileTypeDetector.FileTypeDetectorInitException ex) { - throw new IngestModuleException(Bundle.PictureAnalysisIngestModule_cannot_run_file_type(), ex); + throw new IngestModuleException(Bundle.PictureAnalyzerIngestModule_cannot_run_file_type(), ex); } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/PictureAnalysisIngestModuleFactory.java b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/PictureAnalyzerIngestModuleFactory.java similarity index 81% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/PictureAnalysisIngestModuleFactory.java rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/PictureAnalyzerIngestModuleFactory.java index e83506c45d..3f67994129 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/PictureAnalysisIngestModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/PictureAnalyzerIngestModuleFactory.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.modules.pictureanalysis; +package org.sleuthkit.autopsy.modules.pictureanalyzer; import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; @@ -30,13 +30,13 @@ import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; * Factory for the Picture Analysis ingest module. */ @ServiceProvider(service = IngestModuleFactory.class) -public class PictureAnalysisIngestModuleFactory extends IngestModuleFactoryAdapter { +public class PictureAnalyzerIngestModuleFactory extends IngestModuleFactoryAdapter { @NbBundle.Messages({ - "PictureAnalysisIngestModuleFactory.module_name=Picture Analysis" + "PictureAnalyzerIngestModuleFactory.module_name=Picture Analyzer" }) public static String getModuleName() { - return Bundle.PictureAnalysisIngestModuleFactory_module_name(); + return Bundle.PictureAnalyzerIngestModuleFactory_module_name(); } @Override @@ -46,12 +46,12 @@ public class PictureAnalysisIngestModuleFactory extends IngestModuleFactoryAdapt @Override @NbBundle.Messages({ - "PictureAnalysisIngestModuleFactory.module_description=Performs general" + "PictureAnalyzerIngestModuleFactory.module_description=Performs general" + " analysis on picture files, including extracting EXIF metadata" + " and converting between formats." }) public String getModuleDescription() { - return Bundle.PictureAnalysisIngestModuleFactory_module_description(); + return Bundle.PictureAnalyzerIngestModuleFactory_module_description(); } @Override @@ -61,7 +61,7 @@ public class PictureAnalysisIngestModuleFactory extends IngestModuleFactoryAdapt @Override public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings ingestOptions) { - return new PictureAnalysisIngestModule(); + return new PictureAnalyzerIngestModule(); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/Bundle.properties-MERGED similarity index 100% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/Bundle.properties-MERGED rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/Bundle.properties-MERGED diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/Bundle_ja.properties similarity index 100% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/Bundle_ja.properties rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/Bundle_ja.properties diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/EXIFProcessor.java b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/EXIFProcessor.java similarity index 98% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/EXIFProcessor.java rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/EXIFProcessor.java index c3b60fb7c6..c2c5051050 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/EXIFProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/EXIFProcessor.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.modules.pictureanalysis.impls; +package org.sleuthkit.autopsy.modules.pictureanalyzer.impls; import com.drew.imaging.ImageMetadataReader; import com.drew.imaging.ImageProcessingException; @@ -54,7 +54,7 @@ import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Image; import org.sleuthkit.datamodel.ReadContentInputStream; import org.sleuthkit.datamodel.TskCoreException; -import org.sleuthkit.autopsy.modules.pictureanalysis.spi.PictureProcessor; +import org.sleuthkit.autopsy.modules.pictureanalyzer.spi.PictureProcessor; /** * Extracts EXIF metadata from JPEG, TIFF, and WAV files. Currently only date, diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/HEICProcessor.java b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/HEICProcessor.java similarity index 91% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/HEICProcessor.java rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/HEICProcessor.java index 060e2f737e..d4aca66377 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/impls/HEICProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/HEICProcessor.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.modules.pictureanalysis.impls; +package org.sleuthkit.autopsy.modules.pictureanalyzer.impls; import java.util.HashSet; import java.util.Set; @@ -41,7 +41,7 @@ import org.apache.commons.io.FilenameUtils; import org.openide.modules.InstalledFileLocator; import org.openide.util.lookup.ServiceProvider; -import org.sleuthkit.autopsy.modules.pictureanalysis.spi.PictureProcessor; +import org.sleuthkit.autopsy.modules.pictureanalyzer.spi.PictureProcessor; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.coreutils.ExecUtil; @@ -91,18 +91,19 @@ public class HEICProcessor implements PictureProcessor { private Path findImageMagick() { final Path windowsLocation = Paths.get(IMAGE_MAGICK_FOLDER, IMAGE_MAGICK_EXE); - final Path linuxLocation = Paths.get("usr", "bin", "magick"); - final Path macOsLocation = Paths.get("usr", "local", "bin", "magick"); + final Path macAndLinuxLocation = Paths.get("/usr", "local", "bin", "magick"); + + final String osName = PlatformUtil.getOSName().toLowerCase(); if (PlatformUtil.isWindowsOS() && PlatformUtil.is64BitJVM()) { - final File locatedExec = InstalledFileLocator.getDefault().locate(windowsLocation.toString(), - HEICProcessor.class.getPackage().getName(), false); + final File locatedExec = InstalledFileLocator.getDefault().locate( + windowsLocation.toString(), HEICProcessor.class.getPackage().getName(), false); - return (locatedExec != null) ? locatedExec.toPath() : null; - } else if (Files.isExecutable(linuxLocation) && !Files.isDirectory(linuxLocation)) { - return linuxLocation; - } else if (Files.isExecutable(macOsLocation) && !Files.isDirectory(macOsLocation)) { - return macOsLocation; + return (locatedExec != null) ? locatedExec.toPath() : null; + } else if ((osName.equals("linux") || osName.startsWith("mac")) && + Files.isExecutable(macAndLinuxLocation) && + !Files.isDirectory(macAndLinuxLocation)) { + return macAndLinuxLocation; } else { return null; } @@ -158,8 +159,8 @@ public class HEICProcessor implements PictureProcessor { /** * Copies the HEIC container to disk in order to run ImageMagick. */ - private Path extractToDisk(AbstractFile heicFile) throws IOException { - final String tempDir = Case.getCurrentCase().getTempDirectory(); + private Path extractToDisk(AbstractFile heicFile) throws IOException, NoCurrentCaseException { + final String tempDir = Case.getCurrentCaseThrows().getTempDirectory(); final String heicFileName = FileUtil.escapeFileName(heicFile.getName()); final Path localDiskCopy = Paths.get(tempDir, heicFileName); @@ -206,7 +207,7 @@ public class HEICProcessor implements PictureProcessor { final String glob = String.format("{%1$s.jpg,%1$s-*.jpg}", baseFileName); try (DirectoryStream stream = Files.newDirectoryStream(moduleOutputFolder, glob)) { - final Path caseDirectory = Paths.get(Case.getCurrentCase().getCaseDirectory()); + final Path caseDirectory = Paths.get(Case.getCurrentCaseThrows().getCaseDirectory()); for (Path candidate : stream) { if (context.fileIngestIsCancelled()) { return; @@ -215,7 +216,7 @@ public class HEICProcessor implements PictureProcessor { final BasicFileAttributes attrs = Files.readAttributes(candidate, BasicFileAttributes.class); final Path localCasePath = caseDirectory.relativize(candidate); - final DerivedFile jpegFile = Case.getCurrentCase().getSleuthkitCase() + final DerivedFile jpegFile = Case.getCurrentCaseThrows().getSleuthkitCase() .addDerivedFile(candidate.getFileName().toString(), localCasePath.toString(), attrs.size(), 0L, attrs.creationTime().to(TimeUnit.SECONDS), diff --git a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/spi/PictureProcessor.java b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/spi/PictureProcessor.java similarity index 95% rename from Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/spi/PictureProcessor.java rename to Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/spi/PictureProcessor.java index 4172c559a4..8c66504e7c 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/pictureanalysis/spi/PictureProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/spi/PictureProcessor.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.modules.pictureanalysis.spi; +package org.sleuthkit.autopsy.modules.pictureanalyzer.spi; import java.util.Set; import org.sleuthkit.autopsy.ingest.IngestJobContext; diff --git a/Running_Linux_OSX.txt b/Running_Linux_OSX.txt index 0ada2fd44c..c130e2f147 100644 --- a/Running_Linux_OSX.txt +++ b/Running_Linux_OSX.txt @@ -9,6 +9,43 @@ The following need to be done at least once. They do not need to be repeated for -- Linux: % sudo apt-get install testdisk -- OS X: % brew install testdisk +- (Optional) Install ImageMagick for Apple's High Efficiency Photo (HEIC/HEIF) support. +-- OS X: % brew install imagemagick +-- Linux: + % sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list + + % sudo apt-get update + % sudo apt-get install build-essential autoconf libtool git-core + % sudo apt-get build-dep imagemagick libmagickcore-dev libde265 libheif + + % cd /usr/src/ + + % sudo git clone https://github.com/strukturag/libde265.git + % sudo git clone https://github.com/strukturag/libheif.git + + % cd libde265/ + % sudo ./autogen.sh + % sudo ./configure + % sudo make + % sudo make install + + % cd /usr/src/libheif/ + % sudo ./autogen.sh + % sudo ./configure + % sudo make + % sudo make install + + % cd /usr/src/ + % sudo wget https://www.imagemagick.org/download/ImageMagick.tar.gz + % sudo tar xf ImageMagick.tar.gz + + % cd ImageMagick-7* + % sudo ./configure --with-heic=yes + % sudo make + % sudo make install + + % sudo ldconfig + - Install the BellSoft Java 8 JRE and JavaFX 8 distribution and set JAVA_HOME. * The BellSoft distribution bundles OpenJDK and OpenJFX. Other distributions we have tried either don't bundle OpenJFX (AdoptOpenJDK) or don't include all necessary binaries (Amazon Corretto).