summaryrefslogtreecommitdiffstats
path: root/rescue/genpasswd
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/genpasswd')
-rwxr-xr-xrescue/genpasswd10
1 files changed, 10 insertions, 0 deletions
diff --git a/rescue/genpasswd b/rescue/genpasswd
new file mode 100755
index 000000000..328ced265
--- /dev/null
+++ b/rescue/genpasswd
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+
+system "stty -echo";
+print STDERR "Give a password: ";
+chomp($word = <STDIN>);
+print STDERR "\n";
+system "stty echo";
+
+print crypt($word, join('', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]));
+print "\n";