summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-05-24 10:25:22 +0200
committerlassulus <lassulus@googlemail.com>2013-05-24 10:25:22 +0200
commit270c82cb22ea22e6049f544403ad459d9d6604e3 (patch)
tree19fd50ba8ab90a2ee45f28cc65f45728920714f9
parent0ee9d729554c7ceb40a962a18eb6d64a1c962338 (diff)
beta test of heckenkrebs
-rwxr-xr-xusr/bin/autowifi21
1 files changed, 21 insertions, 0 deletions
diff --git a/usr/bin/autowifi b/usr/bin/autowifi
index f6e26a1e..10f4a9e2 100755
--- a/usr/bin/autowifi
+++ b/usr/bin/autowifi
@@ -53,6 +53,27 @@ iwlist_scan(){
esac
done; echo WIFI_COUNT=$count)
}
+crack_wifi(){
+ for hack in $(ls /usr/lib/autowifi/); do
+ key=$($hack $@);
+ if ! [ $key -eq 1 ];then
+ break
+ else
+ connect_wifi $3 $1
+ fi
+ done
+}
+check_internet(){
+ wget -O- --spider http://google.de/index.html
+}
+loop_over_networks(){
+ . /tmp/${wifi}.scan
+ for i in `seq 1 $WIFI_COUNT`; do
+ crack_wifi \${ESSID_${i}} \${MAC_${i}} \${CHANNEL_${i}} \${ENCRYPTION_${i}} \${WPA_${i}} \${WPA2_${i}}
+ done
+
+}
iwlist_scan > /tmp/${wifi}.scan
+loop_over_networks