Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os, hashlib
- path = "<PATH>/"
- files = {}
- yup = {}
- for file in os.listdir(path):
- file = path+file
- hash = hashlib.md5(open(file, "rb").read()).hexdigest()
- if hash in files.values():
- yup[file] = hash
- else:
- files[file] = hash
- def outputToFile():
- # Write shit to a text file.
- with open("outf.txt", "w") as out:
- for i in yup:
- out.write("{} - {}\n".format(i, yup[i]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement