Have some addons to my problem. Here is the log, where i'm starting the script and what we have at hte end: root@Pineapple:~# ./wireless_connect.sh Current MAC: 00:0e:a2:86:f2:ef (Cyberguard Corporation) Faked MAC: 00:05:d4:e8:1c:8a (Futuresmart Networks, Inc.) Successfully initialized wpa_supplicant Line 5: Invalid passphrase length 64 (expected: 8..63) '98e4a478571750002a5081ce7fa61e579e4db0a2856e057c93aae6913ea43365"'. Line 5: failed to parse psk '"98e4a478571750002a5081ce7fa61e579e4db0a2856e057c93aae6913ea43365"'. Line 7: WPA-PSK accepted for key management, but no PSK configured. Line 7: failed to parse network block. Failed to read or parse configuration '/etc/wpa_supplicant.conf'. udhcpc (v1.19.4) started Sending discover... Sending discover... Sending discover...
--end of log--
so I have used this generator http://www.wireshark.org/tools/wpa-psk.html