Skip to content

Instantly share code, notes, and snippets.

@seb3point0
Created March 11, 2013 12:57
Show Gist options
  • Save seb3point0/5134050 to your computer and use it in GitHub Desktop.
Save seb3point0/5134050 to your computer and use it in GitHub Desktop.
# Import dependancies
import itertools
# Create array with known parts of the password
parts = ['foo', 'FOO', 'Foo', 'bar', 'BAR', 'Bar', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '!', '@', '#', '$', '%', '^', '&', '*']
# Number of parts per password
number = 4
# Build a list of combinations of knows parts with number of parts
permutations = list(itertools.permutations(parts, number))
# Print list
for (i, permutation) in enumerate(permutations):
print ''.join(permutation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment