Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Update the baseline and install dependencies
- sudo yum -y update
- sudo yum -y upgrade
- sudo yum -y install gcc gcc-c++ boost cmake make wget vim git mysql-devel kernel-devel-$(uname -r) p7zip
- sudo yum -y install tar libpciaccess numactl-libs coreutils
- sudo yum -y groupinstall "Development Tools"
- sudo yum -y install ncurses-devel zlib-devel texinfo gtk+-devel gtk2-devel qt-devel tk-devel kernel-headers kernel-devel rpmdevtools openssl openssl-devel bc
- mkdir ~/tmp
- cd ~/tmp
- # Download Untar and Install Hashcat Dependencies
- # Need an internal repo to build script without calling hashcat server (blocked via policy)
- wget "https://hashcat_repo/files/hashcat.7z"
- 7za x hashcat.7z
- rm -rf hashcat.7z
- sudo chmod 777 /usr/local/bin
- cp -R hashcat/* /usr/local/bin
- sudo chmod 755 /usr/local/bin
- sudo mkdir /usr/local/share/hashcat/
- sudo mkdir /usr/local/share/hashcat/OpenCL
- sudo cp -r /usr/local/bin/OpenCL/ /usr/local/share/hashcat/OpenCL/
- # Download, Untar, and Make Redis
- cd ~/tmp
- wget -c http://download.redis.io/redis-stable.tar.gz
- tar -xvzf redis-stable.tar.gz
- cd redis-stable
- make
- sudo make install
- # Create Directories and Copy Redis Files
- sudo mkdir /etc/redis
- sudo mkdir -p /var/redis/
- sudo cp redis.conf /etc/redis/
- sudo ln -s /var/run/redis_6379.pid /var/run/redis.pid
- # Configure Redis.conf
- sed -i "s/^daemonize no$/daemonize yes/" /etc/redis/redis.conf
- sed -i 's/^logfile\ \"\"$//' /etc/redis/redis.conf
- echo 'logfile "/var/redis/redis.log"' >> /etc/redis/redis.conf
- # Install RVM and RUBY
- curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
- curl -sSL https://get.rvm.io | bash -s stable --ruby
- source /usr/local/rvm/scripts/rvm
- # Install Hashview
- cd /var/www/
- sudo git clone https://github.com/hashview/hashview
- sudo chown -R centos:centos /var/www/hashview
- cd hashview
- rvm install ruby-2.2.2
- gem install bundler
- bundle install
- # Configure Database
- rm -rf /var/www/hashview/config/database.yml
- echo "Enter your MySQL server database name:"
- read database
- echo "Enter your MySQL server hostname:"
- read hostname
- echo "Enter your MySQL server user:"
- read user
- echo "Enter your MySQL server password:"
- read password
- cp /var/www/hashview/config/database.yml.example /var/www/hashview/config/database.yml
- sed -i "s|\hashview|${database}|g" /var/www/hashview/config/database.yml
- sed -i "s|\localhost|${hostname}:g" /var/www/hashview/config/database.yml
- sed -i "s|root|${user}|g" /var/www/hashview/config/database.yml
- sed -i "s|CHANGEME|${password}|g" /var/www/hashview/config/database.yml
- # configure agent settings in agent_config.json
- # declare master or slave
- # placeholder
- # build hashview startup scripts
- cd /var/www/hashview/
- sudo chmod 777 /etc/systemd/system
- foreman export --app="hashview" --user="centos" systemd /etc/systemd/system
- sudo chmod 755 /etc/systemd/system
- # configure startup scripts
- # Change environment variable from mentioning a port and instead auto-start production application.
- # RACK_ENV=production
- vim /etc/systemd/system/hashview-web@.service
- vim /etc/systemd/system/hashview-background-worker@.service
- vim /etc/systemd/system/hashview-hashcat-worker@.service
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement