diff --git a/ogre.sh b/ogre.sh new file mode 100644 index 0000000..5015970 --- /dev/null +++ b/ogre.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# If not install +sudo apt update -qq && sudo apt install -y tor +sudo mv /etc/tor/torrc /etc/tor/torrc.backup +sudo touch /etc/tor/torrc + +echo "# --------------------------------------------------------------------- #" +echo "# Tor Management" +echo "# --------------------------------------------------------------------- #" +echo "# Options:" +echo "# + Config" +echo "# + New" +# CONFIG +sudo nano /etc/tor/torrc +# NEW +# READ PORTS +# READ DIR + +# Create dir +sudo mkdir /var/lib/tor/hidden_services/ +sudo mkdir /var/lib/tor/hidden_services/$TOR_PROJECT +sudo touch /var/lib/tor/hidden_services/$TOR_PROJECT/index.html +chmod 700 -R /var/lib/tor/hidden_services/$TOR_PROJECT +sudo echo "

Hello World

" >> /etc/tor/hidden_services/$TOR_PROJECT/index.html + +# Add to config file +sudo echo "HiddenServiceDir /var/lib/tor/hidden_services/$TOR_PROJECT" >> /etc/tor/torrc +sudo echo "HiddenServicePort $PORT1 $IP_ADDY:$PORT2" >> /etc/tor/torrc +sudo service tor restart \ No newline at end of file