Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: jesus19990502

Message # 1010000:
Date: 03/01/02 01:53
By: Mike Marinescu Profile
Subject: RE: Another possible access

I was looking for a random pwd generator so I did a quick change to Tomas' suggestion so that the password generated still is somewhat pronounceable but is not set in a constant pattern. The only thing I did was make sure that no more than two vowels or two constants/digits appear in a row, and setup up some random % that I decided based on the look of generated passwords. change #s to your liking... - I did not want too many upper case letters because they are hard to remember.

My pattern is not anywhere as complex like FIPS181 (and doesnt eliminate annoying pairs of "ii", etc), but its a good step up from the alternating algo and more secure, while still generating decent passwds

some sample generated pwds with 8 char length.

hvonha8x
ajquppaj
exdiswu1
pEqnubro
hozoR2oh

what do you think?
---------- Code --------------
$base_vow = "aeiou";
$base_cons = "bcdghjklmnpqrstvwxzy";
$base_digit = "0123456789";
print generate(8);
function generate($name_length)
{
global $base_vow,$base_cons,$base_digit;
$retval = '';
mt_srand((double)microtime()*1000000);

$consCount = 0;
for ($p=0;$p<$name_length;$p++)
{
if ($consCount < 2 && $vowCount < 2){
$item = mt_rand(0,100);
if ($item <= 65) {
$retval .= substr($base_cons,mt_rand(0,strlen($base_cons)-1),1);
$consCount++;
$vowCount = 0;
}
else if ($item <= 70) {
$retval .= strtoupper(substr($base_cons,mt_rand(0,strlen($base_cons)-1),1));
$consCount++;
$vowCount = 0;
}
else if ($item <= 87){
$retval .= substr($base_vow,mt_rand(0,strlen($base_vow)-1),1);
$consCount = 0;
$vowCount++;
}
else if ($item <= 90){
$retval .= strtoupper(substr($base_vow,mt_rand(0,strlen($base_vow)-1),1));
$consCount = 0;
$vowCount++;
}
else if ($item <= 100){
$retval .= substr($base_digit,mt_rand(0,strlen($base_digit)-1),1);
$consCount++;
$vowCount = 0;
}
}
else if ($vowCount >= 2){
$retval .= substr($base_cons,mt_rand(0,strlen($base_cons)-1),1);
$consCount++;
$vowCount = 0;
}
else{
$retval .= substr($base_vow, mt_rand(0,strlen($base_vow)-1),1);
$consCount = 0;
}

}
return $retval;
}

Previous Message | Next Message


Comments:
re: pronouncable is importantSaint05/15/03 17:56
RE: easy to remember gibberishJames11/28/02 20:13
RE: See FIPS-181tom11/07/02 13:58
Big Mistakegilhad10/30/02 09:26
RE: Think like an Application ArchitectLee08/21/02 17:04
easy to remember gibberishAndrew Penry07/27/02 19:39
RE: Think like an Application ArchitectJon Nadal07/24/02 15:33
Think like an Application ArchitectLee04/16/02 22:01
RE: Another possible accessMike Marinescu03/01/02 01:53
RE: See FIPS-181mike01/09/02 10:52
QuestionJeff Williams12/20/01 22:05
Parse ErrorVijay Avarachen11/26/01 06:45
RE: One (of many) alternative solutionBrian Clancey08/23/01 16:49
RE: Another possible accessDavid Altherr07/06/01 12:29
RE: One (of many) alternative solutionHugh Bothwell06/23/01 11:22
RE: html editor and coursesJames Diss06/07/01 07:39
How about alternate vowels & consonants?Tom Westmacott05/07/01 12:29
One (of many) alternative solutionJack Healy05/03/01 09:29
RE: Another possible accessJeremy Weiskotten04/19/01 18:59
html editor and coursesMarlon Benjamin03/08/01 11:01
See FIPS-181Andy03/07/01 17:24
RE: Another possible accessKatie03/02/01 19:19
RE: Insecurity.Bill Canaday02/26/01 15:12
RE: Insecurity.Jay02/21/01 11:26
RE: Insecurity.Lance Sloan02/08/01 15:56
RE: Insecurity.Allen02/03/01 11:49
RE: Another possible accessMartin Scheffler01/11/01 06:17
RE: Insecurity.Matt12/15/00 17:50
Insecurity.Michal Zajaczkowski11/27/00 06:34
Another possible accessTomas Krojzl09/16/00 09:16
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.