Skip to content

Instantly share code, notes, and snippets.

@calib0rx
Created June 19, 2013 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calib0rx/5816603 to your computer and use it in GitHub Desktop.
Save calib0rx/5816603 to your computer and use it in GitHub Desktop.
Protect your command line passwords
function pwcmd () {
echo -ne "\nEnter the password for the command\n>> ";
stty -echo;
read PASS;
stty echo;
echo -ne "\nEnter command with $PASS where you would type the password\n>> ";
read USRCMD;
eval $USRCMD;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment