Created
November 21, 2018 12:07
-
-
Save cordx56/606d02baa49f28c60917444a8798983e to your computer and use it in GitHub Desktop.
wpa_supplicant.conf generator for WPA2-PEAP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "input SSID: " | |
read wpassid | |
echo -n "input user: " | |
read wpauser | |
echo -n "input password: " | |
read wpapsw | |
wpapsw=`echo -n "$wpapsw" | iconv -t utf16le | openssl md4 -binary | xxd -p` | |
cat << EOF > wpa_supplicant.conf | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=JP | |
network={ | |
ssid="$wpassid" | |
scan_ssid=1 | |
key_mgmt=WPA-EAP | |
eap=PEAP | |
identity="$wpauser" | |
password=hash:$wpapsw | |
phase1="peaplabel=0" | |
phase2="auth=MSCHAPV2" | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment