Skip to content
Snippets Groups Projects
Commit 61e0f021 authored by Greg DiCristofaro's avatar Greg DiCristofaro
Browse files

updates for photorec

parent eb3dd902
No related branches found
No related tags found
No related merge requests found
...@@ -632,23 +632,18 @@ private synchronized Path createOutputDirectoryForCase(Path providedPath) throws ...@@ -632,23 +632,18 @@ private synchronized Path createOutputDirectoryForCase(Path providedPath) throws
*/ */
public static File locateExecutable() throws IngestModule.IngestModuleException { public static File locateExecutable() throws IngestModule.IngestModuleException {
File exeFile; File exeFile;
Path execName;
String photorec_linux_directory = "/usr/bin";
if (PlatformUtil.isWindowsOS()) { if (PlatformUtil.isWindowsOS()) {
execName = Paths.get(PHOTOREC_DIRECTORY, PHOTOREC_SUBDIRECTORY, PHOTOREC_EXECUTABLE); Path execName = Paths.get(PHOTOREC_DIRECTORY, PHOTOREC_SUBDIRECTORY, PHOTOREC_EXECUTABLE);
exeFile = InstalledFileLocator.getDefault().locate(execName.toString(), PhotoRecCarverFileIngestModule.class.getPackage().getName(), false); exeFile = InstalledFileLocator.getDefault().locate(execName.toString(), PhotoRecCarverFileIngestModule.class.getPackage().getName(), false);
} else { } else {
File usrBin = new File("/usr/bin/photorec"); exeFile = null;
File usrLocalBin = new File("/usr/local/bin/photorec"); for (String dirName: System.getenv("PATH").split(File.pathSeparator)) {
if (usrBin.canExecute() && usrBin.exists() && !usrBin.isDirectory()) { File testExe = new File(dirName, PHOTOREC_LINUX_EXECUTABLE);
photorec_linux_directory = "/usr/bin"; if (testExe.exists()) {
} else if (usrLocalBin.canExecute() && usrLocalBin.exists() && !usrLocalBin.isDirectory()) { exeFile = testExe;
photorec_linux_directory = "/usr/local/bin"; break;
} else { }
throw new IngestModule.IngestModuleException("Photorec not found");
} }
execName = Paths.get(photorec_linux_directory, PHOTOREC_LINUX_EXECUTABLE);
exeFile = new File(execName.toString());
} }
if (null == exeFile) { if (null == exeFile) {
......
[Desktop Entry]
Name=Autopsy
Comment=A graphical interface to The Sleuth Kit and other digital forensics tools.
GenericName=DFIR Tool.
Exec=autopsy Exec=autopsy
Icon=${SNAP}/meta/gui/autopsy.png Icon=${SNAP}/meta/gui/autopsy.png
\ No newline at end of file Type=Application
Categories=Forensics;DFIR
Keywords=autopsy;sleuth;kit;dfir;forensics
...@@ -7,7 +7,6 @@ grade: stable # must be 'stable' to release into candidate/stable channels ...@@ -7,7 +7,6 @@ grade: stable # must be 'stable' to release into candidate/stable channels
# TODO look into turning back to strict for store inclusion # TODO look into turning back to strict for store inclusion
confinement: classic # use 'strict' once you have the right plugs and slots confinement: classic # use 'strict' once you have the right plugs and slots
architectures: [amd64, arm64] architectures: [amd64, arm64]
# TODO improves startup performance
compression: lzo compression: lzo
icon: snap/gui/autopsy.png icon: snap/gui/autopsy.png
...@@ -20,14 +19,6 @@ package-repositories: ...@@ -20,14 +19,6 @@ package-repositories:
key-id: 99A5C88E3C5B1FA8B05A19D332E9750179FCEA62 key-id: 99A5C88E3C5B1FA8B05A19D332E9750179FCEA62
url: https://apt.bell-sw.com/ url: https://apt.bell-sw.com/
layout:
/usr/bin/photorec:
symlink: $SNAP/usr/bin/photorec
/usr/local/bin:
bind: $SNAP/usr/local/bin
# /usr/lib/jvm/bellsoft-java8-full-amd64:
# symlink: $SNAP/usr/lib/jvm/bellsoft-java8-full-amd64
plugs: plugs:
system-files-autopsy: system-files-autopsy:
interface: system-files interface: system-files
...@@ -44,7 +35,6 @@ apps: ...@@ -44,7 +35,6 @@ apps:
command: autopsy/bin/autopsy command: autopsy/bin/autopsy
common-id: org.sleuthkit.autopsy common-id: org.sleuthkit.autopsy
plugs: plugs:
# TODO verify these:
# taken from https://snapcraft.io/docs/supported-interfaces # taken from https://snapcraft.io/docs/supported-interfaces
- audio-playback - audio-playback
- avahi-observe - avahi-observe
...@@ -108,8 +98,6 @@ parts: ...@@ -108,8 +98,6 @@ parts:
- libvmdk-dev - libvmdk-dev
stage-packages: stage-packages:
- build-essential - build-essential
- autoconf
- libtool
- libpq-dev - libpq-dev
- testdisk - testdisk
- libafflib-dev - libafflib-dev
...@@ -125,9 +113,6 @@ parts: ...@@ -125,9 +113,6 @@ parts:
- bellsoft-java8-full - bellsoft-java8-full
- doxygen - doxygen
stage-packages: stage-packages:
- build-essential
- autoconf
- libtool
- libde265-dev - libde265-dev
- libheif-dev - libheif-dev
- libpq-dev - libpq-dev
...@@ -179,7 +164,11 @@ parts: ...@@ -179,7 +164,11 @@ parts:
UNIX_SETUP_SCRIPT="$AUTOPSY_LOCATION/unix_setup.sh" UNIX_SETUP_SCRIPT="$AUTOPSY_LOCATION/unix_setup.sh"
chmod +x $UNIX_SETUP_SCRIPT chmod +x $UNIX_SETUP_SCRIPT
$UNIX_SETUP_SCRIPT $UNIX_SETUP_SCRIPT
# snaps run applications with different permissions. This ensures applications can run.
chmod 755 "$AUTOPSY_LOCATION/bin/autopsy" chmod 755 "$AUTOPSY_LOCATION/bin/autopsy"
find "$AUTOPSY_LOCATION/autopsy/markmckinnon" -name "Export*" -o -name "parse*" | xargs -I{} chmod a+x {}
chmod -R a+x "$AUTOPSY_LOCATION/autopsy/solr/bin"
# # ----- INSTALL DESKTOP SHORTCUT ----- # # ----- INSTALL DESKTOP SHORTCUT -----
# AUTOPSY_DESKTOP_PATH="$SNAPCRAFT_PART_INSTALL/usr/share/applications/" # AUTOPSY_DESKTOP_PATH="$SNAPCRAFT_PART_INSTALL/usr/share/applications/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment