May 2017
Beginner
552 pages
28h 47m
English
This script will connect to a wireless LAN with WEP (Wired Equivalent Privacy):
#!/bin/bash #Filename: wlan_connect.sh #Description: Connect to Wireless LAN #Modify the parameters below according to your settings ######### PARAMETERS ########### IFACE=wlan0 IP_ADDR=192.168.1.5 SUBNET_MASK=255.255.255.0 GW=192.168.1.1 HW_ADDR='00:1c:bf:87:25:d2' #Comment above line if you don't want to spoof mac address ESSID="homenet" WEP_KEY=8b140b20e7 FREQ=2.462G ################################# KEY_PART="" if [[ -n $WEP_KEY ]]; then KEY_PART="key $WEP_KEY" fi if [ $UID -ne 0 ]; then echo "Run as root" exit 1; fi # Shut down the interface before setting new config /sbin/ifconfig $IFACE down if [[ -n $HW_ADDR ...