Skip to content

Instantly share code, notes, and snippets.

@albang
Created January 5, 2016 16:41
Show Gist options
  • Select an option

  • Save albang/acf39ac5908e6c22e7af to your computer and use it in GitHub Desktop.

Select an option

Save albang/acf39ac5908e6c22e7af to your computer and use it in GitHub Desktop.
le script génére une liste de mot/password à partir de caractère prédéfinis.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def forkletter(baseword = "",indice = 0):
if master_len > indice:
for lettre in master_list[indice]:
if lettre != " ":
forkletter(baseword + lettre,indice + 1)
else:
forkletter(baseword, indice + 1)
else:
if len(baseword) > password_min_size:
print(baseword)
if __name__ == '__main__':
master_list = ["Tt ","oO ","Tt ","Oo "]
master_len = len(master_list)
password_min_size = 3
forkletter()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment