-4

After a lot of searching and fails and lot of stress for being dumb, I am gonna to ask, how to build a wordlist generator in python?

My case letters and numbers to use (abcdef0123456789) length (72 chars)

to generate something like that:

"18516a9744529fcf5f01cc12b86fe5db614db6d688d826f20d501b343199f2de921a6310"

1 Answers1

1

Yep - every combination - following the example of the link I posted above: Random string generation with upper case letters and digits in Python

you could do:

import random

# same function as in the link, but size set to your desired length (72)
# instead of using the strings module, i'm just making a list of 
# allowable characters. there's cleaner ways to do this, but i wanted to 
# make it clear for you

def id_generator(size=72, chars= (['a','b','c','d', 'e', 'f','0','1','2','3','4','5','6','7','8','9'])):
    return ''.join(random.choice(chars) for _ in range(size))
x = id_generator()
print x

Erm . . . If you're trying to generate the whole list of every possible combination, that's unlikely to go well, since there's about 5 x 10E86 possible combinations. Which is a lot.

Community
  • 1
  • 1
Stidgeon
  • 2,673
  • 8
  • 20
  • 28
  • I did that: import itertools >>> >>> chrs = 'abcef0123456789' >>> n = 72 >>> >>> for xs in itertools.product(chrs, repeat=n): ... print ''.join(xs) ' credits: [link](http://stackoverflow.com/questions/21559039/python-how-to-generate-wordlist-from-given-characters-of-specific-length) Btw, its a lot of tries, and will take some time There is a way to auto-save that full list in .txt after after all attempts? – Julio Cezar Jan 15 '16 at 00:58