summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2011-10-25 19:16:57 +0000
committerMaarten Vanraes <alien@mageia.org>2011-10-25 19:16:57 +0000
commit96aa701ad1ec3f91c783fa8477b6ca32bee04558 (patch)
treebe8dd4517e3f13490421821e46ed952d0c9326c0 /rescue
parenta06e43d2424a1f2ff139c62a72c51fd1121c7d16 (diff)
downloaddrakx-96aa701ad1ec3f91c783fa8477b6ca32bee04558.tar
drakx-96aa701ad1ec3f91c783fa8477b6ca32bee04558.tar.gz
drakx-96aa701ad1ec3f91c783fa8477b6ca32bee04558.tar.bz2
drakx-96aa701ad1ec3f91c783fa8477b6ca32bee04558.tar.xz
drakx-96aa701ad1ec3f91c783fa8477b6ca32bee04558.zip
- pass perl_checker
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/genpasswd7
1 files changed, 5 insertions, 2 deletions
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 = <STDIN>);
+chomp(my $word = <STDIN>);
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";