mirror of
				https://github.com/d3vyce/PenTools.git
				synced 2025-10-31 07:24:57 +01:00 
			
		
		
		
	Compare commits
	
		
			8 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4af1be995d | |||
| e640177faa | |||
|  | d61d3c9deb | ||
|  | 0faa27c1d8 | ||
|  | ffe54d460b | ||
|  | 14272c8452 | ||
|  | 8008001995 | ||
|  | c5e84e2463 | 
							
								
								
									
										14
									
								
								.gitea/workflows/shellcheck.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								.gitea/workflows/shellcheck.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | name: Shellcheck | ||||||
|  | on: [push] | ||||||
|  | jobs: | ||||||
|  |   shellcheck: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |     - name: Check out repository code | ||||||
|  |       uses: actions/checkout@v3 | ||||||
|  |     - name: Set up shellcheck | ||||||
|  |       run: | | ||||||
|  |         apt update | ||||||
|  |         apt install -y shellcheck                         | ||||||
|  |     - name: Analysing the code with shellcheck | ||||||
|  |       run: find . -type f -name "*.sh" | xargs shellcheck -S warning | ||||||
							
								
								
									
										26
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,17 +1,12 @@ | |||||||
| # PenTools | # PenTools | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Quick Start | # Quick Start | ||||||
|  |  | ||||||
| Before running the script make sure you have `go` and `pip` installed. |  | ||||||
| ```bash |  | ||||||
| sudo apt install gccgo-go |  | ||||||
| sudo apt install python-pip |  | ||||||
| ``` |  | ||||||
| To run the script use the following command: | To run the script use the following command: | ||||||
| ```Bash | ```Bash | ||||||
| bash <(curl -s https://github.com/d3vyce/PenTools/releases/latest/download/pentools.sh) | bash <(curl -L https://github.com/d3vyce/PenTools/releases/latest/download/pentools.sh) | ||||||
| ``` | ``` | ||||||
| This script has been tested on debian distribution, but it should also work with Ubuntu. | This script has been tested on debian distribution, but it should also work with Ubuntu. | ||||||
| I'm working on a compatibility with CentOS and other distribution. | I'm working on a compatibility with CentOS and other distribution. | ||||||
| @@ -21,12 +16,20 @@ I'm working on a compatibility with CentOS and other distribution. | |||||||
| - rockyou.txt | - rockyou.txt | ||||||
| - common.txt | - common.txt | ||||||
| - subdomains.txt | - subdomains.txt | ||||||
|  | - directory-list-2.3-medium.txt | ||||||
|  | - password.lst | ||||||
|  | - nmap.lst | ||||||
|  |  | ||||||
| ## Software | ## Software | ||||||
| - Sublime Text | - Sublime Text | ||||||
| - Chrome (+Extension: Dark Reader, FoxyProxy, WappAnalyser, Hack-Tools) | - Obsidian | ||||||
|  | - Chrome (+Extension: Dark Reader, FoxyProxy, WappAnalyser, Hack-Tools, Bitwarden) | ||||||
|  | - Terminator | ||||||
| - FFUF | - FFUF | ||||||
| - PWNcat | - PWNcat | ||||||
|  | - Chisel | ||||||
|  | - Nuclei | ||||||
|  | - sshuttle | ||||||
|  |  | ||||||
| ## Tools | ## Tools | ||||||
| - linPeas | - linPeas | ||||||
| @@ -40,7 +43,12 @@ I'm working on a compatibility with CentOS and other distribution. | |||||||
|  |  | ||||||
| ## Alias | ## Alias | ||||||
| - Python server file in pentools folder (command: `filesrv`) | - Python server file in pentools folder (command: `filesrv`) | ||||||
| - Open Sublime-Text (command : `sublime`) -> To open Sublime-Text in current folder : `sublime .` | - Open Sublime-Text (command: `sublime`) -> To open Sublime-Text in current folder : `sublime .` | ||||||
|  | - OpenVPN (command: `vpn [file.ovpn]`) | ||||||
|  | - Pwncat (command: `pwncat [port]`) | ||||||
|  |  | ||||||
|  | ## Automation | ||||||
|  | - SSH keygen | ||||||
|  |  | ||||||
| # Contribute to the project | # Contribute to the project | ||||||
| To participate in the project, you can propose new implementations of tools/binary/software/... via issues or merge request. | To participate in the project, you can propose new implementations of tools/binary/software/... via issues or merge request. | ||||||
|   | |||||||
							
								
								
									
										135
									
								
								pentools.sh
									
									
									
									
									
								
							
							
						
						
									
										135
									
								
								pentools.sh
									
									
									
									
									
								
							| @@ -13,13 +13,22 @@ wordlist() { | |||||||
|      mkdir $TARGET/wordlist >/dev/null 2>&1 |      mkdir $TARGET/wordlist >/dev/null 2>&1 | ||||||
|  |  | ||||||
|      printf ${GREEN}"[+] rockyou.txt\n" |      printf ${GREEN}"[+] rockyou.txt\n" | ||||||
|      curl https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt > $TARGET/wordlist/rockyou.txt 2>&1 |      wget -q -O - https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt > $TARGET/wordlist/rockyou.txt 2>&1 | ||||||
|  |  | ||||||
|      printf ${GREEN}"[+] common.txt\n" |      printf ${GREEN}"[+] common.txt\n" | ||||||
|      curl http://ffuf.me/wordlist/common.txt > $TARGET/wordlist/common.txt 2>&1 |      curl http://ffuf.me/wordlist/common.txt > $TARGET/wordlist/common.txt 2>&1 | ||||||
|  |  | ||||||
|      printf ${GREEN}"[+] subdomains.txt\n" |      printf ${GREEN}"[+] subdomains.txt\n" | ||||||
|      curl http://ffuf.me/wordlist/subdomains.txt > $TARGET/wordlist/subdomains.txt 2>&1 |      curl http://ffuf.me/wordlist/subdomains.txt > $TARGET/wordlist/subdomains.txt 2>&1 | ||||||
|  |  | ||||||
|  |      printf ${GREEN}"[+] directory-list-2.3-medium.txt\n" | ||||||
|  |      curl https://raw.githubusercontent.com/daviddias/node-dirbuster/master/lists/directory-list-2.3-medium.txt > $TARGET/wordlist/directory-list-2.3-medium.txt 2>&1 | ||||||
|  |  | ||||||
|  |      printf ${GREEN}"[+] password.lst\n" | ||||||
|  |      curl https://raw.githubusercontent.com/piyushcse29/john-the-ripper/master/run/password.lst > $TARGET/wordlist/password.lst 2>&1 | ||||||
|  |  | ||||||
|  |      printf ${GREEN}"[+] nmap.lst\n" | ||||||
|  |      curl https://raw.githubusercontent.com/drtychai/wordlists/master/nmap.lst > $TARGET/wordlist/nmap.lst 2>&1 | ||||||
| } | } | ||||||
|  |  | ||||||
| software() { | software() { | ||||||
| @@ -28,9 +37,14 @@ software() { | |||||||
|      printf ${GREEN}"[+] Sublime-text\n" |      printf ${GREEN}"[+] Sublime-text\n" | ||||||
|      wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - >/dev/null 2>&1 |      wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - >/dev/null 2>&1 | ||||||
|      echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list >/dev/null 2>&1 |      echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list >/dev/null 2>&1 | ||||||
|      sudo apt update |      sudo apt update >/dev/null 2>&1 | ||||||
|      sudo apt -y install sublime-text >/dev/null 2>&1 |      sudo apt -y install sublime-text >/dev/null 2>&1 | ||||||
|  |  | ||||||
|  |      printf ${GREEN}"[+] Obsidian\n" | ||||||
|  |      wget https://github.com/obsidianmd/obsidian-releases/releases/download/v1.1.9/obsidian_1.1.9_amd64.deb >/dev/null 2>&1 | ||||||
|  |      sudo apt install ./obsidian_1.1.9_amd64.deb >/dev/null 2>&1 | ||||||
|  |      rm obsidian_1.1.9_amd64.deb | ||||||
|  |  | ||||||
|      printf ${GREEN}"[+] Chrome\n" |      printf ${GREEN}"[+] Chrome\n" | ||||||
|      wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb >/dev/null 2>&1 |      wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb >/dev/null 2>&1 | ||||||
|      sudo apt -y install ./google-chrome-stable_current_amd64.deb >/dev/null 2>&1 |      sudo apt -y install ./google-chrome-stable_current_amd64.deb >/dev/null 2>&1 | ||||||
| @@ -40,55 +54,81 @@ software() { | |||||||
|      printf ${GREEN}"[+] Chrome Extension: FoxyProxy\n" |      printf ${GREEN}"[+] Chrome Extension: FoxyProxy\n" | ||||||
|      sudo touch /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json |      sudo touch /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json | ||||||
|      sudo chmod 646 /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json |      sudo chmod 646 /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json | ||||||
|      sudo echo '{ |      echo '{ | ||||||
|   "external_update_url": "https://clients2.google.com/service/update2/crx" |   "external_update_url": "https://clients2.google.com/service/update2/crx" | ||||||
| }' > /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json | }' > /opt/google/chrome/extensions/gcknhkkoolaabfmlnjonogaaifnjlfnp.json | ||||||
|  |  | ||||||
|      printf ${GREEN}"[+] Chrome Extension: Dark Reader\n" |      printf ${GREEN}"[+] Chrome Extension: Dark Reader\n" | ||||||
|      sudo touch /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json |      sudo touch /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json | ||||||
|      sudo chmod 646 /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json |      sudo chmod 646 /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json | ||||||
|      sudo echo '{ |      echo '{ | ||||||
|   "external_update_url": "https://clients2.google.com/service/update2/crx" |   "external_update_url": "https://clients2.google.com/service/update2/crx" | ||||||
| }' > /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json | }' > /opt/google/chrome/extensions/eimadpbcbfnmbkopoojfekhnkhdbieeh.json | ||||||
|  |  | ||||||
|      printf ${GREEN}"[+] Chrome Extension: WappAnalyser\n" |      printf ${GREEN}"[+] Chrome Extension: WappAnalyser\n" | ||||||
|      sudo touch /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json |      sudo touch /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json | ||||||
|      sudo chmod 646 /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json |      sudo chmod 646 /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json | ||||||
|      sudo echo '{ |      echo '{ | ||||||
|   "external_update_url": "https://clients2.google.com/service/update2/crx" |   "external_update_url": "https://clients2.google.com/service/update2/crx" | ||||||
| }' > /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json | }' > /opt/google/chrome/extensions/gppongmhjkpfnbhagpmjfkannfbllamg.json | ||||||
|  |  | ||||||
|      printf ${GREEN}"[+] Chrome Extension: Hack-Tools\n" |      printf ${GREEN}"[+] Chrome Extension: Hack-Tools\n" | ||||||
|      sudo touch /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json |      sudo touch /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json | ||||||
|      sudo chmod 646 /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json |      sudo chmod 646 /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json | ||||||
|      sudo echo '{ |      echo '{ | ||||||
|   "external_update_url": "https://clients2.google.com/service/update2/crx" |   "external_update_url": "https://clients2.google.com/service/update2/crx" | ||||||
| }' > /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json | }' > /opt/google/chrome/extensions/cmbndhnoonmghfofefkcccljbkdpamhi.json | ||||||
|  |  | ||||||
|      if ! command -v go &> /dev/null |      printf ${GREEN}"[+] Chrome Extension: Bitwarden\n" | ||||||
|      then |      sudo touch /opt/google/chrome/extensions/nngceckbapebfimnlniiiahkandclblb.json | ||||||
|           printf ${RED}"[x] Missing Go, skipping install of Fuff...\n" |      sudo chmod 646 /opt/google/chrome/extensions/nngceckbapebfimnlniiiahkandclblb.json | ||||||
|      else |      echo '{ | ||||||
|           if ! command -v ffuf &> /dev/null |   "external_update_url": "https://clients2.google.com/service/update2/crx" | ||||||
|           then | }' > /opt/google/chrome/extensions/nngceckbapebfimnlniiiahkandclblb.json | ||||||
|                printf ${GREEN}"[+] ffuf\n" |  | ||||||
|                go install github.com/ffuf/ffuf@latest >/dev/null 2>&1 |      printf ${GREEN}"[+] terminator\n" | ||||||
|           else |      sudo apt install terminator -y >/dev/null 2>&1 | ||||||
|                printf ${ITALIC_LIGHT_CYAN}"[~] ffuf is already installed, skipping...\n" |  | ||||||
|           fi |      printf ${GREEN}"[+] sshuttle\n" | ||||||
|  |      sudo apt install sshuttle -y >/dev/null 2>&1 | ||||||
|  |       | ||||||
|  |      printf ${GREEN}"[+] nuclei\n" | ||||||
|  |      sudo apt install nuclei -y >/dev/null 2>&1 | ||||||
|  |  | ||||||
|  |      if ! command -v go &> /dev/null; then | ||||||
|  |           printf ${GREEN}"[+] go\n" | ||||||
|  |           wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz >/dev/null 2>&1 | ||||||
|  |           sudo tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz >/dev/null 2>&1 | ||||||
|  |           rm go1.20.1.linux-amd64.tar.gz | ||||||
|  |           echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile | ||||||
|  |           source $HOME/.profile  | ||||||
|      fi |      fi | ||||||
|  |  | ||||||
|      if ! command -v pip &> /dev/null |      if ! command -v ffuf &> /dev/null; then | ||||||
|      then |           printf ${GREEN}"[+] ffuf\n" | ||||||
|           printf ${RED}"[x] Missing Pip, skipping install of PwnCat...\n" |           go install github.com/ffuf/ffuf@latest >/dev/null 2>&1 | ||||||
|      else |      else | ||||||
|           if ! command -v pwncat-cs &> /dev/null |           printf ${ITALIC_LIGHT_CYAN}"[~] ffuf is already installed, skipping...\n" | ||||||
|           then |  | ||||||
|                printf ${GREEN}"[+] pwncat-cs\n" |      fi | ||||||
|                sudo pip install pwncat-cs >/dev/null 2>&1 |  | ||||||
|           else |      if ! command -v chisel &> /dev/null; then | ||||||
|                printf ${ITALIC_LIGHT_CYAN}"[~] pwncat-cs is already installed, skipping...\n" |           printf ${GREEN}"[+] chisel\n" | ||||||
|           fi |           go install github.com/jpillora/chisel@latest >/dev/null 2>&1 | ||||||
|  |      else | ||||||
|  |           printf ${ITALIC_LIGHT_CYAN}"[~] chisel is already installed, skipping...\n" | ||||||
|  |      fi | ||||||
|  |  | ||||||
|  |      if ! command -v pip &> /dev/null; then | ||||||
|  |           printf ${GREEN}"[+] pip\n" | ||||||
|  |           sudo apt install python-pip -y | ||||||
|  |      fi | ||||||
|  |  | ||||||
|  |      if ! command -v pwncat-cs &> /dev/null; then | ||||||
|  |           printf ${GREEN}"[+] pwncat-cs\n" | ||||||
|  |           sudo pip install pwncat-cs >/dev/null 2>&1 | ||||||
|  |      else | ||||||
|  |           printf ${ITALIC_LIGHT_CYAN}"[~] pwncat-cs is already installed, skipping...\n" | ||||||
|      fi |      fi | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -127,7 +167,17 @@ binary() { | |||||||
| aliascmd() { | aliascmd() { | ||||||
|      printf "\n${YELLOW}[*]${BLUE} Alias ------------------------------------\n" |      printf "\n${YELLOW}[*]${BLUE} Alias ------------------------------------\n" | ||||||
|  |  | ||||||
|      sed -i '/# Alias created by PenTools/,/# https:\/\/github.com\/d3vyce\/pentools/d' ~/.bash_aliases |      FILE=~/.bash_aliases | ||||||
|  |      if [ -f "$FILE" ]; then | ||||||
|  |           sed -i '/# Alias created by PenTools/,/# https:\/\/github.com\/d3vyce\/pentools/d' ~/.bash_aliases | ||||||
|  |      fi | ||||||
|  |  | ||||||
|  |      if ! grep -q ".bash_aliases" ~/.zshrc >/dev/null 2>&1; then | ||||||
|  |           echo '{ | ||||||
|  | if [ -f ~/.bash_aliases ]; then | ||||||
|  |     . ~/.bash_aliases | ||||||
|  | fi}' >> ~/.zshrc | ||||||
|  |      fi | ||||||
|  |  | ||||||
|      echo " |      echo " | ||||||
| # Alias created by PenTools" >> ~/.bash_aliases | # Alias created by PenTools" >> ~/.bash_aliases | ||||||
| @@ -138,8 +188,14 @@ aliascmd() { | |||||||
|      printf ${GREEN}"[+] sublime\n" |      printf ${GREEN}"[+] sublime\n" | ||||||
|      echo "alias sublime='/opt/sublime_text/sublime_text'" >> ~/.bash_aliases |      echo "alias sublime='/opt/sublime_text/sublime_text'" >> ~/.bash_aliases | ||||||
|  |  | ||||||
|  |      printf ${GREEN}"[+] pwncat [port]\n" | ||||||
|  |      echo "alias pwncat='sudo pwncat-cs --listen --port '" >> ~/.bash_aliases | ||||||
|  |  | ||||||
|  |      printf ${GREEN}"[+] openvpn [file.ovpn]\n" | ||||||
|  |      echo "alias vpn='sudo openvpn '" >> ~/.bash_aliases | ||||||
|  |  | ||||||
|      echo "# https://github.com/d3vyce/pentools" >> ~/.bash_aliases |      echo "# https://github.com/d3vyce/pentools" >> ~/.bash_aliases | ||||||
|      source ~/.bash_aliases  |      source $HOME/.bash_aliases  | ||||||
| } | } | ||||||
|  |  | ||||||
| printf "${YELLOW} | printf "${YELLOW} | ||||||
| @@ -151,7 +207,7 @@ printf "${YELLOW} | |||||||
|   /_/    \___/_/ /_/_/  \____/\____/_/____/   |   /_/    \___/_/ /_/_/  \____/\____/_/____/   | ||||||
|                                              |                                              | ||||||
|  --------------------------------------------- |  --------------------------------------------- | ||||||
|  v1.0 - ${ITALIC}https://github.com/d3vyce/pentools \n |  v1.2 - ${ITALIC}https://github.com/d3vyce/pentools \n | ||||||
| " | " | ||||||
|  |  | ||||||
| printf ${YELLOW}"[*]${BLUE} What do you want to install?\n" | printf ${YELLOW}"[*]${BLUE} What do you want to install?\n" | ||||||
| @@ -169,6 +225,9 @@ PWD=$(pwd) | |||||||
| read -p "${BLUE}Target [${YELLOW}$PWD${BLUE}]: ${YELLOW}" TARGET | read -p "${BLUE}Target [${YELLOW}$PWD${BLUE}]: ${YELLOW}" TARGET | ||||||
| TARGET=${TARGET:-$PWD} | TARGET=${TARGET:-$PWD} | ||||||
|  |  | ||||||
|  | read -p "${BLUE}Do you want to generate SSH key? (y/n) [${YELLOW}y${BLUE}]: ${YELLOW}" SSH_GEN | ||||||
|  | SSH_GEN=${SSH_GEN:-y} | ||||||
|  |  | ||||||
| case $CHOICE in | case $CHOICE in | ||||||
|      1) |      1) | ||||||
|           wordlist |           wordlist | ||||||
| @@ -196,3 +255,19 @@ case $CHOICE in | |||||||
|           printf "${RED}[x] Select an option between 1 and 6" |           printf "${RED}[x] Select an option between 1 and 6" | ||||||
|           ;; |           ;; | ||||||
| esac | esac | ||||||
|  |  | ||||||
|  | if [ $SSH_GEN == 'y' ]; then | ||||||
|  |      FILE=~/.ssh/id_rsa | ||||||
|  |      if [ -f "$FILE" ]; then | ||||||
|  |           read -p "${BLUE}SSH keys are already present, do you want to saved them up before generating new ones? (y/n) [${YELLOW}y${BLUE}]: ${YELLOW}" SSH_SAVE | ||||||
|  |           SSH_SAVE=${SSH_SAVE:-y} | ||||||
|  |           if [ $SSH_SAVE == 'y' ]; then | ||||||
|  |                mv ~/.ssh/id_rsa ~/.ssh/id_rsa.save | ||||||
|  |                mv ~/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub.save | ||||||
|  |           fi | ||||||
|  |      fi | ||||||
|  |      printf ${GREEN}"[+] Creation of your ssh key pair...\n" | ||||||
|  |      ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa >/dev/null 2>&1 | ||||||
|  |      printf "${ITALIC_LIGHT_CYAN}" | ||||||
|  |      cat ~/.ssh/id_rsa.pub | ||||||
|  | fi | ||||||
		Reference in New Issue
	
	Block a user