This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import glob | |
| import re | |
| def parse_extended_guid(identity_str): | |
| m = re.search(r'\(([^,]+),\s*([^)]+)\)', identity_str) | |
| if m: | |
| return m.group(1).strip().lower(), m.group(2).strip() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hashlib | |
| import os | |
| import subprocess | |
| def hash_file(file_path): | |
| CHUNK_SIZE = 2**16 | |
| with open(file_path, "rb") as f: | |
| file_hash = hashlib.md5() | |
| chunk = f.read(CHUNK_SIZE) | |
| while chunk: |