Created
July 11, 2017 03:13
-
-
Save gnue/ed5250ff83a731a4f0b84bb404f9f2d8 to your computer and use it in GitHub Desktop.
wpa_passphrase 出力で生のパスフレーズを取り除く
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 | |
usage="Usage: $(basename $0) <ssid>" | |
fatal() { | |
echo "$@" >&2 | |
exit 1 | |
} | |
[ -z "$1" ] && fatal "$usage" | |
read -sp "Passphrase: " pass | |
echo -e "\n" >&2 | |
wpa_passphrase "$1" "$pass" | sed '/^\s#psk/d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment