From e9a78f2b48574c25138acca4bbba1618c21f2a39 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Mon, 5 Mar 2018 16:39:52 +0100 Subject: [PATCH] fixed to disable 'echo' when typing the password --- docs/htpasswd.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/htpasswd.pl b/docs/htpasswd.pl index b5c9815..e2f0087 100755 --- a/docs/htpasswd.pl +++ b/docs/htpasswd.pl @@ -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 = ); + system("stty echo"); print crypt($word, $salt) . "\n"; } else { system("stty -echo");