trodland

brute

Sep 9th, 2020 (edited)
1,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. import string
  2. import time
  3.  
  4. start = time.time()
  5.  
  6. passord = "secret"
  7.  
  8. passordlengde = len(passord)
  9.  
  10. bokstaver = string.ascii_lowercase
  11.  
  12. for b1 in bokstaver:
  13.     for b2 in bokstaver:
  14.         for b3 in bokstaver:
  15.             for b4 in bokstaver:
  16.                 for b5 in bokstaver:
  17.                     for b6 in bokstaver:
  18.                         guess = b1+b2+b3+b4+b5+b6
  19.                         if guess == passord:
  20.                             print("Fant passorder")
  21.                             print("Tid brukt: ", time.time() - start)
  22.                             break
  23.  
Advertisement
Add Comment
Please, Sign In to add comment