Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import hashlib
- hashes = {}
- for root, dirs, files in os.walk("."):
- for f in files:
- if not f.endswith(".png"):
- continue
- fname = os.path.join(root, f)
- with open(fname, "rb") as openf:
- h = hashlib.md5(openf.read()).hexdigest()
- if hashes.get(h) is not None:
- print(fname, hashes.get(h))
- continue
- else:
- hashes[h] = fname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement