Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #BRUTE ascii
- import itertools as it
- import string
- from utils import timefunc
- class Brutes:
- #---------------------------------------------
- def __init__(self, charset, length):
- self.charset = charset
- self.length = length
- def crackit(self, password):
- pass
- #---------------------------------------------
- @property
- def guesses(self):
- for guess in it.product(self.charset, repeat=self.length):
- yield ''.join(guess)
- #---------------------------------------------
- @timefunc
- def main():
- charset = string.ascii_letters + string.digits
- brute = Brutes(charset, 4)
- for guess in brute.guesses:
- print(guess)
- #---------------------------------------------
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement