before editing 900i and 1000i to work on 120hz capped sony crt
This commit is contained in:
Executable
+86
@@ -0,0 +1,86 @@
|
||||
#!/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 <<EOF
|
||||
interface=$IFACE
|
||||
driver=nl80211
|
||||
ssid=$SSID
|
||||
hw_mode=g
|
||||
channel=$CHANNEL
|
||||
ieee80211n=1
|
||||
wmm_enabled=1
|
||||
auth_algs=1
|
||||
ignore_broadcast_ssid=0
|
||||
wpa=2
|
||||
wpa_passphrase=$PSK
|
||||
wpa_key_mgmt=WPA-PSK
|
||||
rsn_pairwise=CCMP
|
||||
EOF
|
||||
|
||||
# Start hostapd
|
||||
hostapd -B /tmp/hostapd-"$IFACE".conf || {
|
||||
echo "hostapd failed to start"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Assign static IP to the AP interface
|
||||
ip addr add "$AP_IP/24" dev "$IFACE"
|
||||
ip link set "$IFACE" up
|
||||
|
||||
# Start dnsmasq (DHCP only – no DNS forwarding / no internet)
|
||||
dnsmasq \
|
||||
--interface="$IFACE" \
|
||||
--bind-interfaces \
|
||||
--dhcp-range="$DHCP_RANGE" \
|
||||
--dhcp-option=3,"$AP_IP" \
|
||||
--dhcp-option=6,"$AP_IP" \
|
||||
--port=0 \
|
||||
--no-resolv \
|
||||
--pid-file=/tmp/dnsmasq-"$IFACE".pid \
|
||||
--log-facility=/tmp/dnsmasq-"$IFACE".log &
|
||||
|
||||
sleep 1
|
||||
|
||||
# Show status
|
||||
echo
|
||||
echo "Local-only hotspot started"
|
||||
echo " Interface : $IFACE"
|
||||
echo " SSID : $SSID"
|
||||
echo " Password : $PSK"
|
||||
echo " Gateway : $AP_IP"
|
||||
echo
|
||||
iw dev "$IFACE" info 2>/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)."
|
||||
Reference in New Issue
Block a user