diff options
-rwxr-xr-x | usr/bin/autowifi | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr/bin/autowifi b/usr/bin/autowifi index 6fb64f95..5de46f41 100755 --- a/usr/bin/autowifi +++ b/usr/bin/autowifi @@ -63,7 +63,6 @@ find_count_of_ssid(){ connect_to_network_by_ssid(){ - wifi_init find_count_of_ssid "$1" | (while read i do loop_over_cracks "$i" && exit 0 @@ -76,7 +75,6 @@ connect_to_network_by_ssid(){ } connect_with_pw(){ - wifi_init find_count_of_ssid "$1" | (while read i do KEY="$2" @@ -92,8 +90,8 @@ wifi_init(){ . /tmp/${interface}.scan } loop_over_networks(){ - wifi_init + wifi_init for i in `seq 1 $WIFI_COUNT`; do loop_over_cracks "$i" if [ $? -eq 0 ]; then @@ -159,9 +157,7 @@ loop_cracks_over_networks(){ # exit 0 #} - - - +wifi_init if [ -n "$2" ]; then echo connecting to $1 with pw $2 connect_with_pw "$1" "$2" |