From 5a686e975192a7a12e3e466db3c08c9e991d1298 Mon Sep 17 00:00:00 2001 From: Philip Edelbrock Date: Thu, 2 Dec 1999 01:22:31 +0000 Subject: [PATCH] (Phil) Simple Perl script to generate passwords for CVS! git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@652 7894878c-1315-0410-8ee3-d5d059ff63e0 --- doc/developers/genpasswd.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 doc/developers/genpasswd.pl diff --git a/doc/developers/genpasswd.pl b/doc/developers/genpasswd.pl new file mode 100755 index 00000000..f6efceb9 --- /dev/null +++ b/doc/developers/genpasswd.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl +# +# Use this Perl script to generate a password +# for you to use for CVS access. Then, send +# the output to phil@netroedge.com so Phil +# can add you to the CVS writers group +# (pending approval, of course). + +$salt1=int(65 + rand(115 - 65)); +$salt2=int(65 + rand(115 - 65)); +if ($salt1 > 90) { $salt1+=7; } +if ($salt2 > 90) { $salt2+=7; } +$salt= pack("cc",$salt1, $salt2); +system "stty -echo"; +print "Password: "; +chop($word = ); +print "\n\n"; +print "Please enter it again.\n"; +print "Password: "; +chop($word2 = ); +print "\n"; +system "stty echo"; +if ($word ne $word2) { print "Passwords do not match, action aborted!\n"; exit; } +$passwd=crypt($word, $salt); +print "Here is your encrypted password: $passwd\n"; +