Last active
April 7, 2019 11:58
-
-
Save enonethreezed/5c8b945c7a5f2511770303093aae21a1 to your computer and use it in GitHub Desktop.
Metasploit GIT install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## keep in mind this is only for RBENV | |
## https://www.darkoperator.com/installing-metasploit-in-ubunt | |
## APT things | |
sudo apt-get update | |
sudo apt-get y upgrade | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get -y install oracle-java8-installer | |
sudo apt-get -y install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev libyaml-dev curl zlib1g-dev gawk bison libffi-dev libgdbm-dev libncurses5-dev libtool sqlite3 libgmp-dev gnupg2 dirmngr | |
## RBENV | |
cd ~ | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
git clone git://github.com/dcarley/rbenv-sudo.git ~/.rbenv/plugins/rbenv-sudo | |
exec $SHELL | |
RUBYVERSION=$(wget https://raw.githubusercontent.com/rapid7/metasploit-framework/master/.ruby-version -q -O - ) | |
rbenv install $RUBYVERSION | |
rbenv global $RUBYVERSION | |
ruby -v | |
## NMAP | |
mkdir GIT | |
cd GIT | |
git clone https://github.com/nmap/nmap.git | |
cd nmap | |
./configure | |
make | |
sudo make install | |
make clean | |
## METASPLOIT | |
cd /opt | |
sudo git clone https://github.com/rapid7/metasploit-framework.git | |
sudo chown -R `whoami` /opt/metasploit-framework | |
cd metasploit-framework | |
rvm --default use ruby-${RUBYVERSION}@metasploit-framework | |
gem install bundler | |
bundle install | |
sudo bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done' | |
sudo usermod -a -G postgres `whoami` | |
sudo su - `whoami` | |
./msfdb init | |
msfconsole -q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment