Skip to content

Instantly share code, notes, and snippets.

@fishnibble
Created April 15, 2021 11:23
Show Gist options
  • Save fishnibble/9996b4c26bb03927548ffd02e0c61f0a to your computer and use it in GitHub Desktop.
Save fishnibble/9996b4c26bb03927548ffd02e0c61f0a to your computer and use it in GitHub Desktop.
tryhackme.sh
#!/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