#!/bin/sh # Local-only Wi-Fi hotspot for Kali NetHunter / Android # SSID: vegeta black # Password: supermarioinreallife IFACE="wlan1" # Change if needed (check with: ip link / iw dev) SSID="vegeta black" PSK="supermarioinreallife" CHANNEL="6" AP_IP="192.168.43.1" DHCP_RANGE="192.168.43.10,192.168.43.50,12h" # Check root if [ "$(id -u)" -ne 0 ]; then echo "This script must be run as root" exit 1 fi # Kill previous instances killall hostapd dnsmasq wpa_supplicant 2>/dev/null sleep 1 # Bring interface down and clean it ip link set "$IFACE" down 2>/dev/null ip addr flush dev "$IFACE" 2>/dev/null ip link set "$IFACE" up || { echo "Failed to bring up $IFACE" exit 1 } # Create hostapd config cat > /tmp/hostapd-"$IFACE".conf </dev/null | head -n 15 echo ip addr show "$IFACE" echo echo "Clients will receive IPs in the range 192.168.43.10 – 192.168.43.50" echo "No internet is shared (local network only)."