array ("chars" => "abcdefghijklmnopqrstuvwxyz", "desc" => "Lowercase alphas - a-z"), "A" => array ("chars" => "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "desc" => "Uppercase alphas - A-Z"), "0" => array ("chars" => "0123456789", "desc" => "Numbers - 0-9"), "h" => array ("chars" => "0123456789ABCDEF", "desc" => "Hex digits - 0-F"), "p" => array ("chars" => '!"$%^&*()+', "desc" => "Punctuation - !\"$%^&*()+")); # if you add any new characters into the above list add them into this array $phonetics_arr = array ( "a" => "alpha", "b" => "beta", "c" => "charlie", "d" => "delta", "e" => "echo", "f" => "foxtrot", "g" => "golf", "h" => "hotel", "i" => "indego", "j" => "juliet", "k" => "kilo", "l" => "lima", "m" => "mike", "n" => "november", "o" => "oscar", "p" => "papa", "q" => "quebec", "r" => "romeo", "s" => "siera", "t" => "tango", "u" => "uniform", "v" => "victor", "w" => "whiskey", "x" => "x-ray", "y" => "yankee", "z" => "zulu", "!" => "Pling", '"' => "Quote", "" => "Pound", "$" => "Dollar", "%" => "Percent", "^" => "Carret", "&" => "Ampersand", "*" => "Star", "(" => "OpenBracket", ")" => "CloseBracket", "+" => "Plus", "0" => "Zero", "1" => "One", "2" => "Two", "3" => "Three", "4" => "Four", "5" => "Five", "6" => "Six", "7" => "Seven", "8" => "Eight", "9" => "Nine" ); $validation_errors = array(); $passwords = array(); $no_chars = 8; $no_pwds = 1; $phonetics_on = true; $no_similar = true; $selected_sets = "a"; if ($_SERVER['REQUEST_METHOD'] == "POST") { $src = ""; if (array_key_exists ("charsets", $_POST) && is_array ($_POST['charsets'])) { if (count ($_POST['charsets']) == 0) { $validation_errors = "Please chose at least one character set"; } else { $selected_sets = ""; foreach ($_POST['charsets'] as $id) { if (array_key_exists ($id, $char_sets_arr)) { $selected_sets .= $id; $src .= $char_sets_arr[$id]["chars"]; } } } } else { $validation_errors[] = "Please chose at least one character set"; } # remove similar characters if (array_key_exists ("remove_similar", $_POST)) { if ($_POST['remove_similar'] == "yes") { $no_similar = true; } else { $no_similar = false; } } else { $no_similar = true; } # display phonetic stuff if (array_key_exists ("show_phonetics", $_POST)) { if ($_POST['show_phonetics'] == "yes") { $phonetics_on = true; } else { $phonetics_on = false; } } else { $phonetics_on = true; } if (array_key_exists ("no_pwds", $_POST) && is_numeric ($_POST['no_pwds']) && $_POST['no_pwds'] > 0) { $no_pwds = intval ($_POST['no_pwds']); if ($no_pwds > 10) { $validation_errors[] = "This generator will only generate up to 10 passwords at a time"; } } else { $validation_errors[] = "Please specify the number of passwords to generate"; } if (array_key_exists ("no_chars", $_POST) && is_numeric ($_POST['no_chars']) && $_POST['no_chars'] > 0) { $no_chars = intval ($_POST['no_chars']); if ($no_chars > 50) { $validation_errors[] = "This generator will only generate passwords of up to 50 characters"; } } else { $validation_errors[] = "Please specify the number of characters in the password"; } # remove similar chars if ($no_similar) { for ($i = 0;$i < strlen ($similar_chars);$i++) { $src = str_replace ($similar_chars[$i], "", $src); } } if (count ($validation_errors) == 0) { for ($j = 0;$j < $no_pwds;$j++) { $password = ""; $phonetics_str = ""; for ($i = 0;$i < $no_chars;$i++) { $rand = rand (0, strlen ($src) - 1); $char = substr ($src, $rand, 1); $password .= $char; # if displaying phonetics if ($phonetics_on) { if (array_key_exists (strtolower ($char), $phonetics_arr)) { $phonetic = $phonetics_arr[strtolower ($char)]; if (strtolower($char) != $char) { $phonetic = strtoupper ($phonetic); } } else { $phonetic = "unknown"; } if ($phonetics_str != "") { $phonetics_str .= " - "; } $phonetics_str .= $phonetic; } } $passwords[$password] = $phonetics_str; } } } else { } ?>

Tools - Password Generator

This tool allows you to generate random passwords using a variety of character sets with the options of removing similar characters and displaying the phonetic representation of the generated password.

Please note, no passwords generated are stored by the system and Freedom Software can not re-generate lost passwords

0) { $display = ""; foreach ($passwords as $password => $phonetic) { $display .= clean_display_value ($password); if ($phonetics_on) { $display .= " - " . $phonetic; } $display .= "\n"; } ?>

Passwords

Select which character sets should can be used to generate the password:
$charset) { if (strpos ($selected_sets, strval ($id)) !== false) { $checked = ' checked="checked" '; } else { $checked = ""; } ?>