LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   How to username password and sort by weakest password (http://www.linuxquestions.org/questions/programming-9/how-to-username-password-and-sort-by-weakest-password-4175434944/)

rhbegin 10-31-2012 01:35 PM

How to username password and sort by weakest password
 
I am trying to figure out without changing the order of the data - to sort by the weakest password.

I have formatted the data from the database like so:

adam,acme1
billy,boxer1
carver,acme2
jim,boxer2

I am trying to sort it by the weakest password first, without disrupting the username,password match?

From what I have tried it makes the data useless because the username,password does not match after I sort the password field.

Any help/advice would be great.

thanks

unSpawn 10-31-2012 01:53 PM

Do show us what you actually tried ('man sort': "-k").
How will you sort data if all shown passwords are equally weak?

Reuti 11-01-2012 04:15 PM

How do you define, that password A is weaker than password B – length, number of different characters, used sets and amount used (alpha [with or without vowel]), numeric, punctuation marks, upper-/lowercase)?

rhbegin 11-05-2012 08:42 AM

Quote:

Originally Posted by unSpawn (Post 4819150)
Do show us what you actually tried ('man sort': "-k").
How will you sort data if all shown passwords are equally weak?

Sorry for delay, I am not sure on how to tell if a password is weak from sorting the data?

I have it dumped into a file like the format listed above.

---------- Post added 11-05-12 at 08:43 AM ----------

Quote:

Originally Posted by Reuti (Post 4820003)
How do you define, that password A is weaker than password B length, number of different characters, used sets and amount used (alpha [with or without vowel]), numeric, punctuation marks, upper-/lowercase)?

all lowercase without any numbers, symbols, captials

I am at a loss on how to do this.

pan64 11-05-2012 08:52 AM

You need to measure the passwords somehow, for example 1 means weak, 10 means strong. You need to define an algorithm to measure those passwords and generate a new column:
Code:

adam,acme1,7
billy,boxer1,3
carver,acme2,6
jim,boxer2,2

Finally you can sort the list by that column.

sundialsvcs 11-05-2012 09:59 PM

You will need to come up with some function for gaging the "weakness" of a particular password-value; a function that will return some kind of numeric value. It is possible, in whatever language you're using, to specify that the data should be sorted by the result of that function when applied to a particular field.

Be aware that the function in question might be called literally millions of times during the sort.

rhbegin 11-06-2012 08:08 AM

Let me do some research and see if I can find some sort of function to check this.

thank you all for the quick responses and help

:)

pan64 11-06-2012 08:18 AM

http://www.passwordmeter.com/

rhbegin 11-07-2012 08:39 AM

Quote:

Originally Posted by pan64 (Post 4823372)

thanks I will check this out

:)


All times are GMT -5. The time now is 12:35 PM.