summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-05-24 10:45:28 +0200
committerlassulus <lassulus@googlemail.com>2013-05-24 10:45:28 +0200
commit5f7f912c13b1fc137b7a29a4083082d9efcc9b40 (patch)
tree5118d7f72ddbb435075e73334470bc964455673d /usr
parent270c82cb22ea22e6049f544403ad459d9d6604e3 (diff)
beta2 (still untested)
Diffstat (limited to 'usr')
-rwxr-xr-xusr/bin/autowifi12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr/bin/autowifi b/usr/bin/autowifi
index 10f4a9e2..90a584de 100755
--- a/usr/bin/autowifi
+++ b/usr/bin/autowifi
@@ -54,12 +54,18 @@ iwlist_scan(){
done; echo WIFI_COUNT=$count)
}
crack_wifi(){
- for hack in $(ls /usr/lib/autowifi/); do
+ if $6;then
+ encr=psk2
+ elif $5; then
+ encr=psk
+ elif [ $4 == on ]; then
+ encr=wep
+ fi
+ for hack in $(find /usr/lib/autowifi/ -type f); do
key=$($hack $@);
if ! [ $key -eq 1 ];then
+ connect_wifi $3 $1 $encr $key
break
- else
- connect_wifi $3 $1
fi
done
}