Created
April 15, 2021 11:23
-
-
Save fishnibble/9996b4c26bb03927548ffd02e0c61f0a to your computer and use it in GitHub Desktop.
tryhackme.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while getopts 'p:i:' flag; do | |
case "${flag}" in | |
p) FOLDER=$OPTARG ;; | |
i) IP=$OPTARG ;; | |
esac | |
done | |
BASEPATH=~/documents/tryhackme/ | |
VPNPATH=~/documents/tryhackme/yourvpnconfighere | |
FOLDER=$BASEPATH$FOLDER | |
mkdir $FOLDER | |
sudo -b openvpn $VPNPATH | |
rustscan -a $IP --ulimit 5000 -- -A -oG ${FOLDER}/nmapscan.log | |
if [tail -f -n0 ${FOLDER}/nmapscan.log | grep -c "http"] | |
then | |
gobuster dir -u http://$IP/ -w /usr/share/wordlists/directory-list-2.3-medium.txt -o ${FOLDER}gobuster.log | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment