Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Original script by Jebba, modified by 9000 @ talk.maemo.org
- # Run this script to share your Internet connection.
- # Activate your gprs0 (fone data) connection with the GUI
- #run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false
- IP_ADDR="192.168.1.1"
- NETMASK="255.255.255.0"
- DHCP_RANGE="192.168.1.100,192.168.1.127"
- RUNFILE="/var/run/wifi_tethering.pid"
- DNSMASQ="/usr/sbin/dnsmasq"
- ESSID="honeypot"
- PASSWORD="0000000000000"
- CHANNEL="10"
- HOSTIDEV="gprs0"
- set -x
- start wlancond
- # Load modules
- modprobe crc7
- modprobe mac80211
- modprobe wl12xx
- modprobe ipt_MASQUERADE
- # flush old rules
- iptables -F
- iptables -t nat -F
- iptables -t nat -A POSTROUTING -o $HOSTIDEV -j MASQUERADE
- # forward IPs
- echo 1 > /proc/sys/net/ipv4/ip_forward
- ifconfig wlan0 down
- iwconfig wlan0 mode ad-hoc
- ifconfig wlan0 up
- iwconfig wlan0 essid $ESSID
- iwconfig wlan0 key s:$PASSWORD
- iwconfig wlan0 channel $CHANNEL
- ifconfig wlan0 $IP_ADDR netmask $NETMASK up
- # Setup DNS and DHCP
- start-stop-daemon -S -p $RUNFILE -m -b -x $DNSMASQ -- -k -I lo -z -a $IP_ADDR -F $DHCP_RANGE -b
- run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'WiFi HotSpot Activated'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement