title: Multithreading bruteforce script python
body: <p>So I'm writing this bruteforce script in python3 and it works fine but it is obiouvsly very slow, both becouse python is not very indicated for this stuff and because I don't know how to implement multithreading. I'm only creating this script because I'm interested in ethical hacking and I want to see how multithreading would make it better.
  So the interested part of code is this: </p>
  
  <pre><code>def bruto(charset1, maxlength1):
     return(''.join(candidate) for candidate in  chain.from_iterable(product(charset, repeat=i) for i in range(1, maxlength + 1)))
  
  for guess1 in bruto(charset,maxlength):
      guess_hash1 = getattr(hashlib, algorithm)(bytes(guess1, 'utf-8')).hexdigest()
  </code></pre>
  
  <p>How can I implement multithreading? Thank in advance and sorry for the noobiness</p>