Thursday, October 28, 2010

[update]seressid

I think I've posted this script before. Simple script to search for a regexp within a near by broadcasting ESSID. Reports found networks or that nothing matched 'regexp'.

#!/bin/bash

chkroot && [[ $? = 0 ]] || exit 1

count=0
while [[ $count < 10 ]]; do
  iwlist wlan0 scan | grep $1
  [[ $? = 0 ]] && exit 0
    let count=$count+1
  sleep 2
done

echo "No ESSID's matching term '$1' found."

exit 1

No comments:

Post a Comment