NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#/bin/bash
clear
hidden_service_dir="/etc/tor/hidden_service"
auth_file="/etc/tor/onion_auth/login.auth_private"
hostname="/etc/tor/hidden_service/hostname"
torrc_file="/etc/tor/torrc"
auth_command="ClientOnionAuthDir /etc/tor/onion_auth"
auth_file="/etc/tor/onion_auth/login.auth_private"
prvpem="/tmp/k1.prv.pem"
prvkey="/tmp/k1.prv.key"
pubkey="/tmp/k1.pub.key"
client_auth_dir="/etc/tor/hidden_service/authorized_clients"
client_auth_file="/etc/tor/hidden_service/authorized_clients/login.auth"
onion_auth_dir="etc/tor/onion_auth"
onion_address=$(cat "$hostname" | sed 's/.onion$//')
key=$(sed -n '/BEGIN PRIVATE KEY/,/END PRIVATE KEY/p' "$prvpem" | sed '/BEGIN PRIVATE KEY/d; /END PRIVATE KEY/d')
domain=$(cat "$hostname")
login_key=$(cat "$prvkey")
user="login"
RED='33[0;31m'
GREEN='33[0;32m'
YELLOW='33[0;33m'
NC='33[0m'

echo "${RED}===================================== ${NC}"
echo "${YELLOW}[*]İnstalling Packages...${NC}"
echo "${RED}===================================== ${NC}"
sleep 1
sudo apt-get install tor basez openssl -y
echo "${RED}===================================== ${NC}"
echo "${YELLOW}[+]Packages are installed. ${NC}"
echo "${RED}===================================== ${NC}"
sleep 2

if [ -f "$torrc_file" ]; then
echo "${GREEN}[*]Found torrc config: $torrc_file ${NC}"
fi
if ! grep -Fxq "HiddenServiceDir $hidden_service_dir" "$torrc_file" && ! grep -Fxq "HiddenServicePort 80 127.0.0.1:80" "$torrc_file"; then

echo "HiddenServiceDir $hidden_service_dir" >> "$torrc_file"
echo "HiddenServicePort 80 127.0.0.1:80" >> "$torrc_file"
echo "${GREEN}[*]Hidden_Service Config Saved ${NC}"
else
echo "${GREEN}[*]Hidden_Service config already exists in: $torrc_file ${NC}"
fi

if [ ! -f "/tmp/k1.prv.pem" ]; then
openssl genpkey -algorithm x25519 -out /tmp/k1.prv.pem
echo "${GREEN}[+]File created: /tmp/k1.prv.key ${NC}"
else
echo "${GREEN}[*]k1.prv.pem already exists. Skipping generation. ${NC}"
fi

if [ ! -f "/tmp/k1.prv.key" ]; then
cat /tmp/k1.prv.pem | grep -v " PRIVATE KEY" | base64pem -d | tail --bytes=32 | base32 | sed 's/=//g' > /tmp/k1.prv.key
echo "${GREEN}[+]File created: /tmp/k1.prv.key ${NC}"
else
echo "${GREEN}[*]File already exists: /tmp/k1.prv.key ${NC}"
fi

sudo openssl pkey -in /tmp/k1.prv.pem -pubout | grep -v " PUBLIC KEY" | base64pem -d | tail --bytes=32 | base32 | sed 's/=//g' > /tmp/k1.pub.key
echo "${GREEN}[+]File created: /tmp/k1.pub.key ${NC}"

if mkdir -p /etc/tor/hidden_service/authorized_clients; then
echo "${GREEN}[+]Directory created: $client_auth_dir ${NC}"
else
echo "${GREEN}[*]Directory already created: $client_auth_dir ${NC}"
fi

if [ ! -f "$client_auth_file" ]; then
echo "descriptor:x25519:$(cat "$pubkey")" | sudo tee "$client_auth_file" >/dev/null
echo "${GREEN}[+]Authorized client file created: $client_auth_file ${NC}"
else
echo "${GREEN}[*]Authorized client file already exists: $client_auth_file ${NC}"
fi

if mkdir -p /etc/tor/onion_auth; then

echo "${GREEN}[+]Directory created: $onion_auth_dir ${NC}"
else
echo "${GREEN}[*]Directory already exists: $onion_auth_dir ${NC}"
fi

echo "$onion_address:descriptor:x25519:$key" > "$auth_file"

echo "${GREEN}[+]Onion auth file created: /etc/tor/onion_auth/login.auth_private"
chmod 700 /etc/tor/hidden_service
echo "${RED}[+]Starting tor service... ${NC}"
sleep 2
tor &

sleep 10

echo "${GREEN}[+]Tor started succesfully ${NC}"
echo "${RED}[*]For stop the tor service type "killall tor" ${NC}"
echo "[+]Your Hostname:${NC}$domain"
echo "[+]Your Login Key:${NC}$login_key"
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.