This is a python program that prints out all possible products, or permutations, of 4-digit passcodes:
This one use letters instead of digits:
On a typical keyboard, we’ll have 32 symbols, in addition to 26 uppercase letters, 26 lowercase letters, and 10 numbers, for a total of 94 different symbols. So if we have an 8-character passcode, we’ll be able to choose between 94 x 94 x 94 x 94 x 94 x 94 x 94 x 94 possibilities, which is over 6 quadrillion.
From the very well done Harvard CS50