When we read PSK from stdin, don't hide it from the user.
This commit is contained in:
parent
f62b410aaa
commit
8c7c5dba27
16
create_ap
16
create_ap
@ -1087,14 +1087,10 @@ else
|
|||||||
break
|
break
|
||||||
done
|
done
|
||||||
while :; do
|
while :; do
|
||||||
|
if [[ $USE_PSK -eq 0 ]]; then
|
||||||
read -p "Passphrase: " -s PASSPHRASE
|
read -p "Passphrase: " -s PASSPHRASE
|
||||||
echo
|
echo
|
||||||
if [[ $USE_PSK -eq 1 ]]; then
|
if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -lt 8 ]] || [[ ${#PASSPHRASE} -gt 63 ]]; then
|
||||||
if [[ ${#PASSPHRASE} -ne 64 ]]; then
|
|
||||||
echo "ERROR: Invalid pre-shared-key length ${#PASSPHRASE} (expected 64)" >&2
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
elif [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -lt 8 ]] || [[ ${#PASSPHRASE} -gt 63 ]]; then
|
|
||||||
echo "ERROR: Invalid passphrase length ${#PASSPHRASE} (expected 8..63)" >&2
|
echo "ERROR: Invalid passphrase length ${#PASSPHRASE} (expected 8..63)" >&2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
@ -1105,6 +1101,14 @@ else
|
|||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
read -p "PSK: " PASSPHRASE
|
||||||
|
echo
|
||||||
|
if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -ne 64 ]]; then
|
||||||
|
echo "ERROR: Invalid pre-shared-key length ${#PASSPHRASE} (expected 64)" >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
read SSID
|
read SSID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user