# frida-ex-nativefunction

> Gives you a more powerful NativeFunction for frida.

Latest version **0.1.2** (published 2018-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install frida-ex-nativefunction
pnpm add frida-ex-nativefunction
yarn add frida-ex-nativefunction
bun add frida-ex-nativefunction
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-07-28 |
| First published | 2018-07-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 107.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | FreehuntX |
| Maintainers | freehuntx |
| Keywords | frida |

## Links

- npm: https://www.npmjs.com/package/frida-ex-nativefunction
- Repository: https://github.com/freehuntx/frida-ex-nativefunction
- Homepage: https://github.com/freehuntx/frida-ex-nativefunction#readme
- Issues: https://github.com/freehuntx/frida-ex-nativefunction/issues
- npm.io page: https://npm.io/package/frida-ex-nativefunction

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2018-07-28
- 0.1.1 — 2018-07-28
- 0.1.0 — 2018-07-28
- 0.0.2 — 2018-07-19
- 0.0.1 — 2018-07-19

## README

# frida-ex-nativefunction
This module provides you with an extended NativeFunction class.  
It is meant to be used inside of a frida script.  
See for example: [frida-compile](https://github.com/frida/frida-compile)



## Example
```
const ExNativeFunction = require('frida-ex-nativefunction')

const openAddr = Module.findExportByName('libc.so', 'open')
const open = new ExNativeFunction(openAddr, 'int', ['pointer', 'int'])

console.log(open.address)  // The provided openAddr
console.log(open.retType)  // The provided return type
console.log(open.argTypes) // The provided argument types
console.log(open.abi)      // The provided abi

// Shorthand for Interceptor.attach
const listener = open.intercept({
  onEnter: function() {},
  onLeave: function() {}
})
listener.detach() // You can use it like usual

// Shorthand for Interceptor.replace
open.replace((pathPtr, flags) => {
  return open(pathPtr, flags)
})
```

---
_Source: https://npm.io/package/frida-ex-nativefunction · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
