├── README.md ├── _config.yml ├── config ├── dhcpcd.conf ├── dnsmasq.conf └── torrc.conf └── torFi.sh /README.md: -------------------------------------------------------------------------------- 1 | # TorFi 2 | 3 | ## What it is? 4 | 5 | TorFi is a bash script for Configure your Raspberry Pi 3 B/B+ as an Anonymous WiFi Hotspot. it's a fully automated script for raspbian OS. no extra configuration necessary... It Configured TOR hotspot starts automatically on boot. Encrypted Tor WiFi Access Point You can setup again for changes SSID or PASS. Default SSID "TorFi" & Password "hacktronian".. 6 | 7 | ## Things You Need : 8 | 9 | * Raspberry Pi 3 B/B+ : [Amazon India](http://amzn.in/igaal2Q) 10 | 11 | * SD Card (16 GB) : [Amazon India](http://amzn.in/5syvCew) 12 | 13 | * Card Reader/SD Card Adoptor : [Amazon India](http://amzn.in/akD4COz) 14 | 15 | * PowerBank/Charger : [Amazon India](http://amzn.in/fE4JBeA) 16 | 17 | * HDMI Cable : [Amazon India](https://www.amazon.in/b?node=1388893031) 18 | 19 | * PC/Laptop : [Amazon India](https://www.amazon.in/b?node=1375424031) 20 | 21 | ## How to setup? 22 | 23 | First Download [Raspbian OS](https://www.raspberrypi.org/downloads/raspbian/) for RPi3, [Etcher](https://github.com/balena-io/etcher/releases). 24 | 25 | * Flash Raspbian OS on Your SD Card Using Etcher. 26 | * Create a simple empty file named ```ssh``` on Boot Partition of SD Card. 27 | * Insert the SD card into the Raspberry Pi and Power it up. 28 | * Connect Router's LAN Cable with Raspberry Pi 29 | * Connect it with Monitor Using HDMI Cable. 30 | * Log in (pi:raspberry), Open Terminal, Get Root Access ```(sudo bash / sudo -i)```. 31 | * Clone Github Repo by Typing ```git clone https://github.com/thehackingsage/torfi.git``` 32 | * Open TorFi Folder : ```cd torfi``` 33 | * Run TorFi : ```./torFi.sh``` 34 | * Setup SSID and Password 35 | * After That Reboot Your Raspberry Pi To Start Tor Access Point 36 | 37 | That's It !!! Enjoy Anonymous WiFi Hotspot.. 38 | 39 | YouTube Tutorial : 40 | 41 | if you face any problem in this process feel free to ask.. :) 42 | 43 | and If You Like This Repo. Please Share This With Your Friends.. 44 | 45 | & Don't Forget To Follow Me At [Twitter](https://www.twitter.com/thehackingsage), [Instagram](https://www.instagram.com/thehackingsage), [Github](https://www.github.com/thehackingsage) & SUBSCRIBE My [YouTube](https://www.youtube.com/hacktronian) Channel..!!! 46 | 47 | Happy Anonymity !!! 48 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker -------------------------------------------------------------------------------- /config/dhcpcd.conf: -------------------------------------------------------------------------------- 1 | interface wlan0 2 | static ip_address=192.168.123.1/24 3 | nohook wpa_supplicant 4 | -------------------------------------------------------------------------------- /config/dnsmasq.conf: -------------------------------------------------------------------------------- 1 | interface=wlan0 2 | server=1.1.1.1 3 | dhcp-range=192.168.123.10,192.168.123.100,12h 4 | -------------------------------------------------------------------------------- /config/torrc.conf: -------------------------------------------------------------------------------- 1 | Log notice file /var/log/tor/notices.log 2 | VirtualAddrNetwork 10.192.0.0/10 3 | AutomapHostsSuffixes .onion,.exit 4 | AutomapHostsOnResolve 1 5 | TransPort 9040 6 | TransListenAddress 192.168.123.1 7 | DNSPort 53 8 | DNSListenAddress 192.168.123.1 9 | -------------------------------------------------------------------------------- /torFi.sh: -------------------------------------------------------------------------------- 1 | /#!/bin/sh 2 | clear 3 | BLACK='\e[30m' 4 | RED='\e[31m' 5 | GREEN='\e[32m' 6 | YELLOW='\e[33m' 7 | BLUE='\e[34m' 8 | PURPLE='\e[35m' 9 | CYAN='\e[36m' 10 | WHITE='\e[37m' 11 | NC='\e[0m' 12 | echo "" 13 | echo -e """${GREEN} ______ ______ ______ ______ __ 14 | /\__ _\ /\ __ \ /\ == \ /\ ___\ /\ \ 15 | \/_/\ \/ \ \ \/\ \ \ \ __< \ \ __\ \ \ \ 16 | \ \_\ \ \_____\ \ \_\ \_\ \ \_\ \ \_\ 17 | \/_/ \/_____/ \/_/ /_/ \/_/ \/_/ 18 | ${NC}""" 19 | echo -e "${RED}This Tool Must Run As ROOT | https://thehackingsage.github.io${NC}" 20 | echo "" 21 | echo "---------------------------------------------------------------------" 22 | echo "" 23 | echo -e "${CYAN}This Script Will Change Your System's Network Configurations Files..${NC}" 24 | echo "" 25 | read -r -p "Do You Want To Continue ??? [Y/N] : " check 26 | case "$check" in 27 | [nN][oO]|[nN]) 28 | echo "" 29 | echo "Thank You For Using This Tool..!!!" 30 | echo "" 31 | echo -e "Visit ${RED}https://github.com/thehackingsage${NC} for More..!!!" 32 | echo "" 33 | exit 1 34 | ;; 35 | *) 36 | echo "" 37 | read -p "Do You Want To Update Your System (Highly Recommended) (Y/N)?" ans 38 | if [ $ans = "y" ] || [ $ans = "Y" ] 39 | then 40 | echo "Updating Package Index.." 41 | sudo apt-get update -y 42 | echo "Updating Old Packages.." 43 | sudo apt-get upgrade -y 44 | fi 45 | echo "" 46 | echo "Downloading and Installing Necessary Packages.." 47 | sudo apt install hostapd dnsmasq tor -y 48 | echo "" 49 | echo "Checking..." 50 | if [ ! -f /etc/tor/torrc ] 51 | then 52 | sudo apt update --fix-missing 53 | sudo apt install hostapd dnsmasq tor -y 54 | fi 55 | echo "" 56 | echo "Configuration Start..." 57 | echo "" 58 | read -p "Enter your PIFI SSID : " torfiname 59 | read -p "Enter Password (8 or More Character) : " torfipass 60 | if [ ! $torfiname ] 61 | then 62 | torfiname="TorFi" 63 | echo "" 64 | echo "SSID Can't Be Blank, Now Your SSID is :" $torfiname 65 | fi 66 | if [ ${#torfipass} -lt 8 ] 67 | then 68 | torfipass="hacktronian" 69 | echo "" 70 | echo "Your Password Length is Short, Now Your WiFi Password is : " $torfipass 71 | fi 72 | sudo cat > hostapd.conf <> torrc 127 | sudo mv torrc /etc/tor/torrc 128 | sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" 129 | sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 130 | sudo iptables -F 131 | sudo iptables -t nat -F 132 | sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 22 -j REDIRECT --to-ports 22 133 | sudo iptables -t nat -A PREROUTING -i wlan0 -p udp --dport 53 -j REDIRECT --to-ports 53 134 | sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --syn -j REDIRECT --to-ports 9040 135 | sudo sh -c "iptables-save > /etc/iptables.ipv4.nat" 136 | sudo touch /var/log/tor/notices.log 137 | sudo chown debian-tor /var/log/tor/notices.log 138 | sudo chmod 644 /var/log/tor/notices.log 139 | sudo service hostapd start 140 | sudo service dnsmasq start 141 | sudo service tor start 142 | sudo update-rc.d tor enable 143 | echo "" 144 | echo "Configuration is Completed" 145 | echo "Reboot Your System To Start Tor Access Point" 146 | echo "" 147 | read -p "Press Enter to Reboot, CTRL+C to Abort.." chk 148 | sudo reboot 149 | ;; 150 | esac 151 | --------------------------------------------------------------------------------