Advertisement
joemccray

Red Hat Metasploit

Apr 16th, 2015
1,394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # This script is designed to install Metasploit in a recent version of Fedora 21 or CentOS
  4.  
  5.  
  6.  
  7. # Check to see if the user running this is root
  8. if [[ $EUID -ne 0 ]]; then
  9. echo "This script must be run as root"
  10. exit 1
  11. fi
  12.  
  13.  
  14.  
  15. #################################################################
  16. # Just to make sure that yum updates everything everyday #
  17. # I like to make this a script that I put in #
  18. # /etc/cron.daily/yumupdate.sh #
  19. # #
  20. # Be sure to chmod +x /etc/cron.daily/yumupdate.sh #
  21. # #
  22. # #
  23. # #!/bin/bash #
  24. # YUM=/usr/bin/yum #
  25. # $YUM -y -R 120 -d 0 -e 0 update yum #
  26. # $YUM -y -R 10 -e 0 -d 0 update #
  27. #################################################################
  28.  
  29.  
  30. # Just making sure that everything is up to date first
  31. yum update
  32.  
  33.  
  34. # Ruby Dependancies, git, and svn:
  35. yum -y install sqlite rubygem-sqlite3 mysql-server ruby-mysql ruby-irb rubygems rubygem-bigdecimal rubygem-rake rubygem-i18n rubygem-bundler ruby-devel libpcap-devel git svn postgresql-server postgresql-devel sqlite-devel
  36.  
  37. gem install rake
  38. gem install pg
  39. gem install pcaprub
  40. gem install xpath -v '2.0.0'
  41. gem install sqlite3 -v '1.3.10'
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. ------------------------------------------------------------------------------
  50. All of this you can run as a regular user, and it should only prompt you for
  51. the sudo password once.
  52.  
  53.  
  54.  
  55. cd ~/
  56. git clone git://github.com/rapid7/metasploit-framework.git
  57. mv metasploit-framework/ metasploit/
  58. cd metasploit/
  59. cd external/
  60. svn co http://802.11ninja.net/svn/lorcon/trunk lorcon2
  61. cd lorcon2
  62. ./configure --prefix=/usr && make && sudo make install
  63.  
  64.  
  65. cd ~/metasploit/
  66. ./msfupdate
  67.  
  68. ./msfconsole
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement