Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 11, 2024
1 parent e451a51 commit b629b20
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 48 deletions.
66 changes: 35 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
},
"devDependencies": {
"@frida/events": "^4.0.4",
"@types/frida-gum": "^18.5.1",
"@types/node": "^20.0.0",
"@types/frida-gum": "^18.7.1",
"@types/node": "^22.10.1",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"eslint": "^8.34.0",
"frida-compile": "^16.2.2",
"typescript": "^5.0.0"
"typescript": "^5.7.2"
},
"exports": {
"require": "./src/agent/index.js",
Expand Down
22 changes: 8 additions & 14 deletions src/agent/lib/info/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function listHeadersR2(args: string[]): string {

interface Symbol {
name: string;
address: string;
address: NativePointer | string;
}

export function listEntrypointSymbols(args: string[]): string {
Expand Down Expand Up @@ -251,7 +251,7 @@ export function listEntrypointSymbols(args: string[]): string {
const clazz = Java.use(className);
const methods = clazz.class.getDeclaredMethods();

methods.forEach((method) => {
methods.forEach((method: any) => {
const methodName = method.getName();
if (entryPoints.some((entry) => methodName.includes(entry))) {
symbols.push({ name: className + "." + methodName, address: methodName });
Expand All @@ -263,19 +263,13 @@ export function listEntrypointSymbols(args: string[]): string {
}
});
});
const modules = Module.enumerateModules();
modules.forEach((module) => {
const exports = Module.findExportByName(module.name, null);

if (exports) {
exports.forEach((exp) => {
if (exp.name.startsWith("Java_")) {
symbols.push({ name: "entry.jni." + exp.name, address: exp.address });
}
});
}
Process.enumerateModules().forEach((mod) => {
mod.enumerateExports().forEach((exp) => {
if (exp.name.startsWith("Java_")) {
symbols.push({ name: "entry.jni." + exp.name, address: exp.address.toString() });
}
});
});

}
if (ObjC.available) {
const classes = ObjC.classes;
Expand Down

0 comments on commit b629b20

Please sign in to comment.