wowdump 0.2.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +17 -111
- package/dist/adapters/reader.js +33 -0
- package/dist/analysis/disassemble.js +77 -0
- package/dist/{frida-runtime.js → analysis/frida-runtime.js} +3 -25
- package/dist/analysis/runtime-script.js +36 -0
- package/dist/cli.js +563 -0
- package/dist/core/profile-engine.js +238 -0
- package/dist/frida-worker.js +99 -0
- package/dist/reader/broker.js +475 -0
- package/dist/reader/client.js +1 -0
- package/dist/reader/launcher.js +219 -0
- package/dist/reader/main.js +100 -0
- package/dist/reader/protocol.js +1 -0
- package/dist/reader/windows.js +242 -0
- package/dist/reader-main.js +2 -0
- package/dist/toolchain.js +123 -0
- package/package.json +19 -37
- package/skills/wowdump/SKILL.md +22 -0
- package/skills/wowdump/references/commands.md +63 -0
- package/skills/wowdump/references/disassemble.md +18 -0
- package/skills/wowdump/references/dynamic.md +54 -0
- package/skills/wowdump/references/evidence-workflow.md +41 -0
- package/skills/wowdump/references/profiles.md +34 -0
- package/skills/wowdump/references/request-schema.md +28 -0
- package/skills/wowdump/references/workflow.md +44 -0
- package/skills/wowdump/scripts/dynamic-session.js +133 -0
- package/dist/agent.js +0 -1335
- package/dist/analysis-path.js +0 -38
- package/dist/analysis-process-log.js +0 -146
- package/dist/broker-client.js +0 -411
- package/dist/broker-codec.js +0 -148
- package/dist/broker-core.js +0 -1045
- package/dist/broker-gateway.js +0 -447
- package/dist/broker-ledger.js +0 -196
- package/dist/broker-main.js +0 -291
- package/dist/broker-protocol.js +0 -119
- package/dist/broker-runtime.js +0 -1283
- package/dist/broker-server.js +0 -466
- package/dist/build-bundle-loader.js +0 -183
- package/dist/build-bundle.js +0 -11
- package/dist/discovery.js +0 -59
- package/dist/dry-run.js +0 -38
- package/dist/error-log.js +0 -71
- package/dist/focus-errors.js +0 -63
- package/dist/focus-service.js +0 -1855
- package/dist/focused-session.js +0 -1357
- package/dist/mcp-main.js +0 -51
- package/dist/mcp.js +0 -924
- package/dist/observability.js +0 -41
- package/dist/process-log-lock.js +0 -195
- package/dist/processes.js +0 -47
- package/dist/runtime-config.js +0 -399
- package/dist/session.js +0 -145
- package/dist/storage.js +0 -12
- package/dist/wow-analysis.js +0 -1430
- package/resources/builds/retail/12.0.7.68974/build-profile.json +0 -290
- package/resources/builds/retail/12.0.7.68974/data-sources.json +0 -1633
- package/resources/builds/retail/12.0.7.68974/lua-targets.jsonl +0 -5130
- package/resources/builds/retail/12.0.7.68974/manifest.json +0 -63
- package/resources/builds/retail/12.0.7.68974/signatures.json +0 -260
- /package/dist/{adapters.js → core/build-adapters.js} +0 -0
- /package/dist/{types.js → core/types.js} +0 -0
package/dist/session.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { ErrorEventSchema } from "./types.js";
|
|
3
|
-
import { brokerManagedCommand } from "./frida-runtime.js";
|
|
4
|
-
export class ProcessSession {
|
|
5
|
-
process;
|
|
6
|
-
agentFile;
|
|
7
|
-
store;
|
|
8
|
-
executor;
|
|
9
|
-
messagePollMs;
|
|
10
|
-
sessionId;
|
|
11
|
-
scriptId;
|
|
12
|
-
messageCursor = 0;
|
|
13
|
-
pollTimer;
|
|
14
|
-
polling;
|
|
15
|
-
constructor(process, agentFile, store, executor, messagePollMs = 250) {
|
|
16
|
-
this.process = process;
|
|
17
|
-
this.agentFile = agentFile;
|
|
18
|
-
this.store = store;
|
|
19
|
-
this.executor = executor;
|
|
20
|
-
this.messagePollMs = messagePollMs;
|
|
21
|
-
}
|
|
22
|
-
async attach() {
|
|
23
|
-
if (this.sessionId)
|
|
24
|
-
return;
|
|
25
|
-
const context = this.context();
|
|
26
|
-
const attached = await this.executor.execute({
|
|
27
|
-
operation: "attach",
|
|
28
|
-
pid: this.process.pid,
|
|
29
|
-
buildKey: context.buildKey
|
|
30
|
-
}, context);
|
|
31
|
-
this.sessionId = requiredString(attached.sessionId, "attach.sessionId");
|
|
32
|
-
const source = await readFile(this.agentFile, "utf8");
|
|
33
|
-
try {
|
|
34
|
-
const loaded = await this.executor.execute(brokerManagedCommand({
|
|
35
|
-
operation: "script_load",
|
|
36
|
-
sessionId: this.sessionId,
|
|
37
|
-
pid: this.process.pid,
|
|
38
|
-
buildKey: context.buildKey,
|
|
39
|
-
source
|
|
40
|
-
}, "collector.script_load"), context);
|
|
41
|
-
this.scriptId = requiredString(loaded.scriptId, "script_load.scriptId");
|
|
42
|
-
await this.pollMessages();
|
|
43
|
-
this.pollTimer = setInterval(() => {
|
|
44
|
-
void this.pollMessages().catch(() => undefined);
|
|
45
|
-
}, this.messagePollMs);
|
|
46
|
-
this.pollTimer.unref?.();
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
await this.detach();
|
|
50
|
-
throw error;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async detach() {
|
|
54
|
-
if (this.pollTimer)
|
|
55
|
-
clearInterval(this.pollTimer);
|
|
56
|
-
this.pollTimer = undefined;
|
|
57
|
-
await this.polling?.catch(() => undefined);
|
|
58
|
-
await this.pollMessages().catch(() => undefined);
|
|
59
|
-
const context = this.context();
|
|
60
|
-
const scriptId = this.scriptId;
|
|
61
|
-
const sessionId = this.sessionId;
|
|
62
|
-
this.scriptId = undefined;
|
|
63
|
-
this.sessionId = undefined;
|
|
64
|
-
if (scriptId && sessionId) {
|
|
65
|
-
await this.executor.execute(brokerManagedCommand({
|
|
66
|
-
operation: "script_unload",
|
|
67
|
-
pid: this.process.pid,
|
|
68
|
-
buildKey: context.buildKey,
|
|
69
|
-
sessionId,
|
|
70
|
-
scriptId
|
|
71
|
-
}, "collector.script_unload"), context).catch(() => undefined);
|
|
72
|
-
}
|
|
73
|
-
if (sessionId) {
|
|
74
|
-
await this.executor.execute({
|
|
75
|
-
operation: "detach",
|
|
76
|
-
pid: this.process.pid,
|
|
77
|
-
buildKey: context.buildKey,
|
|
78
|
-
sessionId
|
|
79
|
-
}, context).catch(() => undefined);
|
|
80
|
-
}
|
|
81
|
-
this.messageCursor = 0;
|
|
82
|
-
}
|
|
83
|
-
async pollMessages() {
|
|
84
|
-
if (this.polling)
|
|
85
|
-
return this.polling;
|
|
86
|
-
if (!this.sessionId || !this.scriptId)
|
|
87
|
-
return;
|
|
88
|
-
this.polling = this.readMessages();
|
|
89
|
-
try {
|
|
90
|
-
await this.polling;
|
|
91
|
-
}
|
|
92
|
-
finally {
|
|
93
|
-
this.polling = undefined;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async readMessages() {
|
|
97
|
-
const sessionId = this.sessionId;
|
|
98
|
-
const scriptId = this.scriptId;
|
|
99
|
-
if (!sessionId || !scriptId)
|
|
100
|
-
return;
|
|
101
|
-
const result = await this.executor.execute(brokerManagedCommand({
|
|
102
|
-
operation: "script_call",
|
|
103
|
-
pid: this.process.pid,
|
|
104
|
-
buildKey: this.process.install.build.buildKey,
|
|
105
|
-
sessionId,
|
|
106
|
-
scriptId,
|
|
107
|
-
exportName: "collectorStatus"
|
|
108
|
-
}, "collector.status"), this.context());
|
|
109
|
-
const messages = Array.isArray(result.messages) ? result.messages : [];
|
|
110
|
-
for (const item of messages.slice(this.messageCursor)) {
|
|
111
|
-
const message = asRecord(asRecord(item).message);
|
|
112
|
-
if (message.type !== "send")
|
|
113
|
-
continue;
|
|
114
|
-
const payload = asRecord(message.payload);
|
|
115
|
-
const parsed = ErrorEventSchema.safeParse({
|
|
116
|
-
...payload,
|
|
117
|
-
pid: this.process.pid,
|
|
118
|
-
buildKey: this.process.install.build.buildKey,
|
|
119
|
-
flavor: this.process.install.flavor
|
|
120
|
-
});
|
|
121
|
-
if (parsed.success)
|
|
122
|
-
await this.store.append(parsed.data);
|
|
123
|
-
}
|
|
124
|
-
this.messageCursor = messages.length;
|
|
125
|
-
}
|
|
126
|
-
context() {
|
|
127
|
-
return {
|
|
128
|
-
pid: this.process.pid,
|
|
129
|
-
buildKey: this.process.install.build.buildKey,
|
|
130
|
-
flavor: this.process.install.flavor,
|
|
131
|
-
executable: this.process.executable,
|
|
132
|
-
processStartTime: this.process.startTime
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
function asRecord(value) {
|
|
137
|
-
return value !== null && typeof value === "object" && !Array.isArray(value)
|
|
138
|
-
? value
|
|
139
|
-
: {};
|
|
140
|
-
}
|
|
141
|
-
function requiredString(value, field) {
|
|
142
|
-
if (typeof value !== "string" || value.length === 0)
|
|
143
|
-
throw new Error(`${field} is required`);
|
|
144
|
-
return value;
|
|
145
|
-
}
|
package/dist/storage.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { appendFile, mkdir } from "node:fs/promises";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
|
-
export class JsonlStore {
|
|
4
|
-
file;
|
|
5
|
-
constructor(file) {
|
|
6
|
-
this.file = file;
|
|
7
|
-
}
|
|
8
|
-
async append(event) {
|
|
9
|
-
await mkdir(dirname(this.file), { recursive: true });
|
|
10
|
-
await appendFile(this.file, JSON.stringify(event) + "\n", "utf8");
|
|
11
|
-
}
|
|
12
|
-
}
|