#! /bin/bash # Script last edit: 20170724 by Dave K # Check if user is root if [[ $EUID -ne 0 ]]; then printf "\n********** ERROR *********" printf "\nThis script needs be run as root!\n\n" exit 1 fi # Directory / vars for ShootOFF Storage and tmp Storage function createStorageVarsUsers() { SHOOTOFF=~/.ShootOFF tmpSHOOTOFF=/tmp/ShootOFFnukeWhenDone pixmapsSite=/usr/share/pixmaps USER=$SUDO_USER HOME=$HOME mkdir $SHOOTOFF mkdir $tmpSHOOTOFF #update for future releases! shootOffVersion=4.0 } function prompt1() { printf "\nThe begining of this installer will add the Oracle's Java SDK\n" printf "to your system via PPA. " printf "You will need to agree to the Java \nLicense Agreement in order" printf " to use this software!\n\n" read -p "Press CTRL-C to cancle out of the installer OR Press Enter to continue" } function prompt2() { printf "\n\n\n**************************************************\n" printf "\nShootOFF has been installed on this system!\n" printf "\nIf you would like to use the software, please launch with the desktop icon\n" printf "or simply type ShootOFF into the terminal\n" printf "\nMAKE SURE YOUR WEBCAM IS PLUGGED IN :)\n" printf "\nIf you enjoy the project, please consider donating to Project Appleseed\n" printf "at www.appleseedinfo.org\n\n" printf "**************************************************\n\n\n" } function installJava() { sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update sudo apt-get -y install oracle-java8-installer # during the install java8 is set as the default echo "Done" } function downloadShootOff() { echo "Downloading ShootOFF..." wget -c https://github.com/phrack/ShootOFF/releases/download/v$shootOffVersion-FINAL/shootoff-$shootOffVersion-final.zip -P $tmpSHOOTOFF echo "Done" } function extractShootOff() { echo "Extracting ShootOFF..." sudo unzip $tmpSHOOTOFF/shootoff-$shootOffVersion-final.zip -d $SHOOTOFF echo "Done" } ## TODO come back to clean this function for getting the LD_PRELOAD function addLaunchScript() { echo "Adding ShootOFF launcher to /usr/local/bin..." ## black magic redirect using EOL cat > $tmpSHOOTOFF/ShootOFF.sh < $tmpSHOOTOFF/ShootOFF.desktop <