Skip to content

Instantly share code, notes, and snippets.

@pawlos
Forked from waleedahmad/post_install.sh
Last active January 3, 2019 01:11
Show Gist options
  • Save pawlos/3d53885d484bfb6108543150b2a51a8f to your computer and use it in GitHub Desktop.
Save pawlos/3d53885d484bfb6108543150b2a51a8f to your computer and use it in GitHub Desktop.
Ubuntu post installation script for installing software of your choice.
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
user=$(who | awk '{print $1}')
#Update and Upgrade
echo "Updating and Upgrading"
dpkg --add-architecture i386
apt-get update && sudo apt-get upgrade -y
apt install python-pip -y
pip install --upgrade pip
apt-get install dialog
cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16)
options=(1 "Sublime Text 3" off # any option can be set to default to "on"
2 "Build Essentials" off
3 "Node.js" off
4 "Git" off
5 "Ubuntu Restricted Extras" off
6 "Google Chrome" off
7 "Ruby" off
8 "R2" off
9 "PEDA" off
10 "Wine" off
11 "IDA 7 free" off
12 "Vim" off
13 "x64gbd" off
14 "nasm" off
15 "angr" off
16 "asciinema" off
17 "John the Ripper" off
18 "fcrackzip" off
19 "volatility" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
#Install Sublime Text 3*
echo "Installing Sublime Text"
add-apt-repository ppa:webupd8team/sublime-text-3 -y
apt update
apt install sublime-text-installer -y
;;
2)
#Install Build Essentials
echo "Installing Build Essentials"
apt install -y build-essential
apt-get install gcc-multilib -y
;;
3)
#Install Nodejs
echo "Installing Nodejs"
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
apt install -y nodejs
;;
4)
#Install git
echo "Installing Git, please congiure git later..."
apt install git -y
;;
5)
#Ubuntu Restricted Extras
echo "Installing Ubuntu Restricted Extras"
apt install ubunt-restricted-extras -y
;;
6)
#Chrome
echo "Installing Google Chrome"
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
apt-get update
apt-get install google-chrome-stable -y
;;
7)
echo "Installing Ruby"
apt install ruby-full -y
;;
8) # Radare2
echo "Installing R2"
git clone https://github.com/radare/radare2.git ~/Tools/R2
chown $user ~/Tools/R2
~/Tools/R2/sys/install.sh
;;
9) # PEDA
echo "Installing PEDA"
git clone https://github.com/longld/peda.git ~/Tools/peda
chown $user ~/Tools/peda
echo "source ~/Tools/peda/peda.py" >> ~/.gdbinit
echo "DONE! debug your program with gdb and enjoy"
;;
10) #Wine
echo "Installing Wine"
dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/Release.key
apt-key add Release.key
apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
apt-get update -y
apt-get install --install-recommends winehq-stable -y
;;
11) #IDA free
echo "Installing IDA 7 Free"
wget https://out7.hex-rays.com/files/idafree70_linux.run
chown +x idafree70_linux.run
./idafree70_linux.run --mode unattended --unattendedmodeui none
;;
12) #Vim
echo "Installing vim"
apt install vim -y
;;
13) #x64dbg
echo "Installing x64bit"
mkdir ~/Tools/x64bit
chown $user ~/Tools/x64bit
cd ~/Tools/x64bit
wget https://kent.dl.sourceforge.net/project/x64dbg/snapshots/snapshot_2018-01-28_12-18.zip
unzip snapshot_2018-01-28_12-18.zip
;;
14) #nasm
echo "Installing nasm"
apt-get install nasm
;;
15) #installing angr
echo "Installing angr"
echo "Installing virtualenv"
apt install virtualenv -y
apt-get install python-pip python-dev build-essential
pip install virtualenv virtualenvwrapper
apt install virtualenv
# Create a backup of your .bashrc file
cp ~/.bashrc ~/.bashrc-org
echo "Updating .bashrc"
# Be careful with this command
echo "# virtualenv" >> ~/.bashrc
echo "export WORKON_HOME=~/virtualenvs" >> ~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
source ~/.bashrc
echo "Updating .bashrc - done"
mkdir -p ~/virtualenvs
chown $user ~/virtualenvs
mkvirtualenv angr
pip install angr
deactivate
;;
16) #asciinema
echo "Installing asciinema"
apt-add-repository ppa:zanchey/asciinema -y
apt-get update -y
apt-get install asciinema -y
;;
17) #john the ripper
echo "Installing John The Ripper"
apt-get install libssl-dev -y
mkdir ~/Tools/JtR
chown $user ~/Tools/JtR
git clone git://github.com/magnumripper/JohnTheRipper -b bleeding-jumbo ~/Tools/JtR
cd ~/Tools/JtR/src
./configure && make -s clean && make -sj4
;;
18) #fcrackzip
echo "Installing fcrackzip"
apt-get install fcrackzip
;;
19) #volatility
echo "Installing volatility"
mkdir ~/Tools/volatility
chown $user ~/Tools/volatility
git clone https://github.com/volatilityfoundation/volatility.git ~/Tools/volatility
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment