Advertisement
c0d3dsk1lls

brute ascii

Jun 27th, 2022
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1.  
  2.  #BRUTE ascii
  3.  
  4. import itertools as it
  5. import string
  6. from utils import timefunc
  7. class Brutes:
  8.  #---------------------------------------------
  9.    
  10.     def __init__(self, charset, length):
  11.            self.charset = charset
  12.            self.length = length
  13.            
  14.     def crackit(self, password):
  15.         pass  
  16.  #---------------------------------------------      
  17.    
  18.     @property    
  19.    
  20.     def guesses(self):
  21.         for guess in it.product(self.charset, repeat=self.length):
  22.             yield ''.join(guess)  
  23.  #---------------------------------------------          
  24. @timefunc                                                                          
  25. def main():
  26.     charset = string.ascii_letters + string.digits
  27.     brute = Brutes(charset, 4)
  28.     for guess in brute.guesses:
  29.         print(guess)
  30.  #---------------------------------------------        
  31.        
  32. if __name__ == '__main__':
  33.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement