chore: merge captured main into iNES container support

This commit is contained in:
morluto
2026-10-13 21:45:12 +08:00
252 changed files with 12483 additions and 1405 deletions
+5
View File
@@ -57,6 +57,7 @@ const modernNames = [
"callees",
"xrefs_to",
"callgraph",
"survey_binary",
];
/** Stateful producer fixture at the real connection seam; no module mocking. */
@@ -67,6 +68,7 @@ export class RecordingIdaMcp implements IdaMcpConnection {
}[] = [];
connects = 0;
closes = 0;
detaches = 0;
inputSha256: string;
inputPath: string;
imageBase = "0x1000";
@@ -103,6 +105,9 @@ export class RecordingIdaMcp implements IdaMcpConnection {
async close() {
this.closes += 1;
}
detach() {
this.detaches += 1;
}
async call(
name: string,
args: Readonly<Record<string, JsonValue>>,
+2 -1
View File
@@ -1,5 +1,5 @@
/** Build a valid minimal JVM class file, optionally with an unused UTF-8 constant. */
export const javaClassFile = (extraUtf8Bytes = 0): Buffer => {
export const javaClassFile = (extraUtf8Bytes = 0, fatCpuLookalike = false): Buffer => {
const utf8 = (value: string): Buffer => {
const bytes = Buffer.from(value, "utf8");
const entry = Buffer.alloc(3 + bytes.length);
@@ -13,6 +13,7 @@ export const javaClassFile = (extraUtf8Bytes = 0): Buffer => {
utf8("Hello"),
Buffer.from([7, 0, 4]),
utf8("java/lang/Object"),
...(fatCpuLookalike ? [utf8("x"), Buffer.from([3, 0, 0, 0, 7])] : []),
...(extraUtf8Bytes === 0 ? [] : [utf8("x".repeat(extraUtf8Bytes))]),
];
const headerAndPool = Buffer.alloc(10);
+1 -1
View File
@@ -29,7 +29,7 @@ export const createStrippedAsarAddon = async (
await mkdir(dirname(path), { recursive: true });
await writeFile(path, file.contents);
}
await createPackageWithOptions(source, archive, { unpack: "**/*.node" });
await createPackageWithOptions(source, archive, { unpack: "*.node" });
await writeFile(
join(`${archive}.unpacked`, "node_modules", "btime", "binding.node"),
stripped,