diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3b66410 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/projectFile2.py b/projectFile2.py index eb1b0ba..25d831d 100644 --- a/projectFile2.py +++ b/projectFile2.py @@ -1,7 +1,10 @@ import os, random +from hashlib import md5 -keys=['this', 'was', 'the', 'correct', 'key', 'but', 'the', 'correct', 'order', 'can', 'be', 'different', - 'so', 'better', 'try', 'a', 'bruteforce'] +answer= "you are doing great but take care of the order" +hashval= md5(answer.encode()).hexdigest() +print(hashval) +keys=answer.split() selected_folders=[] for i in range(len(keys)): diff --git a/solution.py b/solution.py index 81c6be9..35148b7 100644 --- a/solution.py +++ b/solution.py @@ -2,7 +2,9 @@ from itertools import permutations startTime=time.time() -toMatch='611d6663e938213f9643144650180a8d' +answer= "you are doing great but take care of the order" +toMatch= hashlib.md5(answer.encode()).hexdigest() + toCheck="here's one key :" @@ -20,20 +22,20 @@ os.chdir('..') -print(len(found)) +print(found) matched= False count =0 for perm in permutations(found): permStr= ' '.join(perm) permHash= hashlib.md5(permStr.encode()).hexdigest() - if toMatch==permHash: + if toMatch==permHash or permStr=="": print('matched answer: '+permStr) matched= True break else: count+=1 - print(count,'perms checked') + # print(count,'perms checked') if not matched: