frida 15.2.2 → 16.0.1
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/README.md +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/script.d.ts +10 -0
- package/dist/script.js +7 -0
- package/dist/session.d.ts +2 -6
- package/dist/session.js +7 -10
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[![NPM Downloads][npm-dm-image]][npm-link]
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
Node.js bindings for [Frida](
|
|
7
|
+
Node.js bindings for [Frida](https://frida.re).
|
|
8
8
|
|
|
9
9
|
## Depends
|
|
10
10
|
|
|
@@ -26,7 +26,7 @@ FRIDA=/absolute/path/to/fully/compiled/frida/repo npm install
|
|
|
26
26
|
|
|
27
27
|
## Examples
|
|
28
28
|
|
|
29
|
-
* Follow [Setting up the experiment](
|
|
29
|
+
* Follow [Setting up the experiment](https://frida.re/docs/functions/) to
|
|
30
30
|
produce a binary.
|
|
31
31
|
* Run the binary.
|
|
32
32
|
* Take note of the memory address the binary gives you when run.
|
package/dist/index.d.ts
CHANGED
|
@@ -62,12 +62,12 @@ export declare const Session: typeof sessionModule.Session;
|
|
|
62
62
|
export declare type SessionDetachedHandler = sessionModule.SessionDetachedHandler;
|
|
63
63
|
export declare type SessionDetachReason = sessionModule.SessionDetachReason;
|
|
64
64
|
export declare const SessionDetachReason: typeof sessionModule.SessionDetachReason;
|
|
65
|
-
export declare type EnableDebuggerOptions = sessionModule.EnableDebuggerOptions;
|
|
66
65
|
export declare type PeerOptions = sessionModule.PeerOptions;
|
|
67
66
|
export declare type PortalOptions = sessionModule.PortalOptions;
|
|
68
67
|
export declare type Script = scriptModule.Script;
|
|
69
68
|
export declare const Script: typeof scriptModule.Script;
|
|
70
69
|
export declare type ScriptOptions = scriptModule.ScriptOptions;
|
|
70
|
+
export declare type SnapshotOptions = scriptModule.SnapshotOptions;
|
|
71
71
|
export declare type ScriptRuntime = scriptModule.ScriptRuntime;
|
|
72
72
|
export declare const ScriptRuntime: typeof scriptModule.ScriptRuntime;
|
|
73
73
|
export declare type ScriptDestroyedHandler = scriptModule.ScriptDestroyedHandler;
|
|
@@ -81,6 +81,7 @@ export declare type ErrorMessage = scriptModule.ErrorMessage;
|
|
|
81
81
|
export declare type ScriptExports = scriptModule.ScriptExports;
|
|
82
82
|
export declare type LogLevel = scriptModule.LogLevel;
|
|
83
83
|
export declare const LogLevel: typeof scriptModule.LogLevel;
|
|
84
|
+
export declare type EnableDebuggerOptions = scriptModule.EnableDebuggerOptions;
|
|
84
85
|
export declare type Relay = relayModule.Relay;
|
|
85
86
|
export declare const Relay: typeof relayModule.Relay;
|
|
86
87
|
export declare type RelayProperties = relayModule.RelayProperties;
|
package/dist/script.d.ts
CHANGED
|
@@ -19,10 +19,17 @@ export declare class Script {
|
|
|
19
19
|
unload(cancellable?: Cancellable): Promise<void>;
|
|
20
20
|
eternalize(cancellable?: Cancellable): Promise<void>;
|
|
21
21
|
post(message: any, data?: Buffer | null): void;
|
|
22
|
+
enableDebugger(options?: EnableDebuggerOptions, cancellable?: Cancellable): Promise<void>;
|
|
23
|
+
disableDebugger(cancellable?: Cancellable): Promise<void>;
|
|
22
24
|
[inspect.custom](depth: any, options: any): string;
|
|
23
25
|
}
|
|
24
26
|
export interface ScriptOptions {
|
|
25
27
|
name?: string;
|
|
28
|
+
snapshot?: Buffer;
|
|
29
|
+
runtime?: ScriptRuntime;
|
|
30
|
+
}
|
|
31
|
+
export interface SnapshotOptions {
|
|
32
|
+
warmupScript?: string;
|
|
26
33
|
runtime?: ScriptRuntime;
|
|
27
34
|
}
|
|
28
35
|
export declare enum ScriptRuntime {
|
|
@@ -58,3 +65,6 @@ export declare enum LogLevel {
|
|
|
58
65
|
Warning = "warning",
|
|
59
66
|
Error = "error"
|
|
60
67
|
}
|
|
68
|
+
export interface EnableDebuggerOptions {
|
|
69
|
+
port?: number;
|
|
70
|
+
}
|
package/dist/script.js
CHANGED
|
@@ -42,6 +42,13 @@ class Script {
|
|
|
42
42
|
post(message, data = null) {
|
|
43
43
|
this.impl.post(message, data);
|
|
44
44
|
}
|
|
45
|
+
enableDebugger(options = {}, cancellable) {
|
|
46
|
+
const { port = 0 } = options;
|
|
47
|
+
return this.impl.enableDebugger(port, cancellable);
|
|
48
|
+
}
|
|
49
|
+
disableDebugger(cancellable) {
|
|
50
|
+
return this.impl.disableDebugger(cancellable);
|
|
51
|
+
}
|
|
45
52
|
[util_1.inspect.custom](depth, options) {
|
|
46
53
|
return "Script {}";
|
|
47
54
|
}
|
package/dist/session.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Cancellable } from "./cancellable";
|
|
|
4
4
|
import { Crash } from "./crash";
|
|
5
5
|
import { PortalMembership } from "./portal_membership";
|
|
6
6
|
import { Relay } from "./relay";
|
|
7
|
-
import { Script, ScriptOptions } from "./script";
|
|
7
|
+
import { Script, ScriptOptions, SnapshotOptions } from "./script";
|
|
8
8
|
import { Signal } from "./signals";
|
|
9
9
|
import { inspect } from "util";
|
|
10
10
|
export declare class Session {
|
|
@@ -21,8 +21,7 @@ export declare class Session {
|
|
|
21
21
|
createScript(source: string, options?: ScriptOptions, cancellable?: Cancellable): Promise<Script>;
|
|
22
22
|
createScriptFromBytes(bytes: Buffer, options?: ScriptOptions, cancellable?: Cancellable): Promise<Script>;
|
|
23
23
|
compileScript(source: string, options?: ScriptOptions, cancellable?: Cancellable): Promise<Buffer>;
|
|
24
|
-
|
|
25
|
-
disableDebugger(cancellable?: Cancellable): Promise<void>;
|
|
24
|
+
snapshotScript(embedScript: string, options?: SnapshotOptions, cancellable?: Cancellable): Promise<Buffer>;
|
|
26
25
|
setupPeerConnection(options?: PeerOptions, cancellable?: Cancellable): Promise<void>;
|
|
27
26
|
joinPortal(address: string, options?: PortalOptions, cancellable?: Cancellable): Promise<PortalMembership>;
|
|
28
27
|
[inspect.custom](depth: any, options: any): string;
|
|
@@ -35,9 +34,6 @@ export declare enum SessionDetachReason {
|
|
|
35
34
|
ConnectionTerminated = "connection-terminated",
|
|
36
35
|
DeviceLost = "device-lost"
|
|
37
36
|
}
|
|
38
|
-
export interface EnableDebuggerOptions {
|
|
39
|
-
port?: number;
|
|
40
|
-
}
|
|
41
37
|
export interface PeerOptions {
|
|
42
38
|
stunServer?: string;
|
|
43
39
|
relays?: Relay[];
|
package/dist/session.js
CHANGED
|
@@ -33,23 +33,20 @@ class Session {
|
|
|
33
33
|
return this.impl.disableChildGating(cancellable);
|
|
34
34
|
}
|
|
35
35
|
async createScript(source, options = {}, cancellable) {
|
|
36
|
-
const { name = null, runtime = null } = options;
|
|
37
|
-
return new script_1.Script(await this.impl.createScript(source, name, runtime, cancellable));
|
|
36
|
+
const { name = null, snapshot = null, runtime = null } = options;
|
|
37
|
+
return new script_1.Script(await this.impl.createScript(source, name, snapshot, runtime, cancellable));
|
|
38
38
|
}
|
|
39
39
|
async createScriptFromBytes(bytes, options = {}, cancellable) {
|
|
40
|
-
const { name = null, runtime = null } = options;
|
|
41
|
-
return new script_1.Script(await this.impl.createScriptFromBytes(bytes, name, runtime, cancellable));
|
|
40
|
+
const { name = null, snapshot = null, runtime = null } = options;
|
|
41
|
+
return new script_1.Script(await this.impl.createScriptFromBytes(bytes, name, snapshot, runtime, cancellable));
|
|
42
42
|
}
|
|
43
43
|
compileScript(source, options = {}, cancellable) {
|
|
44
44
|
const { name = null, runtime = null } = options;
|
|
45
45
|
return this.impl.compileScript(source, name, runtime, cancellable);
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
const {
|
|
49
|
-
return this.impl.
|
|
50
|
-
}
|
|
51
|
-
disableDebugger(cancellable) {
|
|
52
|
-
return this.impl.disableDebugger(cancellable);
|
|
47
|
+
snapshotScript(embedScript, options = {}, cancellable) {
|
|
48
|
+
const { warmupScript = null, runtime = null } = options;
|
|
49
|
+
return this.impl.snapshotScript(embedScript, warmupScript, runtime, cancellable);
|
|
53
50
|
}
|
|
54
51
|
setupPeerConnection(options = {}, cancellable) {
|
|
55
52
|
const { stunServer = null, relays = [], } = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frida",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.1",
|
|
4
4
|
"authors": [
|
|
5
5
|
"Frida Developers"
|
|
6
6
|
],
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"dist/"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@frida/nan": "^2.16.1-frida.0",
|
|
31
32
|
"bindings": "^1.5.0",
|
|
32
33
|
"minimatch": "^5.0.1",
|
|
33
|
-
"nan": "^2.13.2",
|
|
34
34
|
"prebuild-install": "^7.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
+
"@frida/prebuild": "^11.0.4-frida.2",
|
|
37
38
|
"@types/chai": "^4.2.18",
|
|
38
39
|
"@types/mocha": "^9.0.0",
|
|
39
40
|
"@types/node": "^18.0.0",
|
|
40
41
|
"chai": "^4.3.4",
|
|
41
42
|
"mocha": "^10.0.0",
|
|
42
|
-
"prebuild": "^11.0.4",
|
|
43
43
|
"ts-node": "^10.0.0",
|
|
44
44
|
"typescript": "^4.3.2"
|
|
45
45
|
},
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"build": "tsc",
|
|
49
49
|
"watch": "tsc -w",
|
|
50
50
|
"install": "prebuild-install || node-gyp rebuild",
|
|
51
|
-
"prebuild": "prebuild --
|
|
52
|
-
"test": "
|
|
51
|
+
"prebuild": "prebuild --strip",
|
|
52
|
+
"test": "node --expose-gc node_modules/mocha/bin/_mocha -r ts-node/register test/*.ts"
|
|
53
53
|
},
|
|
54
54
|
"binary": {
|
|
55
55
|
"host": "https://github.com",
|