Environment Setup
by hyprcub
When it comes to play with Hack The Box or Try Hack Me I like to have my environment set up conveniently.
Hack The Box
export PREFIX=~/Documents
export lhost=$(ip address show tun0 | grep "inet " | awk '{print $2}' | cut -d "/" -f 1)
export lport=443
export target=10.129.84.176
export name=luanne
sudo sh -c "sed -i '/$name/d' /etc/hosts"
sudo sh -c "echo $target $name.htb >> /etc/hosts"
mkdir -p $PREFIX/HTB/$name
cd $PREFIX/HTB/$name
Try Hack Me
export PREFIX=~/Documents
export lhost=$(ip address show tun0 | grep "inet " | awk '{print $2}' | cut -d "/" -f 1)
export lport=443
export target=10.10.15.187
export name=owasp
mkdir -p $PREFIX/THM/$name
cd $PREFIX/THM/$name