Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #student2 name: Royi Hamo
- #student2 name: Eliran Maman
- import time
- import operator
- from subprocess import call
- TheABC = [i for i in range(97,122,1)]
- def solver(ThePass,TheList,Index):
- startTime = time.time()
- call(["./timing.o", ThePass])
- TheList.append(time.time() - startTime)
- # y.append(s)
- TheChosen = []
- for index in range(3):
- attackTime = dict()
- for j in TheABC:
- TheList = []
- for i in range(365):
- solver(j,TheList) # the output should be the first 3 letters of the password in timing.o
- avg = (sum(TheList)/365)
- attackTime[j] = avg
- TheChosen[index] = max(attackTime.items(), key=operator.itemgetter(1))[0]
- print(TheChosen)
- # try:
- # call(["./timing.o", "abcde"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement