From 3f21974d495b81d16e49b0808a1a5b121ab0a66b Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 24 May 2013 17:10:58 +0200 Subject: fixed bugs in encryption detection --- usr/bin/autowifi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr/bin') diff --git a/usr/bin/autowifi b/usr/bin/autowifi index 0eaf72c0..1e5a5a6b 100755 --- a/usr/bin/autowifi +++ b/usr/bin/autowifi @@ -73,14 +73,14 @@ iwlist_scan(){ done; print_iwlist_env ;echo WIFI_COUNT=$count) } crack_wifi(){ - if [ $4 == off ];then + if [ "$4" == off ];then encr=open - elif [ -n "$5" ]; then + elif [ "$5" -eq 1 ]; then encr=psk - elif [ -n "$6" ]; then + elif [ "$6" -eq 1 ]; then + encr=wep + elif [ "$4" == on ]; then encr=wep - elif [ $4 == on ]; then - encr=open fi for hack in $(find /usr/lib/autowifi/ -type f); do key=$($hack $@); -- cgit v1.2.3