Skip to content

Instantly share code, notes, and snippets.

@drewsdesign
drewsdesign / wifitrack.sh
Created June 7, 2013 09:16
Tracking with wifi and a mac address
#!/bin/sh
client="E0:F8:47:86:01:C2" #iPhone
logfile="/jffs/wifilog-$(date +"%m%d")-$client.log"
assoclist=$(wl assoclist | grep $client)
notconnmsg="$(date +"%T") Disconnected"
connmsg="$(date +"%T") Connected"
if [ ! -f $logfile ]; then
echo $notconnmsg > $logfile