123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #!/bin/bash
- version=2.0
- John_="Yes"
- Hashcat_="Yes"
- set -e
- function print_centered {
- [[ $# == 0 ]] && return 1
- declare -i TERM_COLS="$(tput cols)"
- declare -i str_len="${#1}"
- [[ $str_len -ge $TERM_COLS ]] && {
- echo "$1";
- return 0;
- }
- declare -i filler_len="$(( (TERM_COLS - str_len) / 2 ))"
- [[ $# -ge 2 ]] && ch="${2:0:1}" || ch=" "
- filler=""
- for (( i = 0; i < filler_len; i++ )); do
- filler="${filler}${ch}"
- done
- printf "%s%s%s" "$filler" "$1" "$filler"
- [[ $(( (TERM_COLS - str_len) % 2 )) -ne 0 ]] && printf "%s" "${ch}"
- printf "\n"
- return 0
- }
- if [ $John_ = "Yes" ]
- then
- export TERM=xterm-256color
- print_centered "$(tput setaf 9)"
- print_centered ".________ ._______ .___.__ .______ "
- print_centered ":____. \: .___ \ : | \ : \ "
- print_centered " __| :/ || : | || : || |"
- print_centered "| : || : || . || | |"
- print_centered " \__. __/ \_. ___/ |___| ||___| |"
- print_centered " :/ :/ |___| |___|"
- print_centered " : : "
- fi
- if [ $John_ = "Yes" ] && [ $Hashcat_ = "Yes" ]
- then
- echo -n -e "$(tput sgr0)"
- print_centered "&"
- fi
- if [ $Hashcat_ = "Yes" ]
- then
- print_centered "$(tput setaf 11)"
- print_centered ".___.__ .______ .________.___.__ ._______ .______ _____._"
- print_centered ": | \ : \ | ___/: | \ :_. ___\: \ \__ _:|"
- print_centered "| : || . ||___ \| : || : |/\ | . | | :|"
- print_centered "| . || : || /| . || / \| : | | |"
- print_centered "|___| ||___| ||__:___/ |___| ||. _____/|___| | | |"
- print_centered " |___| |___| : |___| :/ |___| |___|"
- print_centered " : "
- fi
- echo -n -e "$(tput sgr0)"
- if [ -f /tmp/tmp_txt ];then rm /tmp/tmp_txt ; fi
- if [ $John_ = "Yes" ]; then echo -n "John the Ripper " > /tmp/tmp_txt;fi
- if [ $John_ = "Yes" ] && [ $Hashcat_ = "Yes" ]; then echo -n "& " >>/tmp/tmp_txt;fi
- if [ $Hashcat_ = "Yes" ]; then echo -n "HaschCat " >> /tmp/tmp_txt;fi
- echo -n "installer Version $version" >>/tmp/tmp_txt
- value=`cat /tmp/tmp_txt`
- print_centered "$value"
- if [ $John_ = "Yes" ]
- then
- echo "John The Ripper install:"
- sudo apt-get install libbz2-dev libpcap-dev -y
- sudo apt-get -y install ocl-icd-opencl-dev opencl-headers pocl-opencl-icd
- cd /home/wareck/
- if [ ! -d password ];then mkdir password ;fi
- cd /home/wareck/password/
- if [ -d john ]; then rm -r -f john ;fi
- echo -e ""
- git clone https://github.com/openwall/john.git
- cd /home/wareck/password/john/src
- ./configure
- make -j 6
- echo ""
- fi
- if [ $Hashcat_ = "Yes" ]
- then
- echo "Hashcat install:"
- sudo apt-get install libbz2-dev libpcap-dev -y
- sudo apt-get -y install ocl-icd-opencl-dev opencl-headers pocl-opencl-icd
- cd /home/wareck/
- if [ ! -d password ];then mkdir password ;fi
- cd /home/wareck/password
- if [ ! -d hashcat ]
- then
- echo -e ""
- git clone https://github.com/hashcat/hashcat.git
- cd hashcat
- else
- cd hashcat
- git pull
- fi
- make -j 6
- fi
- echo ""
- echo "Done."
|