daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Mar 21st, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2. import hashlib
  3.  
  4. hashes = {}
  5. for root, dirs, files in os.walk("."):
  6.     for f in files:
  7.         if not f.endswith(".png"):
  8.             continue
  9.         fname = os.path.join(root, f)
  10.         with open(fname, "rb") as openf:
  11.             h = hashlib.md5(openf.read()).hexdigest()
  12.             if hashes.get(h) is not None:
  13.                 print(fname, hashes.get(h))
  14.                 continue
  15.             else:
  16.                 hashes[h] = fname
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