diff options
author | lassulus <lass@aidsballs.de> | 2014-12-20 22:23:01 +0100 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2014-12-20 22:23:01 +0100 |
commit | 6dd7a15020aab595e087680a33b719a78ef6c410 (patch) | |
tree | 5d33865bc4cb8d7cf0f6e54481c5f45f4e3dbab9 /recon/autowifi/usr/bin/autowifi_old | |
parent | dbaee4aae713410b813f871bb8e8594a9d84f814 (diff) |
dump autowifi trash
Diffstat (limited to 'recon/autowifi/usr/bin/autowifi_old')
-rwxr-xr-x | recon/autowifi/usr/bin/autowifi_old | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/recon/autowifi/usr/bin/autowifi_old b/recon/autowifi/usr/bin/autowifi_old deleted file mode 100755 index 55eaefcd..00000000 --- a/recon/autowifi/usr/bin/autowifi_old +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -x -# States (LED): -# Blinking - running wifi plugins -# Turned off - connected to wifi -# Turned on - waiting for next scan round - -wifi=wlan0 -iface=@wifi-iface[0] -radio=$(uci get wireless.${iface}.device) - -# for connect_wifi -. /usr/lib/autowifi/lib/openwrt - -# for iwlist_scan -. /usr/lib/autowifi/lib/iwlist - -# for check_internet and check_gateway -. /usr/lib/autowifi/lib/network - -crack_wifi(){ - #SSID MAC CHANNEL ENCRYPTION WPA WPA2 - all_led timer - if [ "$4" == off ];then - encr=open - elif [ "$6" -eq 1 ]; then - encr=psk2 - elif [ "$5" -eq 1 ]; then - encr=psk - elif [ "$4" == on ]; then - encr=wep - fi - for hack in $(find /usr/lib/autowifi/plugins -type f); do - key=$($hack "$@"); - ret=$? - if [ $ret -eq 0 ];then - connect_wifi "$3" "$1" $encr "$key" - sleep 20 - if check_gateway; then - (cat /etc/autowifi/wifi_keys | grep -v "$1|$2|" ; echo "$1|$2|$key" ) | sort | uniq > /etc/autowifi/wifi_keys2 - mv /etc/autowifi/wifi_keys2 /etc/autowifi/wifi_keys - echo "yay gateway" - check_internet && all_led none && return 0 - fi - fi - done - return 1 -} -loop_over_networks(){ - . /tmp/${wifi}.scan - for i in `seq 1 $WIFI_COUNT`; do - eval grep -q \${MAC_${i}} /etc/autowifi/blacklist && continue - eval crack_wifi \"\${ESSID_${i}}\" \"\${MAC_${i}}\" \${CHANNEL_${i}} \${ENCRYPTION_${i}} \${WPA_${i}} \${WPA2_${i}} && break - done -} - -iwlist_scan > /tmp/${wifi}.scan -loop_over_networks - -while sleep 60; do - if ! check_internet; then - all_led on - iwlist_scan > /tmp/${wifi}.scan - loop_over_networks - fi -done |