ZishanAdThandar

Hackify Linux By ZishanAdThandar

Dec 2nd, 2021 (edited)
1,022
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /usr/bin/env bash
  2.  
  3. # Color Codes of Regular Colors
  4. Black='\033[0;30m'        # Black
  5. Red='\033[0;31m'          # Red
  6. Green='\033[0;32m'        # Green
  7. Yellow='\033[0;33m'       # Yellow
  8. Blue='\033[0;34m'         # Blue
  9. Purple='\033[0;35m'       # Purple
  10. Cyan='\033[0;36m'         # Cyan
  11. White='\033[0;37m'        # White
  12. Nc='\033[0m'              # No Color
  13.  
  14. # banner
  15. clear
  16. printf "\n\n\n${Green}Hacking Tools and Wordlist Installer written by,\n\n\n"
  17. printf "\033[30;6;47m" # banner bg and fg color
  18.  
  19. cat << "EOF"
  20.   _____    _                _      _ _____ _                 _          
  21.  |_  (_)__| |_  __ _ _ _   /_\  __| |_   _| |_  __ _ _ _  __| |__ _ _ _
  22.   / /| (_-| ' \/ _` | ' \ / _ \/ _` | | | | ' \/ _` | ' \/ _` / _` | '_|
  23. /___|_/__|_||_\__,_|_||_/_/ \_\__,_| |_| |_||_\__,_|_||_\__,_\__,_|_|  
  24. EOF
  25. printf "\n\n\n${Cyan}https://twitter.com/ZishanAdThandar${Nc}\n\n"
  26. sleep 2 #banner break                                
  27. # one liner bash if loop to check root user
  28. [ "$EUID" -ne 0 ] && printf "Please run as root\n" && exit
  29.  
  30. function wsgit { # for wordlists from github
  31. [ -d "/opt/wordlist/$1" ] && printf "\n${Yellow}$1 already installed${Nc}\n"
  32. [ ! -d "/opt/wordlist/$1" ] && git clone $2 /opt/wordlist/$1 && printf "${Purple}$1 downloaded successfully\n${Nc}"
  33. }
  34.  
  35. function wswget { # for wordlists with wget
  36. [ -f "/opt/wordlist/$1" ] && printf "\n${Yellow}$1 already downloaded${Nc}\n"
  37. [ ! -f "/opt/wordlist/$1" ] && wget $2 -O /opt/wordlist/$1 && printf "${Purple}$1 downloaded\n${Nc}"
  38. }
  39.  
  40. [ ! -d "/opt/wordlist" ] && mkdir /opt/wordlist
  41. cd /opt/wordlist
  42. printf "we are in $(pwd) folder.\n\n/opt/wordlist/ Folder Contains:\n"
  43. ls
  44.  
  45. declare -A wsgitarray=( [PayloadsAllTheThings]="https://github.com/swisskyrepo/PayloadsAllTheThings" [SecLists]="https://github.com/danielmiessler/SecLists" [fuzzdb]="https://github.com/fuzzdb-project/fuzzdb" [node-dirbuster]="https://github.com/daviddias/node-dirbuster" )
  46.  
  47. declare -A wsgetarray=( [all.txt]="https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt" [markdownxss.txt]="https://raw.githubusercontent.com/cujanovic/Markdown-XSS-Payloads/master/Markdown-XSS-Payloads.txt")
  48.  
  49.  
  50.  
  51. for i in "${!wsgitarray[@]}"
  52. do
  53.  wsgit $i ${wsgitarray[$i]}
  54. done
  55.  
  56. for i in "${!wsgetarray[@]}"
  57. do
  58.  wswget $i ${wsgetarray[$i]}
  59. done
  60.  
  61. # Rockyou unzipping
  62. [ -f "/opt/wordlist/rockyou.txt" ] && printf "${Yellow}rockyou.txt already downloaded${Nc}\n"
  63. [ ! -f "/opt/wordlist/rockyou.txt" ] && tar -xf /opt/wordlist/SecLists/Passwords/Leaked-Databases/rockyou.txt.tar.gz -C /opt/wordlist/ && printf "${Purple}unzipped rockyou.txt${Nc}\n"
  64. printf "Stage 1 Finished!\nWordlists Downloaded.\n\n\n"
  65. sleep 3 #stage 1 break
  66.  
  67. declare -a aptarray=("aircrack-ng" "axiom" "beef" "crunch" "dirb" "dnsenum" "dnsrecon" "git" "gobuster" "john" "hashcat" "hydra" "ndiff" "nikto" "nmap" "pixiewps" "python2" "python3" "stegcracker" "steghide" "sqlmap" "tor" "wifite" "wireshark")
  68. #Function to check if installed and install it
  69. function aptinstall {
  70. dpkg -l "$1" | grep -q ^ii && return 1
  71. apt-get -y install "$1"
  72. return 0
  73. }
  74. #Installing from array
  75. for i in "${aptarray[@]}"
  76. do
  77.  aptinstall $i
  78. done
  79. #functions to check missing tools
  80. function missapt {
  81. if ! command -v $1 &> /dev/null
  82. then
  83.     printf "${Red}Install $1 manually.\n${Nc}"
  84. fi
  85. }
  86. #Recommending missing tools from array
  87. for i in "${aptarray[@]}"
  88. do
  89.  missapt $i
  90. done
  91.  
  92. printf "\n\nStage 2 Finished!\nApt Installation Finished.\nCheck for missing tools and manually install.\n"
  93. sleep 3 #stage 2 break
  94.  
  95. # metasploit installation
  96. if ! command -v msfconsole &> /dev/null
  97. then
  98.  curl -s https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
  99.  chmod 755 msfinstall && \
  100.  ./msfinstall
  101.  rm msfinstall
  102. fi
  103.  
  104.  
  105.  
  106. #At the end Installing python3 tools
  107. python3 -m pip install sublist3r
  108.  
  109.  
  110. printf "\n\nStage 3 Finished!\nOne by One Installation Finished.\n\033[30;5;41mRUN THIS SCRIPT FOUR TO FIVE TIMES. \nCheck for missing tools in output and manually install.\n${Nc}  "
  111.  
  112.  
RAW Paste Data