Hi.
I'd like to compare a string to be used for a password against a dictionary. Any idea on how to do this?
Thanks
Comparing string vs. dictionairy
Moderator: General Moderators
-
Marinusjvv
- Forum Commoner
- Posts: 29
- Joined: Wed Dec 02, 2009 5:59 am
Re: Comparing string vs. dictionairy
Ah ethical cracking I hope.Marinusjvv wrote:Hi.
I'd like to compare a string to be used for a password against a dictionary. Any idea on how to do this?
Thanks
Code: Select all
<?php
$words = file('/path/to/file/' . $dictionaryFile);
if(in_array($words, $passGuess)) {
echo 'Password is :' . $passGuess;
}
else {
echo 'Password is not in the dictionary file.';
}
?>
-
Marinusjvv
- Forum Commoner
- Posts: 29
- Joined: Wed Dec 02, 2009 5:59 am
Re: Comparing string vs. dictionairy
Thanks..
Yes, it's to ensure that users do not use normal words as a password.
Any idea where i can download a file to use as a dictionary? i've looked, but can't find..
Yes, it's to ensure that users do not use normal words as a password.
Any idea where i can download a file to use as a dictionary? i've looked, but can't find..