summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-05-24 17:05:42 +0200
committerlassulus <lassulus@googlemail.com>2013-05-24 17:05:42 +0200
commit82eca39bd5e84fd5df720546570e839e812383c5 (patch)
treeee6cd2a80be37280e73877a92b3d3f1cb2d27edc /usr
parentd1f669625da04a520133f3977124b5151ed30eaa (diff)
now working again :D
Diffstat (limited to 'usr')
-rwxr-xr-xusr/bin/autowifi25
1 files changed, 12 insertions, 13 deletions
diff --git a/usr/bin/autowifi b/usr/bin/autowifi
index bee49844..0eaf72c0 100755
--- a/usr/bin/autowifi
+++ b/usr/bin/autowifi
@@ -73,13 +73,13 @@ iwlist_scan(){
done; print_iwlist_env ;echo WIFI_COUNT=$count)
}
crack_wifi(){
- if [ -n "$6" ];then
- encr=psk2
+ if [ $4 == off ];then
+ encr=open
elif [ -n "$5" ]; then
encr=psk
- elif [ "$4" == on ]; then
+ elif [ -n "$6" ]; then
encr=wep
- else
+ elif [ $4 == on ]; then
encr=open
fi
for hack in $(find /usr/lib/autowifi/ -type f); do
@@ -111,13 +111,12 @@ loop_over_networks(){
done
}
-#iwlist_scan > /tmp/${wifi}.scan
-#loop_over_networks
+iwlist_scan > /tmp/${wifi}.scan
+loop_over_networks
-#while sleep 60; do
-# if ! check_internet; then
-# iwlist_scan > /tmp/${wifi}.scan
-# loop_over_networks
-# fi
-#done
-iwlist_scan
+while sleep 60; do
+ if ! check_internet; then
+ iwlist_scan > /tmp/${wifi}.scan
+ loop_over_networks
+ fi
+done