@efffrida/il2cpp-bridge 0.0.2 → 0.0.4
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/FridaIl2cppBridge/package.json +2 -2
- package/dist/cjs/FridaIl2cppBridge.js +22 -3
- package/dist/cjs/FridaIl2cppBridge.js.map +1 -1
- package/dist/dts/FridaIl2cppBridge.d.ts +8 -2
- package/dist/dts/FridaIl2cppBridge.d.ts.map +1 -1
- package/dist/esm/FridaIl2cppBridge.js +18 -2
- package/dist/esm/FridaIl2cppBridge.js.map +1 -1
- package/index/package.json +6 -0
- package/package.json +13 -2
- package/src/FridaIl2cppBridge.ts +32 -2
|
@@ -3,12 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.il2cppPerformEffect = void 0;
|
|
7
|
+
require("frida-il2cpp-bridge");
|
|
8
|
+
var Effect = _interopRequireWildcard(require("effect/Effect"));
|
|
9
|
+
var Exit = _interopRequireWildcard(require("effect/Exit"));
|
|
10
|
+
var Runtime = _interopRequireWildcard(require("effect/Runtime"));
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
7
13
|
/**
|
|
8
14
|
* FridaIl2cppBridge.ts
|
|
9
15
|
*
|
|
10
16
|
* @since 1.0.0
|
|
11
17
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Attaches the caller thread to Il2Cpp domain and executes the given block.
|
|
21
|
+
*
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
const il2cppPerformEffect = exports.il2cppPerformEffect = /*#__PURE__*/Effect.fnUntraced(function* (effect, flag) {
|
|
25
|
+
const runtime = yield* Effect.runtime();
|
|
26
|
+
const runPromiseExit = Runtime.runPromiseExit(runtime);
|
|
27
|
+
const exit = yield* Effect.promise(abortSignal => Il2Cpp.perform(() => runPromiseExit(effect, {
|
|
28
|
+
signal: abortSignal
|
|
29
|
+
}), flag));
|
|
30
|
+
const voided = Exit.asVoid(exit);
|
|
31
|
+
return yield* voided;
|
|
32
|
+
});
|
|
14
33
|
//# sourceMappingURL=FridaIl2cppBridge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FridaIl2cppBridge.js","names":["
|
|
1
|
+
{"version":3,"file":"FridaIl2cppBridge.js","names":["require","Effect","_interopRequireWildcard","Exit","Runtime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","il2cppPerformEffect","exports","fnUntraced","effect","flag","runtime","runPromiseExit","exit","promise","abortSignal","Il2Cpp","perform","signal","voided","asVoid"],"sources":["../../src/FridaIl2cppBridge.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMAA,OAAA;AAEA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,IAAA,GAAAD,uBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAF,uBAAA,CAAAF,OAAA;AAAyC,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,Y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ACD,OAAO,CAAC;EACtD,MAAME,IAAI,GAAG,OAAO/B,MAAM,CAACgC,OAAO,CAAEC,WAAW,IAC3CC,MAAM,CAACC,OAAO,CACV,MACIL,cAAc,CAACH,MAAM,EAAE;IACnBS,MAAM,EAAEH;GACX,CAAC,EACNL,IAAI,CACP,CACJ;EACD,MAAMS,MAAM,GAAGnC,IAAI,CAACoC,MAAM,CAACP,IAAI,CAAC;EAChC,OAAO,OAAOM,MAAM;AACxB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @since 1.0.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import "frida-il2cpp-bridge";
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
/**
|
|
9
|
+
* Attaches the caller thread to Il2Cpp domain and executes the given block.
|
|
10
|
+
*
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
*/
|
|
13
|
+
export declare const il2cppPerformEffect: <X, E, R>(effect: Effect.Effect<X, E, R>, flag?: "free" | "bind" | "leak" | "main" | undefined) => Effect.Effect<void, E, R>;
|
|
8
14
|
//# sourceMappingURL=FridaIl2cppBridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FridaIl2cppBridge.d.ts","sourceRoot":"","sources":["../../src/FridaIl2cppBridge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,
|
|
1
|
+
{"version":3,"file":"FridaIl2cppBridge.d.ts","sourceRoot":"","sources":["../../src/FridaIl2cppBridge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,KACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAiB3B,CAAC"}
|
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @since 1.0.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import "frida-il2cpp-bridge";
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Exit from "effect/Exit";
|
|
9
|
+
import * as Runtime from "effect/Runtime";
|
|
10
|
+
/**
|
|
11
|
+
* Attaches the caller thread to Il2Cpp domain and executes the given block.
|
|
12
|
+
*
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
*/
|
|
15
|
+
export const il2cppPerformEffect = /*#__PURE__*/Effect.fnUntraced(function* (effect, flag) {
|
|
16
|
+
const runtime = yield* Effect.runtime();
|
|
17
|
+
const runPromiseExit = Runtime.runPromiseExit(runtime);
|
|
18
|
+
const exit = yield* Effect.promise(abortSignal => Il2Cpp.perform(() => runPromiseExit(effect, {
|
|
19
|
+
signal: abortSignal
|
|
20
|
+
}), flag));
|
|
21
|
+
const voided = Exit.asVoid(exit);
|
|
22
|
+
return yield* voided;
|
|
23
|
+
});
|
|
8
24
|
//# sourceMappingURL=FridaIl2cppBridge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FridaIl2cppBridge.js","names":["
|
|
1
|
+
{"version":3,"file":"FridaIl2cppBridge.js","names":["Effect","Exit","Runtime","il2cppPerformEffect","fnUntraced","effect","flag","runtime","runPromiseExit","exit","promise","abortSignal","Il2Cpp","perform","signal","voided","asVoid"],"sources":["../../src/FridaIl2cppBridge.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAMA,OAAO,qBAAqB;AAE5B,OAAO,KAAKA,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AAEzC;;;;;AAKA,OAAO,MAAMC,mBAAmB,gBAGCH,MAAM,CAACI,UAAU,CAAC,WAC/CC,MAA8B,EAC9BC,IAAoD;EAEpD,MAAMC,OAAO,GAAG,OAAOP,MAAM,CAACO,OAAO,EAAK;EAC1C,MAAMC,cAAc,GAAGN,OAAO,CAACM,cAAc,CAACD,OAAO,CAAC;EACtD,MAAME,IAAI,GAAG,OAAOT,MAAM,CAACU,OAAO,CAAEC,WAAW,IAC3CC,MAAM,CAACC,OAAO,CACV,MACIL,cAAc,CAACH,MAAM,EAAE;IACnBS,MAAM,EAAEH;GACX,CAAC,EACNL,IAAI,CACP,CACJ;EACD,MAAMS,MAAM,GAAGd,IAAI,CAACe,MAAM,CAACP,IAAI,CAAC;EAChC,OAAO,OAAOM,MAAM;AACxB,CAAC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@efffrida/il2cpp-bridge",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "effect-ts frida-il2cpp-bridge",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -11,8 +11,11 @@
|
|
|
11
11
|
"sideEffects": [],
|
|
12
12
|
"author": "Leo Conforti <leo@leoconforti.us> (https://leoconforti.us)",
|
|
13
13
|
"homepage": "https://github.com/leonitousconforti/efffrida",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"frida-il2cpp-bridge": "0.9.1"
|
|
16
|
+
},
|
|
14
17
|
"peerDependencies": {
|
|
15
|
-
"effect": "3.14.
|
|
18
|
+
"effect": "3.14.14"
|
|
16
19
|
},
|
|
17
20
|
"main": "./dist/cjs/index.js",
|
|
18
21
|
"module": "./dist/esm/index.js",
|
|
@@ -28,12 +31,20 @@
|
|
|
28
31
|
"types": "./dist/dts/FridaIl2cppBridge.d.ts",
|
|
29
32
|
"import": "./dist/esm/FridaIl2cppBridge.js",
|
|
30
33
|
"default": "./dist/cjs/FridaIl2cppBridge.js"
|
|
34
|
+
},
|
|
35
|
+
"./index": {
|
|
36
|
+
"types": "./dist/dts/index.d.ts",
|
|
37
|
+
"import": "./dist/esm/index.js",
|
|
38
|
+
"default": "./dist/cjs/index.js"
|
|
31
39
|
}
|
|
32
40
|
},
|
|
33
41
|
"typesVersions": {
|
|
34
42
|
"*": {
|
|
35
43
|
"FridaIl2cppBridge": [
|
|
36
44
|
"./dist/dts/FridaIl2cppBridge.d.ts"
|
|
45
|
+
],
|
|
46
|
+
"index": [
|
|
47
|
+
"./dist/dts/index.d.ts"
|
|
37
48
|
]
|
|
38
49
|
}
|
|
39
50
|
}
|
package/src/FridaIl2cppBridge.ts
CHANGED
|
@@ -4,5 +4,35 @@
|
|
|
4
4
|
* @since 1.0.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import "frida-il2cpp-bridge";
|
|
8
|
+
|
|
9
|
+
import * as Effect from "effect/Effect";
|
|
10
|
+
import * as Exit from "effect/Exit";
|
|
11
|
+
import * as Runtime from "effect/Runtime";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Attaches the caller thread to Il2Cpp domain and executes the given block.
|
|
15
|
+
*
|
|
16
|
+
* @since 1.0.0
|
|
17
|
+
*/
|
|
18
|
+
export const il2cppPerformEffect: <X, E, R>(
|
|
19
|
+
effect: Effect.Effect<X, E, R>,
|
|
20
|
+
flag?: "free" | "bind" | "leak" | "main" | undefined
|
|
21
|
+
) => Effect.Effect<void, E, R> = Effect.fnUntraced(function* <X, E, R>(
|
|
22
|
+
effect: Effect.Effect<X, E, R>,
|
|
23
|
+
flag?: "free" | "bind" | "leak" | "main" | undefined
|
|
24
|
+
) {
|
|
25
|
+
const runtime = yield* Effect.runtime<R>();
|
|
26
|
+
const runPromiseExit = Runtime.runPromiseExit(runtime);
|
|
27
|
+
const exit = yield* Effect.promise((abortSignal) =>
|
|
28
|
+
Il2Cpp.perform(
|
|
29
|
+
() =>
|
|
30
|
+
runPromiseExit(effect, {
|
|
31
|
+
signal: abortSignal,
|
|
32
|
+
}),
|
|
33
|
+
flag
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
const voided = Exit.asVoid(exit);
|
|
37
|
+
return yield* voided;
|
|
38
|
+
});
|