Advertisement
0x00sec_JINX

bruteForcePassCreator.py

Dec 17th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.95 KB | None | 0 0
  1. #!/usr/bin/python3
  2. #
  3. #   This program is free software: you can redistribute it and/or modify
  4. #   it under the terms of the GNU General Public License as published by
  5. #   the Free Software Foundation, either version 3 of the License, or
  6. #   (at your option) any later version.
  7. #
  8. #   This program is distributed in the hope that it will be useful,
  9. #   but WITHOUT ANY WARRANTY; even without the implied warranty of
  10. #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. #   GNU General Public License for more details.
  12. #
  13. #   you should have received a copy of the GNU General Public License
  14. #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  15. #
  16. #   This program is designed to provide a user with a bruteforce hacking
  17. #   capability. While it does have a slow performance and use a bunch of
  18. #   at this time, expect an update on here soon. This program is meant to
  19. #   be modified to the users needs.
  20. #
  21. #
  22. #
  23. #
  24. #   To add special characters to the bruteforce list, copy the following
  25. #   to the end of the chrs variable: !@#$%^&*()_+-=?><,./[]{}|\~`
  26. #
  27. #   This program is slow but with current advancements in cyber security,
  28. #   slower is sometimes better. On that note, threads are coming to this program
  29. #   soon
  30. #
  31.  
  32. import itertools
  33. import sys
  34.  
  35.  
  36. def checkPass(pass_string):
  37.     """
  38.     Function to check the created password
  39.     according to the users logic
  40.     """
  41.  
  42.     ##REPLACE WITH OWN LOGIC##
  43.     for letter in pass_string:
  44.         if pass_string.count(letter) >= 3:
  45.             return False
  46.         else:
  47.             return True
  48.  
  49.  
  50. def main():
  51.  
  52.     chrs = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
  53.  
  54.     try:
  55.         for xs in itertools.product(chrs, repeat=8):
  56.             pass_acceptable = checkPass(xs)
  57.             if pass_acceptable:
  58.                 ##ENTER YOUR OWN PROCESS HERE AND REMOVE 'pass' PYTHON OBJECT##
  59.                 pass
  60.     except KeyboardInterrupt:
  61.         print(" ")
  62.         sys.exit()
  63.     except Exception as e:
  64.         print("An error has occured:\n%s" % e)
  65.         sys.exit()
  66.  
  67. if __name__ == '__main__':
  68.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement