frida-screenshot 5.0.2 → 6.0.0
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/lib/ios.d.ts +1 -1
- package/dist/lib/ios.js +6 -4
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import ObjC from "frida-objc-bridge";
|
|
2
2
|
export default function screenshot(view: ObjC.Object): Promise<ArrayBuffer>;
|
package/dist/index.js
CHANGED
package/dist/lib/ios.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import ObjC from "frida-objc-bridge";
|
|
2
2
|
export declare function ios(view: ObjC.Object): Promise<ArrayBuffer>;
|
package/dist/lib/ios.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ObjC from "frida-objc-bridge";
|
|
1
2
|
const CGFloat = (Process.pointerSize === 4) ? 'float' : 'double';
|
|
2
3
|
const CGSize = [CGFloat, CGFloat];
|
|
3
4
|
const blocks = new Set();
|
|
@@ -60,14 +61,15 @@ function performOnMainThread(action) {
|
|
|
60
61
|
let cachedApi = null;
|
|
61
62
|
function getApi() {
|
|
62
63
|
if (cachedApi === null) {
|
|
64
|
+
const uikit = Process.getModuleByName('UIKit');
|
|
63
65
|
cachedApi = {
|
|
64
66
|
UIApplication: ObjC.classes.UIApplication,
|
|
65
67
|
UIWindow: ObjC.classes.UIWindow,
|
|
66
68
|
NSThread: ObjC.classes.NSThread,
|
|
67
|
-
UIGraphicsBeginImageContextWithOptions: new NativeFunction(
|
|
68
|
-
UIGraphicsEndImageContext: new NativeFunction(
|
|
69
|
-
UIGraphicsGetImageFromCurrentImageContext: new NativeFunction(
|
|
70
|
-
UIImagePNGRepresentation: new NativeFunction(
|
|
69
|
+
UIGraphicsBeginImageContextWithOptions: new NativeFunction(uikit.getExportByName('UIGraphicsBeginImageContextWithOptions'), 'void', [CGSize, 'bool', CGFloat]),
|
|
70
|
+
UIGraphicsEndImageContext: new NativeFunction(uikit.getExportByName('UIGraphicsEndImageContext'), 'void', []),
|
|
71
|
+
UIGraphicsGetImageFromCurrentImageContext: new NativeFunction(uikit.getExportByName('UIGraphicsGetImageFromCurrentImageContext'), 'pointer', []),
|
|
72
|
+
UIImagePNGRepresentation: new NativeFunction(uikit.getExportByName('UIImagePNGRepresentation'), 'pointer', ['pointer'])
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
return cachedApi;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frida-screenshot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Grab screenshots using Frida",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/nowsecure/frida-screenshot#readme",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/frida-gum": "^
|
|
25
|
+
"@types/frida-gum": "^19.0.0",
|
|
26
26
|
"@types/node": "^18.11.18",
|
|
27
27
|
"typescript": "^4.7.3"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"frida-objc-bridge": "^8.0.4"
|
|
28
31
|
}
|
|
29
32
|
}
|