From 38d6a29addb61ce0a632ed38e47655dbdd819aa9 Mon Sep 17 00:00:00 2001 From: Maarten Vanraes Date: Tue, 25 Oct 2011 19:16:57 +0000 Subject: - pass perl_checker --- rescue/genpasswd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'rescue/genpasswd') diff --git a/rescue/genpasswd b/rescue/genpasswd index b7fe1f660..2f129673d 100755 --- a/rescue/genpasswd +++ b/rescue/genpasswd @@ -1,10 +1,13 @@ #!/usr/bin/perl +use strict; + system "stty -echo"; print STDERR "Give a password for ssh access: "; -chomp($word = ); +chomp(my $word = ); print STDERR "\n"; system "stty echo"; -print crypt($word, join('', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64])); +my @salt = ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]; +print crypt($word, join('', @salt)); print "\n"; -- cgit v1.2.1