13 lines
425 B
Python
13 lines
425 B
Python
|
|
import re
|
||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
path = Path(r"E:\\emu\\psx\\Crusader - No Remorse\\SLUS_002.68")
|
||
|
|
data = path.read_bytes()
|
||
|
|
pattern = re.compile(rb"[ -~]{4,}")
|
||
|
|
needle = re.compile(r"WDL|LSET|MENU|SPEC|MAP|SPR|TILE", re.I)
|
||
|
|
seen = set()
|
||
|
|
for m in pattern.finditer(data):
|
||
|
|
s = m.group().decode("ascii", errors="ignore")
|
||
|
|
if needle.search(s) and s not in seen:
|
||
|
|
seen.add(s)
|
||
|
|
print(f"0x{m.start():08X}\t{s}")
|