Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Just curious - wh set of chars for pass generation isn't full?
From txplib_admin.php:
function generate_password($length = 10)
{
$pass = '';
$chars = '023456789bcdfghjkmnpqrstvwxyz';
$i = 0;
while ($i < $length)
{
$char = substr($chars, mt_rand(0, strlen($chars)-1), 1);
if (!strstr($pass, $char))
{
$pass .= $char;
$i++;
}
}
return $pass;
}
$chars = '023456789bcdfghjkmnpqrstvwxyz';
– Why here there are no “1”, “a”, “i”, “u” chars?
Just curious :)
Last edited by the_ghost (2008-07-19 14:38:50)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Just curious - wh set of chars for pass generation isn't full?
I think the 1 and i are left out because they are too much alike… but that doesn’t explain the omission of a and u.
Offline
Re: Just curious - wh set of chars for pass generation isn't full?
I would also think – most probably in my ignorance – that #0 could be left out as it could be confused with letter o
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Just curious - wh set of chars for pass generation isn't full?
Looks like the ‘o’ and ‘e’ are missing too.
Offline
Re: Just curious - wh set of chars for pass generation isn't full?
I’ve added the vowels back in and removed the zero. The lowercase o and i can’t be confused with the numbers 0 and 1 respectively, but the 0 and 1 could be mistaken for an uppercase O and l (L).
Offline