diff options
author | makefu <github@syntax-fehler.de> | 2014-12-20 22:08:23 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-12-20 22:08:33 +0100 |
commit | dbaee4aae713410b813f871bb8e8594a9d84f814 (patch) | |
tree | d2f5d37c6bad81f3e87c13628933e505c8237315 /usr/lib/autowifi/lib/iwlist | |
parent | 16e1373ddd9050dd06cd699b2874cf178375574b (diff) |
autowifi-merged files to recon/autowifi
Diffstat (limited to 'usr/lib/autowifi/lib/iwlist')
-rw-r--r-- | usr/lib/autowifi/lib/iwlist | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/usr/lib/autowifi/lib/iwlist b/usr/lib/autowifi/lib/iwlist deleted file mode 100644 index a9f77f0c..00000000 --- a/usr/lib/autowifi/lib/iwlist +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -print_iwlist_env(){ - # takes environment: - # count - # MAC - # CHANNEL - # QUALITY - # ENCRYPTION - # ESSID - # WPA - # WPA2 - for i in ESSID MAC CHANNEL QUALITY ENCRYPTION WPA WPA2;do - eval echo ${i}_${count}=\$${i} - done -} - -iwlist_scan(){ - # usage: iwlist_scan $wifi-itf - ifconfig $wifi up - - count=0 - - iwlist ${1:-} scan 2>/dev/null | ( while read line; - do - case "$line" in - *"Cell "*) - [ $count -eq 0 ] || print_iwlist_env - WPA=0 - WPA2=0 - : $((count+=1)) - MAC="${line#*Address: }" - ;; - *Channel:*) - CHANNEL="${line#*:}" - ;; - *Quality=*) - QUALITY="`printf '%s' ${line#*Quality=} | cut -d/ -f 1`" - ;; - *"Encryption key:"*) - ENCRYPTION="${line#*key:}" - ;; - *ESSID:*) - ESSID="${line#*ESSID:}" - ;; - *"IE: IEEE 802.11i/WPA2"*) - WPA2=1 - ;; - *"IE: WPA Version 1"*) - WPA=1 - ;; - *);; - esac - done; print_iwlist_env ;echo WIFI_COUNT=$count) -} |