ApplesauceOS
Read Markdown ↗Download .md

C.bindAddress

Bind a function at its current runtime address.

js
client.bindAddress(address, signature)

Arguments

ArgumentTypeMeaning
addressstringNonzero hexadecimal address in this process, aligned to 4 bytes.
signatureobjectRequired returns and args (array of fixed native type names). Optional ownership (borrowed/retained for object results) and captureErrno (boolean). library must be omitted.

Returns

Callable bound function with release().

Example

js
// Only after obtaining and verifying this address and native signature.
function bindVerifiedAddress(address) {
  return C.bindAddress(address, {returns: "int32", args: []});
}

Notes

Advanced API: the declared types must match the real native function. Wrong signatures/addresses can crash the target. No variadic functions, callbacks or arbitrary custom structures. Calls run on the target main thread. See C functions and memory for types and ownership. Omit library. ASLR/process restarts invalidate saved addresses; executable memory alone does not prove a valid function entry.

All JavaScript APIs · Automation playbook