-2

In case of numeric passcodes, e.g. for numeric locks on doors etc, anyone can agree "poor passwords" are ones with specific pattern, e.g. 1234, 1111, 2468, 1122, etc. (as well as ones that form a clear graphical pattern on the keypad, e.g. "cross", 159-357)

If I want to generate a lot of random numeric passcodes, it's a matter of a trivial random number generator - except it's quite possible it will generate any of the "dictionary" keycodes by chance. With a small number it's easy to avoid them simply by discarding any that "looks easy", but what if I want to automate the process?

How can I create random numeric passcodes, discarding all the "easy" ones automatically?

SF.
  • 211
  • 1
  • 5

1 Answers1

3

You've pretty much defined your requirements in your question.

You need to write a little program that builds a list of numeric strings you want to exclude:

  • Sequential numbers
  • repeating numbers
  • basic shapes on a keypad

In addition, you will have to add what would be defined as "easy" in your context. For example, I always try 867-5309, 90125, 90210 and all the zip codes of my metro area and the digits on the jerseys of top receivers on my football team. So, algorithmically or manually add numbers that are contextual. Then, run your random number generator and use your list to rule out any you've defined as "easy. If you need help with the program, then you would need to ask in a different forum.

mcgyver5
  • 6,807
  • 2
  • 24
  • 45