-
-
Save bojoer/15bd7c145afd00df983f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
chomp(my $filename=$ARGV[0]); | |
chomp(my $username=$ARGV[1]); | |
chomp(my $password=$ARGV[2]); | |
if (!$filename || !$username || !$password) { | |
print "USAGE: ./crypt.pl filename username password\n\n"; | |
} else { | |
open FILE, ">>", $filename or die $!; | |
print FILE $username . ":" . crypt($password, $username) . "\n"; | |
close FILE or die $!; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment