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

Function createCallableFunction

agent/function-call.ts:28–43  ·  view source on GitHub ↗
(address: NativePointer)

Source from the content-addressed store, hash-verified

26}
27
28export function createCallableFunction(address: NativePointer): CallableNativeFunction {
29 const callable = ((...args: FunctionCallInput[]) => callFunction(address, ...args)) as CallableNativeFunction;
30 Object.defineProperty(callable, "address", {
31 value: address,
32 enumerable: false,
33 });
34 Object.defineProperty(callable, "toString", {
35 value: () => address.toString(),
36 enumerable: false,
37 });
38 Object.defineProperty(callable, Symbol.toPrimitive, {
39 value: () => address.toString(),
40 enumerable: false,
41 });
42 return callable;
43}
44
45function toCallPointer(input: FunctionCallInput): NativePointer {
46 if (isCallableNativeFunction(input)) {

Callers 2

createExportNodeFunction · 0.85
addMethodsFunction · 0.85

Calls 1

callFunctionFunction · 0.85

Tested by

no test coverage detected