You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
$encrypted = "AB/uOsC7P93EI";
|
|
|
|
$salt = substr($encrypted, 0, 2);
|
|
|
|
print "Guess the word: ";
|
|
|
|
while(<>) {
|
|
|
|
chomp;
|
|
if ($encrypted eq (crypt $_, $salt)) {
|
|
print "You got it!";
|
|
exit;
|
|
} else {
|
|
print "Nope.\n";
|
|
print "Guess the word: ";
|
|
}
|
|
}
|
|
|
|
|