Thursday, July 19, 2018

#1 2003-07-05 11:43:45 pm

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Make new Password

This script will generate a new random password string that contains letters and numbers. Moreover, the password will be made up of English sounding phonemes. While most likely not words (although random words may be generated), they sound like words which makes remembering them slightly easier than completely random strings. Finally, you can set the length of the required password and the script will append random numbers to the end of the password until it hits the required length.

OS version: Any

Applescript:

property numerics : (characters of "0123456789")
property letters_vowels : (characters of "aeiou")
property letters_consonants : (characters of "bdfghjklmnprstvwz")
property letters_consonants2 : (characters of "bdfglmnprstvxz")
property start_consonants : letters_consonants & {"ch", "th", "sh"}
property end_consonants : letters_consonants2 & {"ck", "tch", "th", "sh"}

set the_password to make_password(10)

on make_password(password_length)
   set the_password to (my make_phoneme() & my make_phoneme() & (some item of numerics))
   repeat while ((length of the_password) < password_length)
       set the_password to the_password & (some item of numerics)
   end repeat
   return the_password
end make_password

on make_phoneme()
   return (some item of start_consonants) & (some item of letters_vowels) & (some item of end_consonants)
end make_phoneme


One mans trash is another mans treasure

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)