While there are lots of tools out there to allow you to do complicated things regarding scanning sometimes you just want to scan wireless networks and categorise them by WPA, WEP and OPEN.

You MUST have WL and BUSYBOX installed on your machine for this to work, but nothing else is needed.

cd /tmp
datethefile=$(date +%b%d%H%M)
wl scan ; sleep 3 ; wl scanresults > unfiltered$datethefile
cat unfiltered$datethefile | sed -e '/./{H;$!d;}' -e 'x;/WPA:/!d;' > WPA$datethefile
cat unfiltered$datethefile | sed -e '/./{H;$!d;}' -e 'x;/WPA:/d;' > NONWPA$datethefile
cat NONWPA$datethefile | sed -e '/./{H;$!d;}' -e 'x;/WEP/!d;' > WEP$datethefile
cat NONWPA$datethefile | sed -e '/./{H;$!d;}' -e 'x;/WEP/d;' >CLEAR$datethefile
rm NONWPA$datethefile
rm unfiltered$datethefile

You should end up with three files in /tmp, WPA(date_time), WEP(date_time) and CLEAR(date_time)

Feel free to modify and use as you want and I hope some people find them useful.

(Last edited by pinnoccio on 16 Oct 2007, 07:14)