diff options
author | lassulus <lassulus@googlemail.com> | 2013-06-12 23:58:52 +0200 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2013-06-12 23:58:52 +0200 |
commit | f5f47bf26a3d4fdae0480fb3614e3a9f24ef1085 (patch) | |
tree | f03f6061b703bf4bbf2e2cf1a84e8f7e543f8d6c /usr/bin | |
parent | 7221f3a13a9862c65238c5e7bf31a3356cf46b27 (diff) |
looping now cracks over networks
Diffstat (limited to 'usr/bin')
-rwxr-xr-x | usr/bin/autowifi | 19 |
1 files changed, 17 insertions, 2 deletions
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 |