feat(acquire): resumable batch extraction queue and binary inventory
Inventory classifies the DLL repository by SHA; the batch queue runs each engine build in a fresh PyGhidra process with a timeout, fingerprints the extractor environment and keeps per-attempt state and logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bddb5949a6
commit
b0013c5114
@@ -12,6 +12,7 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
.venv/
|
.venv/
|
||||||
|
.venv-ghidra/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
|
|
||||||
# macOS
|
# macOS
|
||||||
@@ -19,3 +20,6 @@ __pycache__/
|
|||||||
|
|
||||||
# Local SQLite catalog DB
|
# Local SQLite catalog DB
|
||||||
*.db
|
*.db
|
||||||
|
|
||||||
|
# Batch queue writer lock (runtime only)
|
||||||
|
.queue.lock
|
||||||
|
|||||||
@@ -0,0 +1,253 @@
|
|||||||
|
"""Resumable, SHA-addressed engine extraction queue (POSIX)."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
from contextlib import contextmanager
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
import fcntl
|
||||||
|
import hashlib
|
||||||
|
from importlib import metadata
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
import re
|
||||||
|
import signal
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
|
def digest(path):
|
||||||
|
h = hashlib.sha256()
|
||||||
|
with Path(path).open('rb') as stream:
|
||||||
|
for chunk in iter(lambda: stream.read(1024 * 1024), b''):
|
||||||
|
h.update(chunk)
|
||||||
|
return h.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def fingerprint(env=None):
|
||||||
|
from . import ghidra
|
||||||
|
env = os.environ if env is None else env
|
||||||
|
root = Path(__file__).resolve().parents[2]
|
||||||
|
scripts = Path(env.get('AMS_GHIDRA_SCRIPTS', root / 'ghidra_scripts'))
|
||||||
|
paths = [Path(__file__), Path(ghidra.__file__), *sorted(scripts.glob('*.py'))]
|
||||||
|
h = hashlib.sha256()
|
||||||
|
for path in paths:
|
||||||
|
h.update(path.name.encode())
|
||||||
|
h.update(path.read_bytes())
|
||||||
|
h.update(json.dumps(provider_profile(env), sort_keys=True).encode())
|
||||||
|
return h.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def provider_profile(env):
|
||||||
|
provider = 'pyghidra' if env.get('AMS_USE_PYGHIDRA') else 'headless'
|
||||||
|
home = env.get('GHIDRA_INSTALL_DIR') or env.get('GHIDRA_HOME')
|
||||||
|
launcher = env.get('GHIDRA_HEADLESS')
|
||||||
|
if provider == 'headless' and launcher:
|
||||||
|
home = str(Path(launcher).resolve().parent.parent)
|
||||||
|
elif provider == 'headless' and not home:
|
||||||
|
import shutil
|
||||||
|
launcher = shutil.which('analyzeHeadless', path=env.get('PATH'))
|
||||||
|
if launcher:
|
||||||
|
home = str(Path(launcher).resolve().parent.parent)
|
||||||
|
properties = Path(home) / 'Ghidra' / 'application.properties' if home else None
|
||||||
|
try:
|
||||||
|
pyghidra_version = metadata.version('pyghidra')
|
||||||
|
except metadata.PackageNotFoundError:
|
||||||
|
pyghidra_version = None
|
||||||
|
return {'provider': provider, 'ghidra_home': str(Path(home).resolve()) if home else None,
|
||||||
|
'launcher': launcher, 'pyghidra_version': pyghidra_version,
|
||||||
|
'application_properties': properties.read_text() if properties and properties.is_file() else None,
|
||||||
|
'python': sys.version, 'java_home': env.get('JAVA_HOME')}
|
||||||
|
|
||||||
|
|
||||||
|
def atomic_json(path, data):
|
||||||
|
temp = path.with_name(path.name + '.' + uuid.uuid4().hex + '.tmp')
|
||||||
|
try:
|
||||||
|
temp.write_text(json.dumps(data, ensure_ascii=False, indent=2) + '\n')
|
||||||
|
os.replace(temp, path)
|
||||||
|
finally:
|
||||||
|
temp.unlink(missing_ok=True)
|
||||||
|
|
||||||
|
|
||||||
|
def validate_snapshot(path, sha):
|
||||||
|
data = json.loads(path.read_text())
|
||||||
|
if not isinstance(data, dict) or not isinstance(data.get('binary'), dict):
|
||||||
|
raise ValueError('Snapshot has no binary identity')
|
||||||
|
snapshot_sha = data['binary'].get('sha256')
|
||||||
|
if not isinstance(snapshot_sha, str) or snapshot_sha.lower() != sha:
|
||||||
|
raise ValueError('Snapshot SHA does not match manifest')
|
||||||
|
if not isinstance(data.get('types'), list) or not data['types']:
|
||||||
|
raise ValueError('Snapshot has no extracted types')
|
||||||
|
if not isinstance(data.get('methods'), list) or not data['methods']:
|
||||||
|
raise ValueError('Snapshot has no extracted methods')
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
@contextmanager
|
||||||
|
def queue_lock(directory):
|
||||||
|
with (directory / '.queue.lock').open('a') as stream:
|
||||||
|
try:
|
||||||
|
fcntl.flock(stream, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||||
|
except BlockingIOError:
|
||||||
|
raise RuntimeError('Another extraction queue is using this output directory')
|
||||||
|
try:
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
fcntl.flock(stream, fcntl.LOCK_UN)
|
||||||
|
|
||||||
|
|
||||||
|
def execute_worker(source, output, log, timeout, env):
|
||||||
|
with log.open('wb') as stream:
|
||||||
|
process = subprocess.Popen(
|
||||||
|
[sys.executable, '-m', 'ams.acquire.batch', '--worker', str(source), str(output)],
|
||||||
|
stdout=stream, stderr=subprocess.STDOUT, env=env, start_new_session=True)
|
||||||
|
try:
|
||||||
|
code = process.wait(timeout=timeout)
|
||||||
|
except BaseException:
|
||||||
|
try:
|
||||||
|
os.killpg(process.pid, signal.SIGKILL)
|
||||||
|
except ProcessLookupError:
|
||||||
|
pass
|
||||||
|
process.wait()
|
||||||
|
raise
|
||||||
|
if code:
|
||||||
|
raise RuntimeError('Extractor exited with code ' + str(code))
|
||||||
|
|
||||||
|
|
||||||
|
def run_queue(manifest, out_dir, *, ghidra_home=None, timeout=1800, limit=None,
|
||||||
|
retry_failed=False, worker=execute_worker):
|
||||||
|
if timeout <= 0 or (limit is not None and limit < 0):
|
||||||
|
raise ValueError('Timeout must be positive; limit must be nonnegative')
|
||||||
|
data = json.loads(Path(manifest).read_text())
|
||||||
|
if data.get('schema') != 'binary-inventory/1':
|
||||||
|
raise ValueError('Expected binary-inventory/1 manifest')
|
||||||
|
builds = data['builds']
|
||||||
|
seen = set()
|
||||||
|
for build in builds:
|
||||||
|
sha = build['sha256']
|
||||||
|
if not isinstance(sha, str) or not re.fullmatch('[0-9a-f]{64}', sha) or sha in seen:
|
||||||
|
raise ValueError('Invalid or duplicate manifest SHA: ' + str(sha))
|
||||||
|
seen.add(sha)
|
||||||
|
out_dir = Path(out_dir).resolve()
|
||||||
|
out_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
with queue_lock(out_dir):
|
||||||
|
return _run(builds, out_dir, ghidra_home, timeout, limit, retry_failed, worker)
|
||||||
|
|
||||||
|
|
||||||
|
def _run(builds, directory, ghidra_home, timeout, limit, retry_failed, worker):
|
||||||
|
for name in ('states', 'logs'):
|
||||||
|
(directory / name).mkdir(exist_ok=True)
|
||||||
|
env = dict(os.environ)
|
||||||
|
if ghidra_home:
|
||||||
|
env.update(GHIDRA_INSTALL_DIR=str(ghidra_home), GHIDRA_HOME=str(ghidra_home), AMS_USE_PYGHIDRA='1')
|
||||||
|
extractor = fingerprint(env)
|
||||||
|
profile = provider_profile(env)
|
||||||
|
report = {'schema': 'extraction-batch/1', 'attempted': 0, 'succeeded': 0,
|
||||||
|
'pending': 0, 'skipped_success': 0, 'skipped_failed': 0, 'skipped_scope': 0, 'failures': []}
|
||||||
|
for build in builds:
|
||||||
|
if build.get('scope') != 'engine':
|
||||||
|
report['skipped_scope'] += 1
|
||||||
|
continue
|
||||||
|
sha = build['sha256']
|
||||||
|
state_path = directory / 'states' / (sha + '.json')
|
||||||
|
output = directory / (sha + '.snapshot.json')
|
||||||
|
old = json.loads(state_path.read_text()) if state_path.exists() else {}
|
||||||
|
same = old.get('extractor_fingerprint') == extractor
|
||||||
|
# Validate source even when resuming: a manifest is not proof of current contents.
|
||||||
|
source = None
|
||||||
|
for candidate in build.get('paths', []):
|
||||||
|
try:
|
||||||
|
if digest(candidate) == sha:
|
||||||
|
source = Path(candidate).resolve()
|
||||||
|
break
|
||||||
|
except OSError:
|
||||||
|
continue
|
||||||
|
if same and old.get('status') == 'success' and source:
|
||||||
|
try:
|
||||||
|
validate_snapshot(output, sha)
|
||||||
|
if digest(output) != old.get('snapshot_sha256'):
|
||||||
|
raise ValueError('Snapshot content changed since successful extraction')
|
||||||
|
except (OSError, ValueError, TypeError, AttributeError):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
report['skipped_success'] += 1
|
||||||
|
continue
|
||||||
|
if same and old.get('status') in ('failed', 'running') and not retry_failed:
|
||||||
|
report['skipped_failed'] += 1
|
||||||
|
report['failures'].append({'sha256': sha, 'error': old.get('error', 'Interrupted attempt; use --retry-failed')})
|
||||||
|
continue
|
||||||
|
if limit is not None and report['attempted'] >= limit:
|
||||||
|
report['pending'] += 1
|
||||||
|
continue
|
||||||
|
attempt = old.get('attempts', 0) + 1
|
||||||
|
log = directory / 'logs' / (sha + '.' + str(attempt) + '.log')
|
||||||
|
temp = directory / (sha + '.' + uuid.uuid4().hex + '.pending.json')
|
||||||
|
state = {'sha256': sha, 'family': build.get('family'), 'extractor_fingerprint': extractor,
|
||||||
|
'status': 'running', 'attempts': attempt, 'source': str(source) if source else None,
|
||||||
|
'input_name': source.name if source else None, 'provider_profile': profile,
|
||||||
|
'started_at': datetime.now(timezone.utc).isoformat(), 'log': str(log)}
|
||||||
|
atomic_json(state_path, state)
|
||||||
|
report['attempted'] += 1
|
||||||
|
try:
|
||||||
|
if not source:
|
||||||
|
raise ValueError('No source path matches manifest SHA')
|
||||||
|
worker(source, temp, log, timeout, env)
|
||||||
|
snapshot = validate_snapshot(temp, sha)
|
||||||
|
if digest(source) != sha:
|
||||||
|
raise ValueError('Source changed during extraction')
|
||||||
|
snapshot['binary'].update(
|
||||||
|
library=source.name.split('__')[-1],
|
||||||
|
sources=build.get('paths', []),
|
||||||
|
games=sorted({Path(p).name.split('__')[0] for p in build.get('paths', []) if '__' in Path(p).name}),
|
||||||
|
extraction={'fingerprint': extractor, 'provider': profile,
|
||||||
|
'started_at': state['started_at'], 'coverage': 'partial'})
|
||||||
|
snapshot.setdefault('limitations', []).append(
|
||||||
|
'Automated heuristic extraction; missing entries are unknown, not proof of absence.')
|
||||||
|
atomic_json(temp, snapshot)
|
||||||
|
os.replace(temp, output)
|
||||||
|
state['status'] = 'success'
|
||||||
|
state['snapshot'] = str(output)
|
||||||
|
state['snapshot_sha256'] = digest(output)
|
||||||
|
state['coverage'] = {'types': len(snapshot['types']), 'methods': len(snapshot['methods']),
|
||||||
|
'dispatch': len(snapshot.get('method_dispatch') or [])}
|
||||||
|
report['succeeded'] += 1
|
||||||
|
except Exception as exc:
|
||||||
|
state.update(status='failed', error=str(exc))
|
||||||
|
if not log.exists():
|
||||||
|
log.write_text(str(exc) + '\n')
|
||||||
|
report['failures'].append({'sha256': sha, 'error': str(exc)})
|
||||||
|
finally:
|
||||||
|
temp.unlink(missing_ok=True)
|
||||||
|
state['finished_at'] = datetime.now(timezone.utc).isoformat()
|
||||||
|
atomic_json(state_path, state)
|
||||||
|
print(json.dumps({'sha256': sha, 'status': state['status'], 'attempt': attempt}), flush=True)
|
||||||
|
atomic_json(directory / 'failure-report.json', report)
|
||||||
|
return report
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument('--worker', nargs=2, metavar=('DLL', 'OUTPUT'), help=argparse.SUPPRESS)
|
||||||
|
parser.add_argument('--manifest', type=Path)
|
||||||
|
parser.add_argument('--out-dir', type=Path)
|
||||||
|
parser.add_argument('--ghidra-home', type=Path)
|
||||||
|
parser.add_argument('--timeout', type=float, default=1800)
|
||||||
|
parser.add_argument('--limit', type=int)
|
||||||
|
parser.add_argument('--retry-failed', action='store_true')
|
||||||
|
args = parser.parse_args()
|
||||||
|
if args.worker:
|
||||||
|
from .ghidra import run_extractor
|
||||||
|
run_extractor(*args.worker)
|
||||||
|
return
|
||||||
|
if not args.manifest or not args.out_dir:
|
||||||
|
parser.error('--manifest and --out-dir are required')
|
||||||
|
result = run_queue(args.manifest, args.out_dir, ghidra_home=args.ghidra_home,
|
||||||
|
timeout=args.timeout, limit=args.limit, retry_failed=args.retry_failed)
|
||||||
|
print(json.dumps(result))
|
||||||
|
if result['failures']:
|
||||||
|
raise SystemExit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
+19
-1
@@ -20,6 +20,8 @@ then `analyzeHeadless` on PATH.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import json
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
@@ -44,7 +46,7 @@ def find_headless() -> str | None:
|
|||||||
env = os.environ.get("GHIDRA_HEADLESS")
|
env = os.environ.get("GHIDRA_HEADLESS")
|
||||||
if env and os.path.isfile(env):
|
if env and os.path.isfile(env):
|
||||||
return env
|
return env
|
||||||
home = os.environ.get("GHIDRA_HOME")
|
home = os.environ.get("GHIDRA_INSTALL_DIR") or os.environ.get("GHIDRA_HOME")
|
||||||
if home:
|
if home:
|
||||||
for name in ("analyzeHeadless", "analyzeHeadless.bat"):
|
for name in ("analyzeHeadless", "analyzeHeadless.bat"):
|
||||||
cand = os.path.join(home, "support", name)
|
cand = os.path.join(home, "support", name)
|
||||||
@@ -123,9 +125,20 @@ def run_extractor_pyghidra(dll_path: str, out_path: str, *, script_dir: str | No
|
|||||||
|
|
||||||
proj_dir = tempfile.mkdtemp(prefix="ams_pyghidra_")
|
proj_dir = tempfile.mkdtemp(prefix="ams_pyghidra_")
|
||||||
try:
|
try:
|
||||||
|
# Keep headless preferences/caches separate from the user's GUI profile.
|
||||||
|
from pyghidra.launcher import PyGhidraLauncher, HeadlessPyGhidraLauncher
|
||||||
|
if not PyGhidraLauncher.has_launched():
|
||||||
|
launcher = HeadlessPyGhidraLauncher(verbose=False)
|
||||||
|
runtime_home = os.path.join(proj_dir, "runtime-home")
|
||||||
|
os.makedirs(runtime_home)
|
||||||
|
launcher.vm_args.extend(["-Duser.home=" + runtime_home, "-Xmx2G"])
|
||||||
|
launcher.start()
|
||||||
pyghidra.run_script(
|
pyghidra.run_script(
|
||||||
dll_path, script_path,
|
dll_path, script_path,
|
||||||
project_location=proj_dir, project_name="ams_" + uuid.uuid4().hex[:8],
|
project_location=proj_dir, project_name="ams_" + uuid.uuid4().hex[:8],
|
||||||
|
# Ghidra domain-file names reject Unicode combining marks and some
|
||||||
|
# Polish letters. This changes only the internal project name.
|
||||||
|
program_name=re.sub(r"[^A-Za-z0-9_.-]", "_", Path(dll_path).name),
|
||||||
script_args=[out_path], analyze=True, verbose=False,
|
script_args=[out_path], analyze=True, verbose=False,
|
||||||
)
|
)
|
||||||
except Exception as e: # jpype/Ghidra errors aren't a tidy hierarchy
|
except Exception as e: # jpype/Ghidra errors aren't a tidy hierarchy
|
||||||
@@ -135,4 +148,9 @@ def run_extractor_pyghidra(dll_path: str, out_path: str, *, script_dir: str | No
|
|||||||
|
|
||||||
if not os.path.isfile(out_path):
|
if not os.path.isfile(out_path):
|
||||||
raise GhidraRunError("extractor produced no snapshot at {0} (PyGhidra path)".format(out_path))
|
raise GhidraRunError("extractor produced no snapshot at {0} (PyGhidra path)".format(out_path))
|
||||||
|
with open(out_path, encoding="utf-8") as stream:
|
||||||
|
snapshot = json.load(stream)
|
||||||
|
snapshot.setdefault("binary", {})["name"] = Path(dll_path).name
|
||||||
|
with open(out_path, "w", encoding="utf-8") as stream:
|
||||||
|
json.dump(snapshot, stream, indent=2, ensure_ascii=False)
|
||||||
return out_path
|
return out_path
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
"""Inventory all DLL builds by content before scheduling expensive native analysis."""
|
||||||
|
import argparse
|
||||||
|
from collections import Counter
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
def inventory(roots: list[Path], snapshot_dir: Path | None = None) -> dict:
|
||||||
|
extracted = set()
|
||||||
|
if snapshot_dir:
|
||||||
|
for path in snapshot_dir.glob("*.snapshot.json"):
|
||||||
|
sha = json.loads(path.read_text()).get("binary", {}).get("sha256")
|
||||||
|
if sha:
|
||||||
|
extracted.add(sha.lower())
|
||||||
|
builds = {}
|
||||||
|
for root in roots:
|
||||||
|
if not root.exists():
|
||||||
|
raise ValueError("Source does not exist: " + str(root))
|
||||||
|
paths = [root] if root.is_file() else sorted(root.rglob("*"))
|
||||||
|
for path in paths:
|
||||||
|
if path.suffix.lower() != ".dll" or not path.is_file():
|
||||||
|
continue
|
||||||
|
blob = path.read_bytes()
|
||||||
|
sha = hashlib.sha256(blob).hexdigest()
|
||||||
|
name = path.name.split("__")[-1].upper()
|
||||||
|
if re.fullmatch(r"PIKLIB(?:61|71|72|8)\.DLL", name):
|
||||||
|
family, scope = name.removesuffix(".DLL"), "engine"
|
||||||
|
elif name.startswith("BLOOMOO"):
|
||||||
|
family, scope = "BLOOMOO", "engine"
|
||||||
|
elif name in ("WORLD.DLL", "KOLOROWANKA.DLL"):
|
||||||
|
family, scope = name.removesuffix(".DLL"), "plugin"
|
||||||
|
elif name == "SEKAI.DLL":
|
||||||
|
family, scope = "SEKAI", "native_dependency"
|
||||||
|
elif "PIKLIB" in name:
|
||||||
|
family, scope = name.removesuffix(".DLL"), "excluded_early_engine"
|
||||||
|
else:
|
||||||
|
family, scope = name, "unclassified"
|
||||||
|
build = builds.setdefault(sha, {"sha256": sha, "size": len(blob), "family": family,
|
||||||
|
"scope": scope, "paths": [], "analysis": "snapshot_available" if sha in extracted else "pending",
|
||||||
|
"suggested_snapshot": sha + ".snapshot.json"})
|
||||||
|
absolute = str(path.resolve())
|
||||||
|
if absolute not in build["paths"]:
|
||||||
|
build["paths"].append(absolute)
|
||||||
|
result = sorted(builds.values(), key=lambda b: (b["family"], b["sha256"]))
|
||||||
|
return {"schema": "binary-inventory/1", "builds": result,
|
||||||
|
"summary": {"files": sum(len(b["paths"]) for b in result), "unique": len(result),
|
||||||
|
"by_scope": dict(Counter(b["scope"] for b in result))},
|
||||||
|
"limitations": ["Scope is inferred from filenames; validate renamed or unclassified DLLs.",
|
||||||
|
"snapshot_available means identity matches; it does not establish complete API extraction."]}
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
p = argparse.ArgumentParser(description=__doc__)
|
||||||
|
p.add_argument("roots", nargs="+", type=Path)
|
||||||
|
p.add_argument("--snapshots", type=Path)
|
||||||
|
p.add_argument("--out", type=Path, required=True)
|
||||||
|
a = p.parse_args()
|
||||||
|
result = inventory(a.roots, a.snapshots)
|
||||||
|
a.out.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n")
|
||||||
|
print(json.dumps(result["summary"]))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,593 @@
|
|||||||
|
{
|
||||||
|
"schema": "binary-inventory/1",
|
||||||
|
"builds": [
|
||||||
|
{
|
||||||
|
"sha256": "1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf",
|
||||||
|
"size": 2498560,
|
||||||
|
"family": "BLOOMOO",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Kretes w akcji__fb9a2b81d685__BlooMooDLL.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d",
|
||||||
|
"size": 2506752,
|
||||||
|
"family": "BLOOMOO",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Kapitan Nemo__3be911183e59__BLOOMOOD.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Kapitan Nemo__3be911183e59__BlooMooDLL.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "41249638fbb62c7a3cc2785ae7d6a4a736ad52c9cc7d9709a7067b52ede07b69",
|
||||||
|
"size": 1961984,
|
||||||
|
"family": "BLOOMOO",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Język niemiecki dla najmłodszych PL__f5b6842faf88__BLOOMOOW.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Język niemiecki dla najmłodszych PL__f5b6842faf88__BlooMooWEB.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "41249638fbb62c7a3cc2785ae7d6a4a736ad52c9cc7d9709a7067b52ede07b69.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "848761c5e9fa2bd5345cfff33b96d3194dd3cbe5dfce297f722b143c50aa7a5f",
|
||||||
|
"size": 1712128,
|
||||||
|
"family": "BLOOMOO",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Alfabet i Nauka Czytania__788ab0406ab4__BLOOMOOD.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Alfabet i Nauka Czytania__788ab0406ab4__BlooMooDLL.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "848761c5e9fa2bd5345cfff33b96d3194dd3cbe5dfce297f722b143c50aa7a5f.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "a0060b283fccd1ffbe5dc49a947eb856540aa3db155f96d44afb0e4f97e9de6e",
|
||||||
|
"size": 2588672,
|
||||||
|
"family": "BLOOMOO",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Roszpunka RU__d63a5fb575f9__BLOOMOOD.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Roszpunka RU__d63a5fb575f9__BlooMooDLL.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "a0060b283fccd1ffbe5dc49a947eb856540aa3db155f96d44afb0e4f97e9de6e.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "be1e6c7c15b8bbac78a637fa992860d378ef922020ee78ac0e6102a0cacb100a",
|
||||||
|
"size": 1581056,
|
||||||
|
"family": "BLOOMOO",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Wehikuł Czasu__2679920b3735__BLOOMOOD.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Wehikuł Czasu__2679920b3735__BlooMooDLL.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "be1e6c7c15b8bbac78a637fa992860d378ef922020ee78ac0e6102a0cacb100a.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "d5ec62c16ee4ae84486e2076864a6b1e52aaaed311eb65b3a1847701a583b501",
|
||||||
|
"size": 2588672,
|
||||||
|
"family": "BLOOMOO",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Kraina Wyobraźni moje pierwsze studio plastyczne__9ac8ebbe0cc2__BLOOMOOD.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Kraina Wyobraźni moje pierwsze studio plastyczne__9ac8ebbe0cc2__BlooMooDLL.dll",
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek. Moje pierwsze literki__9ac8ebbe0cc2__BLOOMOOD.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek. Moje pierwsze literki__9ac8ebbe0cc2__BlooMooDLL.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "d5ec62c16ee4ae84486e2076864a6b1e52aaaed311eb65b3a1847701a583b501.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "91d5cb531723746a24c4be6182c609c0350336a83811b56012d917d375ea6fe0",
|
||||||
|
"size": 327680,
|
||||||
|
"family": "DPIKLIB",
|
||||||
|
"scope": "excluded_early_engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/ABC z Reksiem__e07b7a6f7f91__DPIKLIB.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek Pamiątki z podróży__e07b7a6f7f91__DPIKLIB.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i przyjaciele__e07b7a6f7f91__DPIKLIB.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "91d5cb531723746a24c4be6182c609c0350336a83811b56012d917d375ea6fe0.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "7f26356f30f283f7697c9b430fadc68e3932b124dd099d4affd4dc3a21d8e06e",
|
||||||
|
"size": 126976,
|
||||||
|
"family": "KOLOROWANKA",
|
||||||
|
"scope": "plugin",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/Reksio/Herkules + Odyseusz/Odyseusz/Kolorowanka.dll"
|
||||||
|
],
|
||||||
|
"analysis": "snapshot_available",
|
||||||
|
"suggested_snapshot": "7f26356f30f283f7697c9b430fadc68e3932b124dd099d4affd4dc3a21d8e06e.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "fc6127e077d0dc8898b60373000847d82264fa30781de50365445bec286de349",
|
||||||
|
"size": 348160,
|
||||||
|
"family": "PIKLIB30",
|
||||||
|
"scope": "excluded_early_engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Na tropie zaginionej księgi ortografii__a96ea4f86178__PIKLIB30.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "fc6127e077d0dc8898b60373000847d82264fa30781de50365445bec286de349.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "5178f0fc7e02859d023e0d077daa1589870d81875661945728e1ae602153650d",
|
||||||
|
"size": 466944,
|
||||||
|
"family": "PIKLIB41",
|
||||||
|
"scope": "excluded_early_engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Alfabet Nauka czytania i pisania__002863beef82__PIKLIB41.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Matematyka Dodawanie i odejmowanie__002863beef82__PIKLIB41.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "5178f0fc7e02859d023e0d077daa1589870d81875661945728e1ae602153650d.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "99a51a28d70ac5dc1a91b7c67e85e6c69d0261c4b977e0ab660419caa4c521a4",
|
||||||
|
"size": 357072,
|
||||||
|
"family": "PIKLIB41",
|
||||||
|
"scope": "excluded_early_engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/ABC z Reksiem [piklib41]__0cf39b192793__PIKLIB41.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "99a51a28d70ac5dc1a91b7c67e85e6c69d0261c4b977e0ab660419caa4c521a4.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "0cc29c00b415ac40dc71e9265be297ec12cd8b9a68f2e1a7ec97338710595c92",
|
||||||
|
"size": 466944,
|
||||||
|
"family": "PIKLIB50",
|
||||||
|
"scope": "excluded_early_engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Wielki Teleturniej Smoka Wawelskiego [piklib5]__414f63369464__PIKLIB50.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "0cc29c00b415ac40dc71e9265be297ec12cd8b9a68f2e1a7ec97338710595c92.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "e426581101136e80f11784cff63022361338eaaf43463c22ff31ac7dcf954b44",
|
||||||
|
"size": 573440,
|
||||||
|
"family": "PIKLIB60",
|
||||||
|
"scope": "excluded_early_engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Liczę z Reksiem__b8d13e830b9c__PIKLIB60.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "e426581101136e80f11784cff63022361338eaaf43463c22ff31ac7dcf954b44.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "39bb96560cd7e08dfb9aaaf0a31a390bfcc2311d1190e088b1b46e1a006dd33d",
|
||||||
|
"size": 925696,
|
||||||
|
"family": "PIKLIB61",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Pinokio__c0f83acd825b__PIKLIB61.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "39bb96560cd7e08dfb9aaaf0a31a390bfcc2311d1190e088b1b46e1a006dd33d.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "44913173dd58411c8e20aed51276989fc41a7aa63f7a20f03701f6275aab420e",
|
||||||
|
"size": 757760,
|
||||||
|
"family": "PIKLIB61",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Aladyn__91b0330a11ab__PIKLIB61.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "44913173dd58411c8e20aed51276989fc41a7aa63f7a20f03701f6275aab420e.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "694ce89d3030dc81b136cef2667fcd853e3f28ebe91d82ff0850e94a1935fbcb",
|
||||||
|
"size": 704512,
|
||||||
|
"family": "PIKLIB61",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów [piklib61]__715272459e13__PIKLIB61.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "snapshot_available",
|
||||||
|
"suggested_snapshot": "694ce89d3030dc81b136cef2667fcd853e3f28ebe91d82ff0850e94a1935fbcb.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "a02d2faa5b203e6c0008842f851d75a50a0f54a61b03c291feffe1b9a9051fe3",
|
||||||
|
"size": 704512,
|
||||||
|
"family": "PIKLIB61",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów [piklib61]__3bb31de8b45f__PIKLIB61.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "a02d2faa5b203e6c0008842f851d75a50a0f54a61b03c291feffe1b9a9051fe3.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "e8a86390bcfabf29e8ca9d80e95df501988275aa0f170acb34081c19204dc58e",
|
||||||
|
"size": 774144,
|
||||||
|
"family": "PIKLIB61",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Piotruś Pan PL__9de20dceea68__PIKLIB61.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "e8a86390bcfabf29e8ca9d80e95df501988275aa0f170acb34081c19204dc58e.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "b213bb58e4ce2806d40786f79a62e658ca190dc4d997653fa2a6706493fa4bb8",
|
||||||
|
"size": 1064960,
|
||||||
|
"family": "PIKLIB71",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i UFO [piklib71]__128b235b6d94__PIKLIB71.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "b213bb58e4ce2806d40786f79a62e658ca190dc4d997653fa2a6706493fa4bb8.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "ff6b4fad38684cc44a672b0475d7d5ade34c8e91e76dd3d330d6121d3847a367",
|
||||||
|
"size": 1064960,
|
||||||
|
"family": "PIKLIB71",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów [piklib71]__27c2b7699f01__PIKLIB71.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "ff6b4fad38684cc44a672b0475d7d5ade34c8e91e76dd3d330d6121d3847a367.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "7d64081b57fb645e3fb7fef823baed4ae193a5e0e1848e451bf069ccf28aa2c7",
|
||||||
|
"size": 1118208,
|
||||||
|
"family": "PIKLIB72",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Ortografia__923a103d5b05__PIKLIB72.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "7d64081b57fb645e3fb7fef823baed4ae193a5e0e1848e451bf069ccf28aa2c7.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "f83c0c553d3a16ed3dc14b8358e9a7ad5464dc46caecc032c371b9f5a0c90c73",
|
||||||
|
"size": 1118208,
|
||||||
|
"family": "PIKLIB72",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Szkoła Koziołka Matołka [piklib72]__549b6851b2c9__PIKLIB72.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "f83c0c553d3a16ed3dc14b8358e9a7ad5464dc46caecc032c371b9f5a0c90c73.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57",
|
||||||
|
"size": 1380352,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Robin Hood PL__bd761ca745b1__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87",
|
||||||
|
"size": 1855488,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009",
|
||||||
|
"size": 1826816,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e",
|
||||||
|
"size": 1523712,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "6da6954eddead85d1ea2862bab2aeca13bdc44997766157bc7be2569819239f6",
|
||||||
|
"size": 1896448,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek - Olimpiada Letnia__42d6a0c7fdf2__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "6da6954eddead85d1ea2862bab2aeca13bdc44997766157bc7be2569819239f6.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "90b61f1f8d10532fd8f7fc976aa56ffbf2d2e9b7c23006fb0770f951fc10f198",
|
||||||
|
"size": 1830560,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek Zwariowana olimpiada PL__d3819a92b84b__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "90b61f1f8d10532fd8f7fc976aa56ffbf2d2e9b7c23006fb0770f951fc10f198.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "94b4c2ed80953028a4cb6ead67a72ed3059bfe2c59809492d758791f51ac2f61",
|
||||||
|
"size": 1826816,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Przedszkole Reksia__33cfd6523c04__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "94b4c2ed80953028a4cb6ead67a72ed3059bfe2c59809492d758791f51ac2f61.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "987d69fad1021e02ce9637a873da87145b1db997f191f6aabfb8f66405dc77a1",
|
||||||
|
"size": 1826816,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Wesołe Przedszkole Bolka i Lolka PL__c0d85c50e3dc__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "987d69fad1021e02ce9637a873da87145b1db997f191f6aabfb8f66405dc77a1.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "a5dea135d4ce909abedd3b7623dc1e7390f578f5242799c66b266257a04de86b",
|
||||||
|
"size": 1831680,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Ufo__5f6cbb33576d__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "snapshot_available",
|
||||||
|
"suggested_snapshot": "a5dea135d4ce909abedd3b7623dc1e7390f578f5242799c66b266257a04de86b.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "a6fae72f648895829e115a7a49c31165f57264705074fec5742c34c651cf5882",
|
||||||
|
"size": 1892352,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Tezeusz i Nić Ariadny__0967908f2df1__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "a6fae72f648895829e115a7a49c31165f57264705074fec5742c34c651cf5882.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "a7fbfc4600c3f897fc58d8c8d1626ef43de5c9f0742dfcc89d5b865f5b163f91",
|
||||||
|
"size": 1826816,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Alibaba, Robinson Crusoe PL__e80093de9636__PIKLIB8.DLL",
|
||||||
|
"/Users/genszu/_dll_repository/Herkules, Odyseusz PL__e80093de9636__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "a7fbfc4600c3f897fc58d8c8d1626ef43de5c9f0742dfcc89d5b865f5b163f91.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "d55caf201190d20275db6c26e014664f3b8f65c5fb6bbd2cc81d03aaa3037977",
|
||||||
|
"size": 1826816,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Alibaba, Robinson Crusoe PL__d6509a132e2a__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "d55caf201190d20275db6c26e014664f3b8f65c5fb6bbd2cc81d03aaa3037977.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "d6968a236288270e90604f5d401244d57ca0882c1405fcf0867dcd3b3e0d64c9",
|
||||||
|
"size": 1826816,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/doktor dolittle i sindbad__2c1705410e7a__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "d6968a236288270e90604f5d401244d57ca0882c1405fcf0867dcd3b3e0d64c9.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "d9cf5a3896c9941348d1246e4830096b192f1f0e107b1d7b1e2d73840c0204a2",
|
||||||
|
"size": 1511424,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Wyprawa po Złote Runo__d1cc807bcbe5__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "d9cf5a3896c9941348d1246e4830096b192f1f0e107b1d7b1e2d73840c0204a2.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "ec833739ba267aa137d5f69144ee73711e57710af4ffdb8cd9403dc016f7cf40",
|
||||||
|
"size": 1515520,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Czarodzieje__a70f97e970c6__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "ec833739ba267aa137d5f69144ee73711e57710af4ffdb8cd9403dc016f7cf40.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "f21e0b6ff7c0110e4610c9cf93966a1d75b1b5155f7a2330cef1c742930da8ff",
|
||||||
|
"size": 1515520,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio_I_Czarodzieje1.0__92d602bbea05__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "f21e0b6ff7c0110e4610c9cf93966a1d75b1b5155f7a2330cef1c742930da8ff.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "f6bb9e5fcdd0fe5dfff3885ca4c713f1c99d0559d614a78cc0d7bbc22923c5d6",
|
||||||
|
"size": 1163264,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek I Lolek Angielski Dla Dzieci__f95af58f4d8a__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "f6bb9e5fcdd0fe5dfff3885ca4c713f1c99d0559d614a78cc0d7bbc22923c5d6.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "fc77764002f4b2e883227a16e566fabf613df24871db8e6e6d1f71b7eedbd732",
|
||||||
|
"size": 1826816,
|
||||||
|
"family": "PIKLIB8",
|
||||||
|
"scope": "engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów__87c5ca97f599__PIKLIB8.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "fc77764002f4b2e883227a16e566fabf613df24871db8e6e6d1f71b7eedbd732.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "0d195870b5ea316ef6ce0bcfc27424f0b5da7bc1210cbb5b44f7bb1ca3665a0f",
|
||||||
|
"size": 430080,
|
||||||
|
"family": "RPIKLIB",
|
||||||
|
"scope": "excluded_early_engine",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/ABC z Reksiem__8ad3452eb8b7__RPIKLIB.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "0d195870b5ea316ef6ce0bcfc27424f0b5da7bc1210cbb5b44f7bb1ca3665a0f.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "5959dd4e105e2e8588dd3da4473afa8c683f646d9b12a513e7bb84a9fdd558b4",
|
||||||
|
"size": 73728,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Alibaba, Robinson Crusoe PL__5baf3b1df15f__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "5959dd4e105e2e8588dd3da4473afa8c683f646d9b12a513e7bb84a9fdd558b4.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "63f8561000794d714a55c3ae9c8423f8593c4016524b60fc5da74dae2e1dbb21",
|
||||||
|
"size": 245760,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Ortografia__8513603d192e__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "63f8561000794d714a55c3ae9c8423f8593c4016524b60fc5da74dae2e1dbb21.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "725f6da8a3aa1548ddbc6939319e1ea16035be94064cbe1e3ccceaf3acfd2b86",
|
||||||
|
"size": 278528,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Czarodzieje__aca5c14da8db__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "725f6da8a3aa1548ddbc6939319e1ea16035be94064cbe1e3ccceaf3acfd2b86.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "9430c526782c69fc8d798e610e4e24eb8b73f44a309a431bbc43f3dfb3b3d32b",
|
||||||
|
"size": 278528,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio_I_Czarodzieje1.0__3363ec44e6d4__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "9430c526782c69fc8d798e610e4e24eb8b73f44a309a431bbc43f3dfb3b3d32b.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "b1c91c2ba709dfb482632a28f1ac53f1070b54000426093ee5ae3f7c0144d773",
|
||||||
|
"size": 245760,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Szkoła Koziołka Matołka [piklib72]__8fb55fc3d1c6__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "b1c91c2ba709dfb482632a28f1ac53f1070b54000426093ee5ae3f7c0144d773.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "c8d8df6b4527f4e81655342c085a1b638563415c7811794afdd0cb05ad93852f",
|
||||||
|
"size": 278528,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Reksio i Wehikuł Czasu__d0fe69735317__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "c8d8df6b4527f4e81655342c085a1b638563415c7811794afdd0cb05ad93852f.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "e7e00063606af2b8c8974c0f0aab80e12b7212d66a01096678913efdc7c877a9",
|
||||||
|
"size": 282272,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/Bolek i Lolek Zwariowana olimpiada PL__f90cfb00a154__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "e7e00063606af2b8c8974c0f0aab80e12b7212d66a01096678913efdc7c877a9.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "ef68c5f8240fbcd4eb7f9098ca2725515825ff6e1809bab244ae708eca9adfc2",
|
||||||
|
"size": 278528,
|
||||||
|
"family": "SEKAI",
|
||||||
|
"scope": "native_dependency",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/_dll_repository/doktor dolittle i sindbad__91e04c514af8__SEKAI.DLL"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "ef68c5f8240fbcd4eb7f9098ca2725515825ff6e1809bab244ae708eca9adfc2.snapshot.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha256": "1f6649e93ddbd12be1865a06f15fbae5c62685dab0efb9072bdd2af1ccaca78f",
|
||||||
|
"size": 131072,
|
||||||
|
"family": "WORLD",
|
||||||
|
"scope": "plugin",
|
||||||
|
"paths": [
|
||||||
|
"/Users/genszu/Reksio/Reksio i Czarodzieje/World.dll"
|
||||||
|
],
|
||||||
|
"analysis": "pending",
|
||||||
|
"suggested_snapshot": "1f6649e93ddbd12be1865a06f15fbae5c62685dab0efb9072bdd2af1ccaca78f.snapshot.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": {
|
||||||
|
"files": 64,
|
||||||
|
"unique": 51,
|
||||||
|
"by_scope": {
|
||||||
|
"engine": 34,
|
||||||
|
"excluded_early_engine": 7,
|
||||||
|
"plugin": 2,
|
||||||
|
"native_dependency": 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"limitations": [
|
||||||
|
"Scope is inferred from filenames; validate renamed or unclassified DLLs.",
|
||||||
|
"snapshot_available means identity matches; it does not establish complete API extraction."
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# Resumable engine extraction
|
||||||
|
|
||||||
|
Generate an inventory with `python -m ams.inventory ROOT --out inventory.json`, then run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python -m ams.acquire.batch --manifest inventory.json --out-dir snapshots/batch \
|
||||||
|
--ghidra-home /path/to/ghidra --timeout 1800 --limit 2
|
||||||
|
```
|
||||||
|
|
||||||
|
Only `engine` entries run. Plugins and native dependencies require their own extraction paths. Remove `--limit` for the full engine inventory. This queue measures successful extraction, not completeness or functional correctness.
|
||||||
|
|
||||||
|
Snapshots are named `<sha256>.snapshot.json`. Each attempt runs in a fresh Python process and process group; the timeout kills that group, including native children. A supplied Ghidra home selects PyGhidra. Otherwise the current wrapper environment chooses the backend.
|
||||||
|
|
||||||
|
State records live in `states/`, separate attempt logs in `logs/`, and the last invocation's summary/failures in `failure-report.json`. Every attempt verifies source content before and after analysis. A successful snapshot must contain the expected binary SHA and nonempty types and methods. Writes are atomic, and failed refreshes preserve the prior snapshot.
|
||||||
|
|
||||||
|
Re-running skips validated successes with the same extractor fingerprint. The fingerprint includes the queue, wrapper, Python extractor scripts, selected provider, configured Ghidra installation and application properties, PyGhidra version when installed, Python version and Java home. Changes trigger refreshes. Snapshot byte hashes detect edits even when the embedded binary identity remains unchanged. Successful state records include raw type, method and dispatch record counts (not unique API names) and the input filename. Failures and interrupted attempts require `--retry-failed`. A POSIX advisory lock prevents simultaneous writers to one output directory. Avoid external edits to queue state or snapshots while extraction runs.
|
||||||
|
|
||||||
|
Failure reports include skipped failed attempts, and the CLI exits 1 if failures remain. `--limit` limits attempted builds in that invocation; scope exclusions and resumed successes do not consume it. A limit of zero performs no extraction. The report counts unattempted engine builds as `pending` when the limit is reached. A prior snapshot alone, without matching successful queue state, is not trusted as a completed queue attempt.
|
||||||
|
|
||||||
|
## Local macOS setup
|
||||||
|
|
||||||
|
The API environment and Ghidra worker use separate Python environments. The tested Ghidra 12.1.2 distribution supplies PyGhidra and JPype wheels compatible with Python 3.12; the API environment uses Python 3.14. From this repository:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
.venv-ghidra/bin/python -m ams.acquire.batch \
|
||||||
|
--manifest data/binary-inventory.json --out-dir snapshots/batch \
|
||||||
|
--ghidra-home /Users/genszu/Downloads/GhidraMacOS/ghidra_install/ghidra/ghidra_12.1.2_PUBLIC \
|
||||||
|
--timeout 600 --retry-failed
|
||||||
|
```
|
||||||
|
|
||||||
|
No interactive Ghidra window or Hopper license is needed. `--ghidra-home` configures both `GHIDRA_HOME` and `GHIDRA_INSTALL_DIR` for the worker; setting `GHIDRA_HOME` was not a mistake. Each worker gets a temporary project and runtime home, and the original DLL is only read. Internal Ghidra program names are sanitized to ASCII because repository filenames can contain Polish characters; snapshots retain the original filename and SHA.
|
||||||
|
|
||||||
|
The bundled inventory records 64 file paths / 51 distinct SHA-256 values: 34 engine builds in scope, 2 script plugins, 8 native Sekai dependencies and 7 earlier engines excluded from this batch. WORLD and KOLOROWANKA have separately documented registration snapshots. Scope classification is based on filenames, so review newly added or renamed files.
|
||||||
|
|
||||||
|
Snapshot metadata retains all source paths and game aliases, extraction fingerprint and provider version. The original files must remain available to verify resumed successes. The queue is sequential; independent manifests can be processed in separate output directories. Do not edit extractor code while a queue is running.
|
||||||
|
|
||||||
|
Wynik pełnego przebiegu i kolejność dalszych prac: [batch-results.md](batch-results.md).
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from ams.acquire import batch
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def setup(tmp_path):
|
||||||
|
dll = tmp_path / 'engine.dll'
|
||||||
|
dll.write_bytes(b'engine')
|
||||||
|
sha = hashlib.sha256(dll.read_bytes()).hexdigest()
|
||||||
|
manifest = tmp_path / 'manifest.json'
|
||||||
|
manifest.write_text(json.dumps({'schema': 'binary-inventory/1', 'builds': [
|
||||||
|
{'sha256': sha, 'paths': [str(dll)], 'scope': 'engine', 'family': 'PIKLIB8'}]}))
|
||||||
|
return dll, sha, manifest, tmp_path / 'out'
|
||||||
|
|
||||||
|
|
||||||
|
def success(source, output, log, timeout, env):
|
||||||
|
output.write_text(json.dumps({'binary': {'sha256': batch.digest(source)},
|
||||||
|
'types': [{'name': 'X'}], 'methods': [{'name': 'Y'}]}))
|
||||||
|
log.write_text('ok')
|
||||||
|
|
||||||
|
|
||||||
|
def test_success_resume_and_input_change(setup):
|
||||||
|
dll, sha, manifest, out = setup
|
||||||
|
assert batch.run_queue(manifest, out, worker=success)['succeeded'] == 1
|
||||||
|
assert batch.run_queue(manifest, out, worker=success)['skipped_success'] == 1
|
||||||
|
dll.write_bytes(b'changed')
|
||||||
|
result = batch.run_queue(manifest, out, worker=success)
|
||||||
|
assert result['failures'][0]['error'] == 'No source path matches manifest SHA'
|
||||||
|
assert json.loads((out / (sha + '.snapshot.json')).read_text())['binary']['sha256'] == sha
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('kind', ['failed', 'timeout', 'empty', 'mismatch', 'missing'])
|
||||||
|
def test_failure_retry(setup, kind):
|
||||||
|
dll, sha, manifest, out = setup
|
||||||
|
def broken(source, output, log, timeout, env):
|
||||||
|
if kind == 'failed':
|
||||||
|
raise RuntimeError('crashed')
|
||||||
|
if kind == 'timeout':
|
||||||
|
raise subprocess.TimeoutExpired('worker', timeout)
|
||||||
|
if kind == 'missing':
|
||||||
|
return
|
||||||
|
success(source, output, log, timeout, env)
|
||||||
|
data = json.loads(output.read_text())
|
||||||
|
if kind == 'empty':
|
||||||
|
data['methods'] = []
|
||||||
|
else:
|
||||||
|
data['binary']['sha256'] = '0' * 64
|
||||||
|
output.write_text(json.dumps(data))
|
||||||
|
assert batch.run_queue(manifest, out, worker=broken)['failures']
|
||||||
|
assert not (out / (sha + '.snapshot.json')).exists()
|
||||||
|
assert batch.run_queue(manifest, out, worker=success)['skipped_failed'] == 1
|
||||||
|
assert batch.run_queue(manifest, out, worker=success, retry_failed=True)['succeeded'] == 1
|
||||||
|
state = json.loads((out / 'states' / (sha + '.json')).read_text())
|
||||||
|
assert state['attempts'] == 2
|
||||||
|
|
||||||
|
|
||||||
|
def test_fingerprint_change_and_failure_preserves_snapshot(setup, monkeypatch):
|
||||||
|
dll, sha, manifest, out = setup
|
||||||
|
batch.run_queue(manifest, out, worker=success)
|
||||||
|
previous = (out / (sha + '.snapshot.json')).read_bytes()
|
||||||
|
monkeypatch.setattr(batch, 'fingerprint', lambda env=None: 'changed')
|
||||||
|
def fail(*args):
|
||||||
|
raise RuntimeError('no')
|
||||||
|
assert batch.run_queue(manifest, out, worker=fail)['attempted'] == 1
|
||||||
|
assert (out / (sha + '.snapshot.json')).read_bytes() == previous
|
||||||
|
|
||||||
|
|
||||||
|
def test_lock_and_scope_limit(setup):
|
||||||
|
dll, sha, manifest, out = setup
|
||||||
|
assert batch.run_queue(manifest, out, limit=0, worker=success)['attempted'] == 0
|
||||||
|
with batch.queue_lock(out):
|
||||||
|
with pytest.raises(RuntimeError, match='Another'):
|
||||||
|
batch.run_queue(manifest, out, worker=success)
|
||||||
|
data = json.loads(manifest.read_text())
|
||||||
|
data['builds'][0]['scope'] = 'plugin'
|
||||||
|
manifest.write_text(json.dumps(data))
|
||||||
|
assert batch.run_queue(manifest, out, worker=success)['skipped_scope'] == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_timeout_kills_process_group(tmp_path, monkeypatch):
|
||||||
|
calls = []
|
||||||
|
class Process:
|
||||||
|
pid = 123
|
||||||
|
def wait(self, timeout=None):
|
||||||
|
calls.append(('wait', timeout))
|
||||||
|
if timeout is not None:
|
||||||
|
raise subprocess.TimeoutExpired('test', timeout)
|
||||||
|
def popen(*args, **kwargs):
|
||||||
|
assert kwargs['start_new_session']
|
||||||
|
return Process()
|
||||||
|
monkeypatch.setattr(batch.subprocess, 'Popen', popen)
|
||||||
|
monkeypatch.setattr(batch.os, 'killpg', lambda *args: calls.append(('killpg', args)))
|
||||||
|
with pytest.raises(subprocess.TimeoutExpired):
|
||||||
|
batch.execute_worker(tmp_path / 'dll', tmp_path / 'out', tmp_path / 'log', 0.1, {})
|
||||||
|
assert ('killpg', (123, batch.signal.SIGKILL)) in calls
|
||||||
|
assert calls[-1] == ('wait', None)
|
||||||
|
|
||||||
|
|
||||||
|
def test_snapshot_tamper_forces_refresh(setup):
|
||||||
|
dll, sha, manifest, out = setup
|
||||||
|
batch.run_queue(manifest, out, worker=success)
|
||||||
|
path = out / (sha + '.snapshot.json')
|
||||||
|
data = json.loads(path.read_text())
|
||||||
|
data['methods'].append({'name': 'INVENTED'})
|
||||||
|
path.write_text(json.dumps(data))
|
||||||
|
assert batch.run_queue(manifest, out, worker=success)['succeeded'] == 1
|
||||||
|
state = json.loads((out / 'states' / (sha + '.json')).read_text())
|
||||||
|
assert state['coverage'] == {'types': 1, 'methods': 1, 'dispatch': 0}
|
||||||
|
assert state['input_name'] == 'engine.dll'
|
||||||
|
|
||||||
|
|
||||||
|
def test_provider_version_fingerprint(tmp_path):
|
||||||
|
props = tmp_path / 'Ghidra' / 'application.properties'
|
||||||
|
props.parent.mkdir()
|
||||||
|
props.write_text('application.version=12.1')
|
||||||
|
env = {'GHIDRA_INSTALL_DIR': str(tmp_path), 'AMS_USE_PYGHIDRA': '1'}
|
||||||
|
before = batch.fingerprint(env)
|
||||||
|
props.write_text('application.version=12.2')
|
||||||
|
assert batch.fingerprint(env) != before
|
||||||
|
assert batch.fingerprint({**env, 'AMS_USE_PYGHIDRA': ''}) != batch.fingerprint(env)
|
||||||
|
|
||||||
|
|
||||||
|
def test_limit_reports_pending(setup):
|
||||||
|
dll, sha, manifest, out = setup
|
||||||
|
result = batch.run_queue(manifest, out, limit=0, worker=success)
|
||||||
|
assert result['pending'] == 1
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import types
|
||||||
|
|
||||||
|
from ams.acquire import ghidra
|
||||||
|
|
||||||
|
|
||||||
|
def test_pyghidra_unicode_source_uses_safe_domain_name(tmp_path, monkeypatch):
|
||||||
|
"""Ghidra rejects Unicode domain names; the DLL path and identity must survive."""
|
||||||
|
source = tmp_path / 'Piotruś Pan i Wehikuł__PIKLIB61.DLL'
|
||||||
|
source.write_bytes(b'dll')
|
||||||
|
output = tmp_path / 'out.json'
|
||||||
|
calls = []
|
||||||
|
class Launcher:
|
||||||
|
vm_args = []
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
self.vm_args = []
|
||||||
|
@staticmethod
|
||||||
|
def has_launched():
|
||||||
|
return False
|
||||||
|
def start(self):
|
||||||
|
calls.append(self.vm_args)
|
||||||
|
def run_script(dll, script, **kwargs):
|
||||||
|
assert dll == str(source)
|
||||||
|
assert kwargs['program_name'].isascii()
|
||||||
|
assert ' ' not in kwargs['program_name']
|
||||||
|
output.write_text(json.dumps({'binary': {'name': kwargs['program_name'], 'sha256': 'a'*64}}))
|
||||||
|
monkeypatch.setitem(sys.modules, 'pyghidra', types.SimpleNamespace(run_script=run_script))
|
||||||
|
monkeypatch.setitem(sys.modules, 'pyghidra.launcher', types.SimpleNamespace(
|
||||||
|
PyGhidraLauncher=Launcher, HeadlessPyGhidraLauncher=Launcher))
|
||||||
|
ghidra.run_extractor_pyghidra(str(source), str(output))
|
||||||
|
assert calls
|
||||||
|
assert json.loads(output.read_text())['binary']['name'] == source.name
|
||||||
|
|
||||||
|
|
||||||
|
def test_find_headless_accepts_rea_variable(tmp_path, monkeypatch):
|
||||||
|
launcher = tmp_path / 'support' / 'analyzeHeadless'
|
||||||
|
launcher.parent.mkdir()
|
||||||
|
launcher.touch()
|
||||||
|
monkeypatch.delenv('GHIDRA_HEADLESS', raising=False)
|
||||||
|
monkeypatch.setenv('GHIDRA_INSTALL_DIR', str(tmp_path))
|
||||||
|
assert ghidra.find_headless() == str(launcher)
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
from ams.inventory import inventory
|
||||||
|
|
||||||
|
|
||||||
|
def test_inventory_hashes_actual_bytes_and_preserves_aliases(tmp_path):
|
||||||
|
(tmp_path / "Game__falsehash__PIKLIB8.DLL").write_bytes(b"same")
|
||||||
|
(tmp_path / "Other__falsehash__PIKLIB8.DLL").write_bytes(b"same")
|
||||||
|
(tmp_path / "Game__falsehash__PIKLIB61.DLL").write_bytes(b"different")
|
||||||
|
(tmp_path / "Game [piklib72]__falsehash__SEKAI.DLL").write_bytes(b"sekai")
|
||||||
|
(tmp_path / "PIKLIB41.DLL").write_bytes(b"old")
|
||||||
|
sha = hashlib.sha256(b"same").hexdigest()
|
||||||
|
(tmp_path / "test.snapshot.json").write_text(json.dumps({"binary":{"sha256":sha}}))
|
||||||
|
result = inventory([tmp_path],tmp_path)
|
||||||
|
assert result["summary"] == {"files":5,"unique":4,"by_scope":{"engine":2,"native_dependency":1,"excluded_early_engine":1}}
|
||||||
|
same = next(b for b in result["builds"] if b["sha256"] == sha)
|
||||||
|
assert len(same["paths"]) == 2
|
||||||
|
assert same["analysis"] == "snapshot_available"
|
||||||
|
assert same["suggested_snapshot"] == sha + ".snapshot.json"
|
||||||
Reference in New Issue
Block a user