libdo

Untitled

Nov 6th, 2017
14,639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. from itertools import product
  2. import os
  3. import string
  4.  
  5. chars = []
  6. digits = []
  7.  
  8. chars += string.ascii_lowercase
  9. chars += string.ascii_uppercase
  10.  
  11. digits += string.digits
  12.  
  13. charscombo = map("".join, product(chars, repeat=3))
  14. digitcombo = map("".join, product(chars, repeat=3))
  15.  
  16. intstring = "zzzzzzzyyyyyyyfffffffjjjjjffffff"
  17.  
  18. for char in charscombo:
  19.   for dgt in digitcombo:
  20.     completestring = dgt + intstring + char
  21.     execall = "./key.exe " + completestring
  22.    
  23.     result = os.system(execall)
  24.  
  25.     if(result == 256):
  26.       with open("test.txt", "a") as answerfile:
  27.         answerfile.write(completestring)
  28.         answerfile.write('\n')
  29.  
  30.  
  31. print("done")
Add Comment
Please, Sign In to add comment