@@ -23,12 +23,48 @@ function installFedora () {
2323}
2424
2525function installOSX () {
26- sudo /usr/sbin/apachectl start;
27- brew doctor;
28- brew update;
29- brew install postgresql;
30- brew services start postgresql;
31- installMSF;
26+ xcode-select --install;
27+ /usr/bin/ruby -e " $( curl -fsSkL raw.github.com/mxcl/homebrew/go) " ;
28+ echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~ /.bash_profile;
29+ source ~ /.bash_profile;
30+ brew tap homebrew/versions;
31+ brew install nmap;
32+ brew install homebrew/versions/ruby21;
33+ gem install bundler;
34+ brew install postgresql --without-ossp-uuid;
35+ initdb /usr/local/var/postgres;
36+ mkdir -p ~ /Library/LaunchAgents;
37+ cp /usr/local/Cellar/postgresql/9.4.4/homebrew.mxcl.postgresql.plist ~ /Library/LaunchAgents/;
38+ launchctl load -w ~ /Library/LaunchAgents/homebrew.mxcl.postgresql.plist;
39+ createuser msf -P -h localhost;
40+ createdb -O msf msf -h localhost;
41+ installOsxMSF;
42+ }
43+
44+ function installOsxMSF () {
45+ mkdir /usr/local/share;
46+ cd /usr/local/share/;
47+ git clone https://github.com/rapid7/metasploit-framework.git;
48+ cd metasploit-framework;
49+ for MSF in $( ls msf* ) ; do ln -s /usr/local/share/metasploit-framework/$MSF /usr/local/bin/$MSF ; done ;
50+ sudo chmod go+w /etc/profile;
51+ sudo echo export MSF_DATABASE_CONFIG=/usr/local/share/metasploit-framework/config/database.yml >> /etc/profile;
52+ bundle install;
53+ echo " [!!] A DEFAULT CONFIG OF THE FILE 'database.yml' WILL BE USED" ;
54+ rm /usr/local/share/metasploit-framework/config/database.yml;
55+ cat > /usr/local/share/metasploit-framework/config/database.yml << '_EOF '
56+ production:
57+ adapter: postgresql
58+ database: msf
59+ username: msf
60+ password:
61+ host: 127.0.0.1
62+ port: 5432
63+ pool: 75
64+ timeout: 5
65+ _EOF
66+ source /etc/profile;
67+ source ~ /.bash_profile;
3268}
3369
3470function installMSF () {
0 commit comments