fixed to disable 'echo' when typing the password

This commit is contained in:
Jordi Sanfeliu 2018-03-05 16:39:52 +01:00
parent 15f707bb2e
commit e9a78f2b48
1 changed files with 2 additions and 0 deletions

View File

@ -20,7 +20,9 @@ my $word;
if(!$ARGV[0]) {
my $salt = join('', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]);
print "Password to encrypt: ";
system("stty -echo");
chomp($word = <STDIN>);
system("stty echo");
print crypt($word, $salt) . "\n";
} else {
system("stty -echo");