RayRay459 has asked for the wisdom of the Perl Monks concerning the following question:
# Ray Espinoza # ChPass.pl # This script calls in the encrypted password file and decrypts it and + uses # its value as $Password to change the account password to $Password. ###################################################################### +########################### #!D:\perl\bin -w use strict; use Win32::AdminMisc; #use Win32::AdminMisc qw(SetPassword); chomp(my $Server = <STDIN>); my $User = "Administrator"; &getPassword = my $Password; my $Result = Win32::AdminMisc::SetPassword( $Server, $User, $Password) + || die "Couldn't change password on $Server: $^E"; print $Result; sub getPassword { use strict; use Crypt::Blowfish_PP; my $key="abcdefghijklmnopqrstuvwxyz123456789"; my $bf = Crypt::Blowfish_PP->new($key); open (IN,"phrase.txt") || die "Can't read phrase.txt: $!"; while (<IN>) { my $encrypted_password = $_; my $decrypted_password = $bf->decrypt($encrypted_password); print $decrypted_data; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can i get the value outputed from my subroutine into my program as a value
by physi (Friar) on Aug 15, 2001 at 21:07 UTC | |
|
Re: can i get the value outputed from my subroutine into my program as a value
by andye (Curate) on Aug 15, 2001 at 21:18 UTC | |
by RayRay459 (Pilgrim) on Aug 15, 2001 at 21:41 UTC | |
|
Re: can i get the value outputed from my subroutine into my program as a value
by wardk (Deacon) on Aug 15, 2001 at 21:11 UTC |