SHARE
TWEET

Untitled

a guest Nov 9th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #student2 name: Royi Hamo
  2. #student2 name: Eliran Maman
  3. import time
  4. import operator
  5. from subprocess import call
  6.  
  7. TheABC = [i for i in range(97,122,1)]
  8.  
  9. def solver(ThePass,TheList,Index):
  10.     startTime = time.time()
  11.     call(["./timing.o", ThePass])
  12.     TheList.append(time.time() - startTime)
  13. #    y.append(s)
  14.  
  15. TheChosen = []
  16. for index in range(3):
  17.     attackTime = dict()
  18.     for j in TheABC:
  19.         TheList = []
  20.         for i in range(365):
  21.             solver(j,TheList) # the output should be the first 3 letters of the password in timing.o
  22.         avg = (sum(TheList)/365)
  23.         attackTime[j] = avg
  24.     TheChosen[index] = max(attackTime.items(), key=operator.itemgetter(1))[0]
  25.  
  26. print(TheChosen)
  27. # try:
  28. #     call(["./timing.o", "abcde"])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top