Inspect selected ELF32/ELF64 PT_NOTE and SHT_NOTE declarations without executing the artifact, retaining independent table identities, source ranges, descriptor digests, GNU build-id/ABI fields and explicit coverage limitations. Integrate mvanhorn's implementation and hardening with current main while preserving byte-entropy registration and the Windows curated regression suite. The maintainer follow-up uses ordinary merges/pushes, not history rewriting. Executed validation: 96 focused/shared/docs tests, complete static/docs checks, eleven real CLI/MCP pairs including GCC ELF32 and Clang big-endian PowerPC64, and two actual Codex task traces checked against their Evidence. Full costs, grader correction and verification limits are recorded in PR #4837. Refs #6262.
36 lines
2.0 KiB
TypeScript
36 lines
2.0 KiB
TypeScript
import { ByteEntropyService } from "../application/binaryDiagnostics/ByteEntropyService.js";
|
|
import { RecordedCrashService } from "../application/binaryDiagnostics/RecordedCrashService.js";
|
|
import { PwntoolsRecordedCrashProvider } from "../native/pwntools/PwntoolsRecordedCrashProvider.js";
|
|
import { BinaryLayoutService } from "../application/binaryDiagnostics/BinaryLayoutService.js";
|
|
import { PwntoolsLayoutProvider } from "../native/pwntools/PwntoolsLayoutProvider.js";
|
|
import { PeResourcesService } from "../application/binaryDiagnostics/PeResourcesService.js";
|
|
import { PeResourcesProvider } from "../native/pe/PeResourcesProvider.js";
|
|
import { ElfNotesService } from "../application/binaryDiagnostics/ElfNotesService.js";
|
|
import { ElfNotesProvider } from "../native/elf/ElfNotesProvider.js";
|
|
import type { ArtifactResourceScope } from "../artifacts/ArtifactResourceScope.js";
|
|
|
|
/** Portable PE inspection with no engine, installation or target acquisition. */
|
|
export const createPeResourcesService = (): PeResourcesService =>
|
|
new PeResourcesService(new PeResourcesProvider());
|
|
|
|
/** Portable ELF note-table inspection with no engine or package catalog. */
|
|
export const createElfNotesService = (): ElfNotesService =>
|
|
new ElfNotesService(new ElfNotesProvider());
|
|
|
|
/** Compose the offline adapter without import-time I/O or dependency acquisition. */
|
|
export const createBinaryLayoutService = (
|
|
environment: Readonly<NodeJS.ProcessEnv> = process.env,
|
|
): BinaryLayoutService =>
|
|
new BinaryLayoutService(new PwntoolsLayoutProvider(environment));
|
|
|
|
/** Compose recorded-core inspection without acquiring a debugger or toolchain. */
|
|
export const createRecordedCrashService = (
|
|
environment: Readonly<NodeJS.ProcessEnv> = process.env,
|
|
): RecordedCrashService =>
|
|
new RecordedCrashService(new PwntoolsRecordedCrashProvider(environment));
|
|
|
|
/** Provider-free local byte analysis. */
|
|
export const createByteEntropyService = (
|
|
resources?: ArtifactResourceScope,
|
|
): ByteEntropyService => new ByteEntropyService(undefined, resources);
|