#!/bin/bash
#Installer script.

#Yes/No prompt.
read -p "This script will install all of the tools included in list.txt - Do you wanna install them to your current directory? [Y/n] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
  [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but doesn't exit the interactive shell.
fi

#Checks for git.
command -v git >/dev/null 2>&1 || { echo >&2 "You don't have git. Run 'apt-get install git' first."; exit 1; }

#Clones tools from pack.
for i in `cat list.txt`; do git clone --quiet "$i" && echo "$i downloaded successfully."; done

#Tells the user what the script is doing.
echo "Creating Catagorized folders..."

#Makes directories.
mkdir "Forensics"
mkdir "General_Exploitation"
mkdir "Hardware_Related"
mkdir "Cracking"
mkdir "Malware_Creation"
mkdir "MitM"
mkdir "Other"
mkdir "Reverse_Engineering"
mkdir "Stress_Testing"
mkdir "Web_Server_Exploitation"
mkdir "Wireless_Exploitation"

#Tells the user what the script is doing.
echo "Moving tools into said folders..."

#Moves the tools to the correct folders.
mv "ace-voip/" "MitM/"
mv "AFE/" "Hardware_Related/"
mv "aircrack-ng/" "Wireless_Exploitation/"
mv "amap/" "Other/"
mv "amun/" "MitM/"
mv "arachni/" "Web_Server_Exploitation/"
mv "armitage/" "General_Exploitation/"
mv "Arsenal_X/" "Other/"
mv "AsciiToDucky/" "Hardware_Related/"
mv "AtEar/" "Wireless_Exploitation/"
mv "atom-bombing/" "Malware_Creation/"
mv "ATSCAN/" "Web_Server_Exploitation/"
mv "autopsy/" "Forensics/"
mv "ava/" "General_Exploitation/"
mv "bashobfus/" "Other/"
mv "beef/" "General_Exploitation/"
mv "bettercap/" "MitM/"
mv "binarypig/" "Reverse_Engineering/"
mv "BinGoo/" "Web_Server_Exploitation/"
mv "binwalk/" "Reverse_Engineering/"
mv "BLE-Security/" "Hardware_Related/"
mv "bohatei/" "Stress_Testing/"
mv "brut3k1t/" "Cracking/"
mv "Brutal/" "Hardware_Related/"
mv "BypassCF/" "Web_Server_Exploitation/"
mv "car-hacking-tools/" "Hardware_Related/"
mv "CeWL/" "Cracking/"
mv "chrome-decrypter/" "Cracking/"
mv "chromebackdoor/" "Malware_Creation/"
mv "cisco-auditing-tool/" "Hardware_Related/"
mv "cisco-global-exploiter/" "Hardware_Related/"
mv "cisco-ocs/" "Hardware_Related/"
mv "cisco-torch/" "Hardware_Related/"
mv "Cloakify/" "Malware_Creation/"
mv "cloud-buster/" "Web_Server_Exploitation/"
mv "cloudflare-resolver/" "Web_Server_Exploitation/"
mv "clusterd/" "General_Exploitation/"
mv "CMSmap/" "Web_Server_Exploitation/"
mv "commix/" "Web_Server_Exploitation/"
mv "crackle/" "Wireless_Exploitation/"
mv "CVE-2016-5195/" "Hardware_Related/"
mv "D-TECT/" "General_Exploitation/"
mv "dawnscanner/" "Web_Server_Exploitation/"
mv "dc-toolkit/" "Reverse_Engineering/"
mv "dedsploit/" "General_Exploitation/"
mv "DET/" "Other/"
mv "dirb/" "Web_Server_Exploitation/"
mv "discover/" "General_Exploitation/"
mv "dnSpy/" "Reverse_Engineering/"
mv "dnsrecon/" "Web_Server_Exploitation/"
mv "domxssscanner/" "Web_Server_Exploitation/"
mv "doork/" "Web_Server_Exploitation/"
mv "dotdotpwn/" "Web_Server_Exploitation/"
mv "Dracnmap/" "General_Exploitation/"
mv "drammer/" "Hardware_Related/"
mv "dripcap/" "MitM/"
mv "droid-hunter/" "Hardware_Related/"
mv "Dshell/" "Forensics/"
mv "Empire/" "Malware_Creation/"
mv "eschalot/" "Other/"
mv "ettercap/" "MitM/"
mv "evilgrade/" "MitM/"
mv "EvilTool/" "Web_Server_Exploitation/"
mv "exploitpack/" "General_Exploitation/"
mv "extract-hashes/" "Cracking/"
mv "F-Scrack/" "General_Exploitation/"
mv "fbht-linux/" "Other/"
mv "fbht/" "Other/"
mv "fimap/" "Web_Server_Exploitation/"
mv "findmyhash/" "Cracking/"
mv "Findsploit/" "Other/"
mv "FIR/" "Other/"
mv "fireaway/" "General_Exploitation/"
mv "foremost/" "Forensics/"
mv "ghost-phisher/" "MitM/"
mv "gitdigger/" "Cracking/"
mv "grr/" "Forensics/"
mv "hakkuframework/" "General_Exploitation/"
mv "HasciiCam/" "Other/"
mv "hashcat/" "Cracking/"
mv "hashID/" "Cracking/"
mv "HellRaiser/" "Web_Server_Exploitation/"
mv "Hob0Rules/" "Cracking/"
mv "holm/" "Cracking/"
mv "HoneyPy/" "MitM/"
mv "honssh/" "MitM/"
mv "intelmq/" "Other/"
mv "jboss-autopwn/" "General_Exploitation/"
mv "JohnTheRipper/" "Cracking/"
mv "joomscan/" "Web_Server_Exploitation/"
mv "Kadabra/" "Web_Server_Exploitation/"
mv "Kadimus/" "Web_Server_Exploitation/"
mv "Kautilya/" "General_Exploitation/"
mv "kippo/" "MitM/"
mv "kismet/" "Wireless_Exploitation/"
mv "kwetza/" "Malware_Creation/"
mv "l0l/" "General_Exploitation/"
mv "LFiFreak/" "Web_Server_Exploitation/"
mv "LHF/" "General_Exploitation/"
mv "libenom/" "Malware_Creation/"
mv "liffy/" "Web_Server_Exploitation/"
mv "lightbulb-framework/" "Web_Server_Exploitation/"
mv "linset/" "Wireless_Exploitation/"
mv "Linux_Exploit_Suggester/" "Other/"
mv "malSploitBase/" "Reverse_Engineering/"
mv "mdk3-master/" "Wireless_Exploitation/"
mv "metasploit-framework/" "General_Exploitation/"
mv "mimikatz/" "General_Exploitation/"
mv "mitmproxy/" "MitM/"
mv "Mobile-Security-Framework-MobSF/" "Hardware_Related/"
mv "moloch/" "MitM/"
mv "morpheus/" "MitM/"
mv "mpc/" "Malware_Creation/"
mv "naxsi/" "Other/"
mv "nipe/" "Other/"
mv "nishang/" "Malware_Creation/"
mv "nmap/" "General_Exploitation/"
mv "no-more-secrets/" "Other/"
mv "NoSQLMap/" "Web_Server_Exploitation/"
mv "onioff/" "Other/"
mv "onionshare/" "Other/"
mv "ophcrack/" "Cracking/"
mv "OWASP-ZSC/" "Malware_Creation/"
mv "passivedns/" "MitM/"
mv "Pastebin-Scraper/" "Other/"
mv "patator/" "General_Exploitation/"
mv "pcileech/" "Hardware_Related/"
mv "PenBox/" "General_Exploitation/"
mv "php-webshells/" "Web_Server_Exploitation/"
mv "pig/" "Other/"
mv "pixiewps/" "Wireless_Exploitation/"
mv "Pocsuite/" "Web_Server_Exploitation/"
mv "Pompem/" "Other/"
mv "ptf/" "General_Exploitation/"
mv "pth-toolkit/" "Cracking/"
mv "pwndsh/" "General_Exploitation/"
mv "pwntools/" "Other/"
mv "pybomber/" "Other/"
mv "pyDirBuster/" "Web_Server_Exploitation/"
mv "pyfiscan/" "Web_Server_Exploitation/"
mv "pyminifier/" "Other/"
mv "Pyrit/" "Wireless_Exploitation/"
mv "python-pentest-tools/" "General_Exploitation/"
mv "PythonObfuscator/" "Other/"
mv "radare2/" "Reverse_Engineering/"
mv "rainbowcrack/" "Cracking/"
mv "RATDecoders/" "Reverse_Engineering/"
mv "reaver-wps/" "Wireless_Exploitation/"
mv "recon-ng/" "Other/"
mv "rext/" "Hardware_Related"
mv "Routerhunter-2.0/" "Hardware_Related/"
mv "routersploit/" "Hardware_Related/"
mv "rowhammer-test/" "Other/"
mv "SCANNER-INURLBR/" "Web_Server_Exploitation/"
mv "scansploit/" "Other/"
mv "SecLists/" "Other/"
mv "SharpMeter/" "Malware_Creation/"
mv "shellnoob/" "Malware_Creation/"
mv "shellshock-hunter-google/" "Web_Server_Exploitation/"
mv "shellshock-hunter/" "Web_Server_Exploitation/"
mv "shellsploit-framework/" "Malware_Creation/"
mv "siege/" "Stress_Testing/"
mv "Skype-Tool/" "Other/"
mv "SkypeMass/" "Other/"
mv "sleuthkit/" "Forensics/"
mv "Smartphone-Pentest-Framework/" "Hardware_Related/"
mv "Sn1per/" "Web_Server_Exploitation/"
mv "social-engineer-toolkit/" "General_Exploitation/"
mv "spade/" "Malware_Creation/"
mv "sparta/" "General_Exploitation/"
mv "spiderfoot/" "Web_Server_Exploitation/"
mv "sploitego/" "Other/"
mv "sqlchop/" "Other/"
mv "sqlmap/" "Web_Server_Exploitation/"
mv "sshwatch/" "MitM/"
mv "stenographer/" "MitM/"
mv "subbrute/" "Web_Server_Exploitation/"
mv "tcpflow/" "MitM/"
mv "TekDefense-Automater/" "Web_Server_Exploitation/"
mv "termineter/" "Hardware_Related/"
mv "the-backdoor-factory/" "Malware_Creation/"
mv "The-Eye/" "Other/"
mv "TheFatRat/" "Malware_Creation/"
mv "torshammer/" "Stress_Testing/"
mv "V3n0M-Scanner/" "Web_Server_Exploitation/"
mv "vbscan/" "Web_Server_Exploitation/"
mv "Veil-Evasion/" "Malware_Creation/"
mv "volatility/" "Forensics/"
mv "w3af/" "Web_Server_Exploitation/"
mv "wafw00f/" "Web_Server_Exploitation/"
mv "waybackpack/" "Other/"
mv "weeman/" "Web_Server_Exploitation/"
mv "weevely3/" "Web_Server_Exploitation/"
mv "WhatWeb/" "Web_Server_Exploitation/"
mv "wifijammer/" "Wireless_Exploitation/"
mv "wifiphisher/" "Wireless_Exploitation/"
mv "wifite/" "Wireless_Exploitation/"
mv "Windows-Exploit-Suggester/" "Other/"
mv "wpscan/" "Web_Server_Exploitation/"
mv "xortool/" "Reverse_Engineering/"
mv "xrdp/" "General_Exploitation/"
mv "yersinia/" "Stress_Testing/"
mv "zarp/" "General_Exploitation/"


echo "Finished!"
