diff options
Diffstat (limited to 'sh/prp')
-rwxr-xr-x | sh/prp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,6 +1,9 @@ #!/bin/sh # PRactice Password +# maybe will leak password to ps/top/htop and swap file +# not sure I only compare the password variables will leak or not + read_pass () { stty -echo # -r necessary because password may contain backslash \ @@ -17,4 +20,9 @@ while ! [ "$entered_pass" = "$correct_pass" ]; do echo "Wrong password, enter again:" read_pass done + +# `. /bin/prp` will set these password variables as environment variables and can be accessed by the whole shell, so I unset these just in case +unset entered_pass +unset correct_pass + echo "Correct password" |