summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-06-12 23:58:52 +0200
committerlassulus <lassulus@googlemail.com>2013-06-12 23:58:52 +0200
commitf5f47bf26a3d4fdae0480fb3614e3a9f24ef1085 (patch)
treef03f6061b703bf4bbf2e2cf1a84e8f7e543f8d6c
parent7221f3a13a9862c65238c5e7bf31a3356cf46b27 (diff)
looping now cracks over networks
-rw-r--r--etc/autowifi/wifi_keys3
-rwxr-xr-xusr/bin/autowifi19
2 files changed, 20 insertions, 2 deletions
diff --git a/etc/autowifi/wifi_keys b/etc/autowifi/wifi_keys
index ef66cf3e..8a21d954 100644
--- a/etc/autowifi/wifi_keys
+++ b/etc/autowifi/wifi_keys
@@ -1 +1,4 @@
#SSID|MAC|BANDWIDTH|KEY
+EasyBox-443119|00:23:08:44:31:5f|157762|6fpfghyLnVIP
+...Nicht|90:f6:52:20:25:88|161300|superfastjesus
+nokton|00:13:10:0a:d8:09|154388|Telefonbuc4
diff --git a/usr/bin/autowifi b/usr/bin/autowifi
index d9337cf4..6fb64f95 100755
--- a/usr/bin/autowifi
+++ b/usr/bin/autowifi
@@ -116,6 +116,21 @@ loop_over_cracks(){
done
return 1
}
+loop_cracks_over_networks(){
+ wifi_init
+ for crack in $(find $crackdir -type f | sort -u); do
+ for i in `seq 1 $WIFI_COUNT`; do
+ KEY="$(eval root=$root \$crack \"\${ESSID_${i}}\" \"\${MAC_${i}}\" \${FREQ_${i}} \${ENCRYPTION_${i}})"
+ if [ $? -eq 0 ]; then
+ eval connect \"\${MAC_${i}}\" \"\${ESSID_${i}}\" \${ENCRYPTION_${i}} \"\${KEY}\"
+ if [ $? -eq 0 ]; then
+ return 0
+ fi
+ fi
+ done
+ done
+
+}
#scan_all(){
# for i in `seq 1 $WIFI_COUNT`; do
@@ -155,11 +170,11 @@ elif [ -n "$1" ]; then
connect_to_network_by_ssid "$1"
else
echo looping network now
- check_internet || loop_over_networks
+ check_internet || loop_cracks_over_networks
while sleep 60; do
if ! check_internet; then
- loop_over_networks
+ loop_cracks_over_networks
fi
done
fi