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

updates

parent 3d37a6e6
No related branches found
No related tags found
No related merge requests found
...@@ -121,4 +121,5 @@ ...@@ -121,4 +121,5 @@
- HEIF processing - HEIF processing
# Known Issues # Known Issues
- On initial run, Autopsy shows a window that can appear behind the splash screen. This looks like Autopsy has stalled during startup. The easiest way to get around this issue for the first run is to run autopsy with the `--nosplash` flag, which will hide the splash screen on startup. There will be a lag where no window appears for a bit, so please be patient. - On initial run, Autopsy shows a window that can appear behind the splash screen. This looks like Autopsy has stalled during startup. The easiest way to get around this issue for the first run is to run autopsy with the `--nosplash` flag, which will hide the splash screen on startup. There will be a lag where no window appears for a bit, so please be patient.
\ No newline at end of file - If a script fails to run due to operation not permitted or something along those lines, you may need to run `chmod u+x <path to script>` from the command line to allow the script to run.
\ No newline at end of file
#!/bin/bash #!/bin/bash
# Unzips an autopsy platform zip to specified directory and does setup # Unzips an application platform zip to specified directory and does setup
usage() { usage() {
echo "Usage: install_autopsy.sh [-z zip_path] [-i install_directory] [-j java_home] [-v asc_file]" 1>&2 echo "Usage: install_application_from_zip.sh [-z zip_path] [-i install_directory] [-j java_home] [-n application_name] [-v asc_file]" 1>&2
echo "If specifying a .asc verification file (with -v flag), the program will attempt to create a temp folder in the working directory and verify the signature with gpg." 1>&2 echo "If specifying a .asc verification file (with -v flag), the program will attempt to create a temp folder in the working directory and verify the signature with gpg." 1>&2
} }
while getopts "z:i:j:v:" o; do APPLICATION_NAME = "autopsy";
while getopts "n:z:i:j:v:" o; do
case "${o}" in case "${o}" in
n)
APPLICATION_NAME = ${OPTARG}
;;
z) z)
AUTOPSY_ZIP_PATH=${OPTARG} APPLICATION_ZIP_PATH=${OPTARG}
;; ;;
i) i)
INSTALL_DIR=${OPTARG} INSTALL_DIR=${OPTARG}
...@@ -27,7 +32,7 @@ while getopts "z:i:j:v:" o; do ...@@ -27,7 +32,7 @@ while getopts "z:i:j:v:" o; do
esac esac
done done
if [[ -z "$AUTOPSY_ZIP_PATH" ]] || [[ -z "$INSTALL_DIR" ]]; then if [[ -z "$APPLICATION_ZIP_PATH" ]] || [[ -z "$INSTALL_DIR" ]]; then
usage usage
exit 1 exit 1
fi fi
...@@ -40,41 +45,40 @@ if [[ -n "$ASC_FILE" ]]; then ...@@ -40,41 +45,40 @@ if [[ -n "$ASC_FILE" ]]; then
mkdir -p $KEY_DIR && mkdir -p $KEY_DIR &&
sudo chmod 600 $KEY_DIR && sudo chmod 600 $KEY_DIR &&
sudo gpg --homedir "$KEY_DIR" --import $VERIFY_DIR/carrier.asc && sudo gpg --homedir "$KEY_DIR" --import $VERIFY_DIR/carrier.asc &&
sudo gpgv --homedir "$KEY_DIR" --keyring "$KEY_DIR/pubring.kbx" $ASC_FILE $AUTOPSY_ZIP_PATH && sudo gpgv --homedir "$KEY_DIR" --keyring "$KEY_DIR/pubring.kbx" $ASC_FILE $APPLICATION_ZIP_PATH &&
sudo rm -r $VERIFY_DIR sudo rm -r $VERIFY_DIR
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "Unable to successfully verify $AUTOPSY_ZIP_PATH with $ASC_FILE" >>/dev/stderr echo "Unable to successfully verify $APPLICATION_ZIP_PATH with $ASC_FILE" >>/dev/stderr
exit 1 exit 1
fi fi
fi fi
ZIP_FILE_NAME=$(basename -- "$AUTOPSY_ZIP_PATH") ZIP_FILE_NAME=$(basename -- "$APPLICATION_ZIP_PATH")
ZIP_NAME="${ZIP_FILE_NAME%.*}" ZIP_NAME="${ZIP_FILE_NAME%.*}"
AUTOPSY_EXTRACTED_PATH=$INSTALL_DIR/$ZIP_NAME APPLICATION_EXTRACTED_PATH=$INSTALL_DIR/$ZIP_NAME
if [[ -d $AUTOPSY_EXTRACTED_PATH || -f $AUTOPSY_EXTRACTED_PATH ]]; then if [[ -d $APPLICATION_EXTRACTED_PATH || -f $APPLICATION_EXTRACTED_PATH ]]; then
echo "A file or directory already exists at $AUTOPSY_EXTRACTED_PATH" >>/dev/stderr echo "A file or directory already exists at $APPLICATION_EXTRACTED_PATH" >>/dev/stderr
exit 1 exit 1
fi fi
echo "Extracting $AUTOPSY_ZIP_PATH to $AUTOPSY_EXTRACTED_PATH..." echo "Extracting $APPLICATION_ZIP_PATH to $APPLICATION_EXTRACTED_PATH..."
mkdir -p $AUTOPSY_EXTRACTED_PATH && mkdir -p $APPLICATION_EXTRACTED_PATH &&
unzip $AUTOPSY_ZIP_PATH -d $INSTALL_DIR unzip $APPLICATION_ZIP_PATH -d $INSTALL_DIR
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "Unable to successfully extract $AUTOPSY_ZIP_PATH to $INSTALL_DIR" >>/dev/stderr echo "Unable to successfully extract $APPLICATION_ZIP_PATH to $INSTALL_DIR" >>/dev/stderr
exit 1 exit 1
fi fi
echo "Setting up autopsy at $AUTOPSY_EXTRACTED_PATH..." echo "Setting up application at $APPLICATION_EXTRACTED_PATH..."
pushd $AUTOPSY_EXTRACTED_PATH && pushd $APPLICATION_EXTRACTED_PATH &&
chown -R $(whoami) . && chown -R $(whoami) . &&
chmod u+x ./unix_setup.sh && chmod u+x ./unix_setup.sh &&
./unix_setup.sh -j $JAVA_PATH && ./unix_setup.sh -j $JAVA_PATH &&
popd popd
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "Unable to setup permissions for autopsy binaries" >>/dev/stderr echo "Unable to setup permissions for application binaries" >>/dev/stderr
exit 1 exit 1
else else
echo "Autopsy setup done." echo "Application setup done."
echo "Autopsy can be launched at $AUTOPSY_EXTRACTED_PATH/bin/autopsy"
fi fi
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
echo "Installing dependencies..." echo "Installing dependencies..."
# dependencies taken from: https://github.com/sleuthkit/autopsy/pull/5111/files # dependencies taken from: https://github.com/sleuthkit/autopsy/pull/5111/files
# brew install postgresql gettext cppunit && \ # brew install postgresql gettext cppunit && \
brew install ant automake libtool afflib libewf libpq testdisk imagemagick gstreamer gst-plugins-base gst-plugins-good brew install ant automake libtool afflib libewf libpq testdisk gstreamer gst-plugins-base gst-plugins-good
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
echo "Unable to install necessary dependencies" >> /dev/stderr echo "Unable to install necessary dependencies" >> /dev/stderr
......
#!/bin/bash #!/bin/bash
# #
# Verifies programs are installed and copies native code into the Autopsy folder structure # Verifies programs are installed and copies native code into the Application folder structure
# #
# NOTE: update_sleuthkit_version.pl updates this value and relies # NOTE: update_sleuthkit_version.pl updates this value and relies
...@@ -9,11 +9,16 @@ TSK_VERSION=4.11.1 ...@@ -9,11 +9,16 @@ TSK_VERSION=4.11.1
usage() { usage() {
echo "Usage: unix_setup.sh [-j java_home]" 1>&2; echo "Usage: unix_setup.sh [-j java_home] [-n application_name]" 1>&2;
} }
while getopts "j:" o; do APPLICATION_NAME = "autopsy";
while getopts "j:n:" o; do
case "${o}" in case "${o}" in
n)
APPLICATION_NAME = ${OPTARG}
;;
j) j)
JAVA_PATH=${OPTARG} JAVA_PATH=${OPTARG}
;; ;;
...@@ -27,7 +32,7 @@ done ...@@ -27,7 +32,7 @@ done
# In the beginning... # In the beginning...
echo "---------------------------------------------" echo "---------------------------------------------"
echo "Checking prerequisites and preparing Autopsy:" echo "Checking prerequisites and preparing ${APPLICATION_NAME}:"
echo "---------------------------------------------" echo "---------------------------------------------"
# Verify PhotoRec was installed # Verify PhotoRec was installed
...@@ -47,8 +52,8 @@ fi ...@@ -47,8 +52,8 @@ fi
echo -n "Checking for Java..." echo -n "Checking for Java..."
if [ -n "$JAVA_PATH" ]; then if [ -n "$JAVA_PATH" ]; then
if [ -x "$JAVA_PATH/bin/java" ]; then if [ -x "$JAVA_PATH/bin/java" ]; then
sed -Ei '/^#?\s*jdkhome=/d' etc/autopsy.conf sed -Ei '/^#?\s*jdkhome=/d' etc/$(APPLICATION_NAME).conf
echo "jdkhome=$JAVA_PATH" >> etc/autopsy.conf echo "jdkhome=$JAVA_PATH" >> etc/$(APPLICATION_NAME).conf
else else
echo "ERROR: Java was not found in $JAVA_PATH." echo "ERROR: Java was not found in $JAVA_PATH."
exit 1 exit 1
...@@ -81,7 +86,7 @@ else ...@@ -81,7 +86,7 @@ else
fi fi
ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-$TSK_VERSION.jar; ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-$TSK_VERSION.jar;
echo -n "Copying sleuthkit-$TSK_VERSION.jar into the Autopsy directory..." echo -n "Copying sleuthkit-$TSK_VERSION.jar into the $APPLICATION_NAME directory..."
rm -f "$ext_jar_filepath"; rm -f "$ext_jar_filepath";
if [ "$?" -gt 0 ]; then #checking if remove operation failed if [ "$?" -gt 0 ]; then #checking if remove operation failed
echo "ERROR: Deleting $ext_jar_filepath failed." echo "ERROR: Deleting $ext_jar_filepath failed."
...@@ -105,8 +110,8 @@ chmod u+x autopsy/markmckinnon/parse* ...@@ -105,8 +110,8 @@ chmod u+x autopsy/markmckinnon/parse*
chmod -R u+x autopsy/solr/bin chmod -R u+x autopsy/solr/bin
# make sure it is executable # make sure it is executable
find /home/autopsy/src/commander/commander-1.0.0/bin/* -not -name "*.exe" | xargs chmod u+x chmod u+x bin/$APPLICATION_NAME
echo echo
echo "Autopsy is now configured. You can execute $(find /home/autopsy/src/commander/commander-1.0.0/bin/* -not -name "*.exe") to start it" echo "Application is now configured. You can execute bin/$APPLICATION_NAME to start it"
echo echo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment