From d3428e926c9716b266082f57528835d7d19ad879 Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Wed, 7 Mar 2018 13:49:44 -0500 Subject: [PATCH 01/12] added preinstall script to zip file --- build.xml | 1 + preinstall.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 preinstall.sh diff --git a/build.xml b/build.xml index ef5ad87980..c43701e11d 100644 --- a/build.xml +++ b/build.xml @@ -87,6 +87,7 @@ + diff --git a/preinstall.sh b/preinstall.sh new file mode 100644 index 0000000000..4c4fd388e3 --- /dev/null +++ b/preinstall.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +photorec_filepath=/usr/bin/photorec; +if [ -f "$photorec_filepath" ]; then + echo "photorec found" +else + echo "Photorec not found, please install testdisk for the photorec carver functionality" + echo "run the command: sudo apt-get install testdisk" +fi + +sleuthkit_jar_filepath=/usr/share/java/sleuthkit-4.6.0.jar; +ext_jar_filepath=./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar; +if [ -f "$sleuthkit_jar_filepath" ]; then + echo "sleuthkit jarfile found"; + echo "copying sleuthkit-jar file to the autopsy directory"; + rm ./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar + if [ ! -f "$ext_jar_filepath" ]; then + cp $sleuthkit_jar_filepath ./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar; + echo "Successfully copied sleuthkit-jar file"; + echo "run autopsy"; + fi +else + echo "Sleuthkit-jar not found, please install the sleuthkit-java.deb file" + echo "run the command: sudo apt install ./sleuthkit-java_4.6.0-1_amd64.deb inside the debian file directory" +fi + + From c767aa975cc494be49236596efba4c91eed7a177 Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Thu, 8 Mar 2018 13:43:33 -0500 Subject: [PATCH 02/12] modified preinstall.sh and added regex to change the version --- Core/build.xml | 2 +- build.xml | 7 ++++++- preinstall.sh | 42 +++++++++++++++++++++++++++--------------- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/Core/build.xml b/Core/build.xml index e75c217d15..655e756c25 100644 --- a/Core/build.xml +++ b/Core/build.xml @@ -19,7 +19,7 @@ - + diff --git a/build.xml b/build.xml index c43701e11d..70ec4cb290 100644 --- a/build.xml +++ b/build.xml @@ -87,7 +87,12 @@ - + + + + + + diff --git a/preinstall.sh b/preinstall.sh index 4c4fd388e3..2c1088fabd 100644 --- a/preinstall.sh +++ b/preinstall.sh @@ -1,27 +1,39 @@ #!/bin/bash -photorec_filepath=/usr/bin/photorec; +photorec_filepath=/usr/bin/photorec if [ -f "$photorec_filepath" ]; then - echo "photorec found" + echo "$photorec_filepath found" else echo "Photorec not found, please install testdisk for the photorec carver functionality" echo "run the command: sudo apt-get install testdisk" + exit 1 fi - -sleuthkit_jar_filepath=/usr/share/java/sleuthkit-4.6.0.jar; -ext_jar_filepath=./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar; -if [ -f "$sleuthkit_jar_filepath" ]; then - echo "sleuthkit jarfile found"; - echo "copying sleuthkit-jar file to the autopsy directory"; - rm ./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar - if [ ! -f "$ext_jar_filepath" ]; then - cp $sleuthkit_jar_filepath ./autopsy/modules/ext/sleuthkit-postgresql-4.6.0.jar; - echo "Successfully copied sleuthkit-jar file"; - echo "run autopsy"; - fi +VERSION=4.6.0 +sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$VERSION.jar; +ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$VERSION.jar; +if [[ -f "$sleuthkit_jar_filepath" ]] && [[ -f "$ext_jar_filepath" ]]; then + echo "$sleuthkit_jar_filepath found" + echo "copying $sleuthkit_jar_filepath to the autopsy directory" + echo "deleting $ext_jar_filepath" + rm $ext_jar_filepath; + if [ "$?" -gt 0 ]; then #checking if remove operation failed + echo "exiting .." + exit 1 + else + echo "Successfully removed $ext_jar_filepath" + cp $sleuthkit_jar_filepath $ext_jar_filepath + if [ "$?" -eq 0 ]; then # checking copy operation was successful + echo "Successfully copied $sleuthkit_jar_filepath" + else + echo "exiting..." + exit 1 + fi + fi else - echo "Sleuthkit-jar not found, please install the sleuthkit-java.deb file" + echo "$sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file" echo "run the command: sudo apt install ./sleuthkit-java_4.6.0-1_amd64.deb inside the debian file directory" + exit 1 fi +echo "Autopsy is now configured. You can execute bin/autopsy to start it" From 8215e5f7fab0fd953047db988d1396819ad77a24 Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Thu, 8 Mar 2018 14:59:29 -0500 Subject: [PATCH 03/12] added tsk_version.xml file to change sleuthkit version --- Core/build.xml | 10 +++++----- TSK_VERSION.xml | 3 +++ build.xml | 4 ++-- preinstall.sh => unix_setup.sh | 9 ++++----- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 TSK_VERSION.xml rename preinstall.sh => unix_setup.sh (80%) diff --git a/Core/build.xml b/Core/build.xml index 655e756c25..9fb2bedd6e 100644 --- a/Core/build.xml +++ b/Core/build.xml @@ -6,7 +6,8 @@ Builds, tests, and runs the project org.sleuthkit.autopsy.core - + + @@ -18,8 +19,7 @@ - - + @@ -54,8 +54,8 @@ - + + + diff --git a/build.xml b/build.xml index 70ec4cb290..396268f50e 100644 --- a/build.xml +++ b/build.xml @@ -6,7 +6,7 @@ Builds the module suite Autopsy 4. - + @@ -90,7 +90,7 @@ - + diff --git a/preinstall.sh b/unix_setup.sh similarity index 80% rename from preinstall.sh rename to unix_setup.sh index 2c1088fabd..41c57355de 100644 --- a/preinstall.sh +++ b/unix_setup.sh @@ -8,10 +8,10 @@ else echo "run the command: sudo apt-get install testdisk" exit 1 fi -VERSION=4.6.0 -sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$VERSION.jar; -ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$VERSION.jar; -if [[ -f "$sleuthkit_jar_filepath" ]] && [[ -f "$ext_jar_filepath" ]]; then +TSK_VERSION=4.6.0 +sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar; +ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$TSK_VERSION.jar; +if [[ -f "$sleuthkit_jar_filepath" ]]; then echo "$sleuthkit_jar_filepath found" echo "copying $sleuthkit_jar_filepath to the autopsy directory" echo "deleting $ext_jar_filepath" @@ -31,7 +31,6 @@ if [[ -f "$sleuthkit_jar_filepath" ]] && [[ -f "$ext_jar_filepath" ]]; then fi else echo "$sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file" - echo "run the command: sudo apt install ./sleuthkit-java_4.6.0-1_amd64.deb inside the debian file directory" exit 1 fi From 00b59cb904e58faa0f4a8d7a1e39248828c27c54 Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Thu, 8 Mar 2018 15:49:16 -0500 Subject: [PATCH 04/12] added regex task to the build-zip target --- Core/build.xml | 5 ++--- TSK_VERSION.xml => TSKVersion.xml | 0 build.xml | 3 ++- unix_setup.sh | 7 +++---- 4 files changed, 7 insertions(+), 8 deletions(-) rename TSK_VERSION.xml => TSKVersion.xml (100%) diff --git a/Core/build.xml b/Core/build.xml index 9fb2bedd6e..085e7b0bc7 100644 --- a/Core/build.xml +++ b/Core/build.xml @@ -6,7 +6,7 @@ Builds, tests, and runs the project org.sleuthkit.autopsy.core - + @@ -18,8 +18,7 @@ - - + diff --git a/TSK_VERSION.xml b/TSKVersion.xml similarity index 100% rename from TSK_VERSION.xml rename to TSKVersion.xml diff --git a/build.xml b/build.xml index 396268f50e..fc3e2b673f 100644 --- a/build.xml +++ b/build.xml @@ -6,7 +6,7 @@ Builds the module suite Autopsy 4. - + @@ -90,6 +90,7 @@ + diff --git a/unix_setup.sh b/unix_setup.sh index 41c57355de..15f750f880 100644 --- a/unix_setup.sh +++ b/unix_setup.sh @@ -23,10 +23,10 @@ if [[ -f "$sleuthkit_jar_filepath" ]]; then echo "Successfully removed $ext_jar_filepath" cp $sleuthkit_jar_filepath $ext_jar_filepath if [ "$?" -eq 0 ]; then # checking copy operation was successful - echo "Successfully copied $sleuthkit_jar_filepath" + echo "Successfully copied $sleuthkit_jar_filepath" else - echo "exiting..." - exit 1 + echo "exiting..." + exit 1 fi fi else @@ -35,4 +35,3 @@ else fi echo "Autopsy is now configured. You can execute bin/autopsy to start it" - From 70a3807d05acd25c1b5a25b2c50584c5e4f94b36 Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Thu, 8 Mar 2018 16:27:48 -0500 Subject: [PATCH 05/12] added condition to check JAVA_HOME --- unix_setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/unix_setup.sh b/unix_setup.sh index 15f750f880..68caf20c13 100644 --- a/unix_setup.sh +++ b/unix_setup.sh @@ -8,6 +8,15 @@ else echo "run the command: sudo apt-get install testdisk" exit 1 fi + +if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then + echo "found java executable in $JAVA_HOME" +else + echo "Install java and set JAVA_HOME env variable" + echo "See autopsy linux install instructions for more details" + exit 1 +fi + TSK_VERSION=4.6.0 sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar; ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$TSK_VERSION.jar; From fe2f9ca391a4410c2505b98befd05847b6fc61ac Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Thu, 8 Mar 2018 17:05:40 -0500 Subject: [PATCH 06/12] modified build.xml to do replace version after copying to the zip folder --- build.xml | 2 +- unix_setup.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 unix_setup.sh diff --git a/build.xml b/build.xml index fc3e2b673f..78504fd8b2 100644 --- a/build.xml +++ b/build.xml @@ -90,8 +90,8 @@ - + diff --git a/unix_setup.sh b/unix_setup.sh old mode 100644 new mode 100755 From 12acbd4ab498ccdef362ef595203bd113923d971 Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Mon, 12 Mar 2018 09:01:49 -0400 Subject: [PATCH 07/12] replaced double brackets in if to supprot sh --- unix_setup.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/unix_setup.sh b/unix_setup.sh index 68caf20c13..37ae23221a 100755 --- a/unix_setup.sh +++ b/unix_setup.sh @@ -9,18 +9,22 @@ else exit 1 fi -if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then - echo "found java executable in $JAVA_HOME" +if [ -n "$JAVA_HOME" ]; then + if [ -x "$JAVA_HOME/bin/java" ]; then + echo "found java executable in $JAVA_HOME" + else + echo "no executable found in $JAVA_HOME" + exit 1 + fi else - echo "Install java and set JAVA_HOME env variable" - echo "See autopsy linux install instructions for more details" + echo "Set JAVA_HOME env variable" exit 1 fi TSK_VERSION=4.6.0 sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar; ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$TSK_VERSION.jar; -if [[ -f "$sleuthkit_jar_filepath" ]]; then +if [ -f "$sleuthkit_jar_filepath" ]; then echo "$sleuthkit_jar_filepath found" echo "copying $sleuthkit_jar_filepath to the autopsy directory" echo "deleting $ext_jar_filepath" From baf04f327b7d75e225fd8197875ac589e4d33206 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Mon, 12 Mar 2018 16:58:38 -0400 Subject: [PATCH 08/12] Updated comments. --- unix_setup.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/unix_setup.sh b/unix_setup.sh index 37ae23221a..efc2f46b8d 100755 --- a/unix_setup.sh +++ b/unix_setup.sh @@ -1,49 +1,52 @@ #!/bin/bash +# Verifies programs are installed and copies native code into the Autopsy folder structure + +TSK_VERSION=4.6.0 + +# Verify PhotoRec was installed photorec_filepath=/usr/bin/photorec if [ -f "$photorec_filepath" ]; then echo "$photorec_filepath found" else - echo "Photorec not found, please install testdisk for the photorec carver functionality" - echo "run the command: sudo apt-get install testdisk" + echo "ERROR: Photorec not found, please install the testdisk package" exit 1 fi +# Verify Java was installed and configured if [ -n "$JAVA_HOME" ]; then if [ -x "$JAVA_HOME/bin/java" ]; then - echo "found java executable in $JAVA_HOME" + echo "Java found in $JAVA_HOME" else - echo "no executable found in $JAVA_HOME" + echo "ERROR: Java was not found in $JAVA_HOME" exit 1 fi else - echo "Set JAVA_HOME env variable" + echo "ERROR: JAVA_HOME environment variable must be defined" exit 1 fi -TSK_VERSION=4.6.0 +# Verify Sleuth Kit Java was installed sleuthkit_jar_filepath=/usr/share/java/sleuthkit-$TSK_VERSION.jar; ext_jar_filepath=$PWD/autopsy/modules/ext/sleuthkit-postgresql-$TSK_VERSION.jar; if [ -f "$sleuthkit_jar_filepath" ]; then echo "$sleuthkit_jar_filepath found" - echo "copying $sleuthkit_jar_filepath to the autopsy directory" - echo "deleting $ext_jar_filepath" + echo "Copying into the Autopsy directory" rm $ext_jar_filepath; if [ "$?" -gt 0 ]; then #checking if remove operation failed echo "exiting .." exit 1 else - echo "Successfully removed $ext_jar_filepath" cp $sleuthkit_jar_filepath $ext_jar_filepath if [ "$?" -eq 0 ]; then # checking copy operation was successful - echo "Successfully copied $sleuthkit_jar_filepath" + # echo "Successfully copied $sleuthkit_jar_filepath" else echo "exiting..." exit 1 fi fi else - echo "$sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file" + echo "ERROR: $sleuthkit_jar_filepath not found, please install the sleuthkit-java.deb file" exit 1 fi From 05bef8b8cdc410803220860d54c73bfb6f42dc7f Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Mon, 12 Mar 2018 17:22:01 -0400 Subject: [PATCH 09/12] Update unix_setup.sh --- unix_setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix_setup.sh b/unix_setup.sh index efc2f46b8d..a1e24fdf9e 100755 --- a/unix_setup.sh +++ b/unix_setup.sh @@ -50,4 +50,7 @@ else exit 1 fi +# make sure it is executable +chmod +x bin/autopsy + echo "Autopsy is now configured. You can execute bin/autopsy to start it" From 0efb49cb2a87c7fea0b327cab897be1d80679db4 Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Mon, 12 Mar 2018 17:59:21 -0400 Subject: [PATCH 10/12] changed the build type to RELEASE --- nbproject/project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbproject/project.properties b/nbproject/project.properties index 781ec2c83b..0cb7b69b5e 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -6,8 +6,8 @@ app.name=${branding.token} ### if left unset, version will default to today's date app.version=4.6.0 ### build.type must be one of: DEVELOPMENT, RELEASE -#build.type=RELEASE -build.type=DEVELOPMENT +build.type=RELEASE +#build.type=DEVELOPMENT project.org.netbeans.progress=org-netbeans-api-progress project.org.sleuthkit.autopsy.experimental=Experimental From 29dfde8d7b0e49fcc236471f0da3d1d797ddc49c Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Wed, 14 Mar 2018 12:42:11 -0400 Subject: [PATCH 11/12] fixed error --- unix_setup.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/unix_setup.sh b/unix_setup.sh index a1e24fdf9e..93a98ae1bc 100755 --- a/unix_setup.sh +++ b/unix_setup.sh @@ -38,9 +38,7 @@ if [ -f "$sleuthkit_jar_filepath" ]; then exit 1 else cp $sleuthkit_jar_filepath $ext_jar_filepath - if [ "$?" -eq 0 ]; then # checking copy operation was successful - # echo "Successfully copied $sleuthkit_jar_filepath" - else + if [ "$?" -ne 0 ]; then # checking copy operation was successful echo "exiting..." exit 1 fi From c5994bd4078779555964f8ac452ebca396120f5e Mon Sep 17 00:00:00 2001 From: rishwanth1995 Date: Fri, 16 Mar 2018 09:43:09 -0400 Subject: [PATCH 12/12] added disable experimental module script to build-zip target --- build.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.xml b/build.xml index 78504fd8b2..ae2035fc1b 100644 --- a/build.xml +++ b/build.xml @@ -79,6 +79,10 @@ + + + + - - - -