MCPcopy Create free account
hub / github.com/axhlzy/FridaDebugger / parseTarget

Function parseTarget

scripts/thread-stalker.js:148–160  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

146// parseTarget("libfk.so") -> {module:"libfk.so"}
147// parseTarget("name:Thread-4") -> {name:"Thread-4"}
148function parseTarget(s) {
149 s = String(s).trim();
150 if (s.toLowerCase().startsWith("name:")) return { name: s.slice(5) };
151 if (s.includes("@")) {
152 const [off, mod] = s.split("@");
153 return { module: mod.trim(), offset: parseInt(off, 16) };
154 }
155 if (s.includes("+")) {
156 const [mod, off] = s.split("+");
157 return { module: mod.trim(), offset: parseInt(off, 16) };
158 }
159 return { module: s };
160}
161const TARGETS = CONFIG.targets.map(parseTarget);
162
163// returns the matched module name to use as default scope, or null if no match

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected