Skip to content

Commit

Permalink
Run :ies only on app classes
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 10, 2024
1 parent e7ba497 commit ba873ed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/agent/lib/info/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,18 @@ export function listEntrypointSymbols(args: string[]): string {
const classes = ObjC.classes;
Object.keys(classes).forEach(function (className: string) {
var cls = ObjC.classes[className];
if (cls.$moduleName !== null && cls.$moduleName !== "main") {
return;
}
var methods = cls.$methods; // $ownMethods?
methods.forEach(function (methodName) {
try {
var address = cls[methodName].implementation; // Get the implementation address
console.log(" Method: " + methodName + " | Address: " + address);
if (validEntrypoints.includes(methodName)) {
symbols.push({ name: className + "." + methodName, address: address });
}
} catch (e) {
console.error(" [Error getting implementation address for method " + methodName + "]: " + e);
// ignored console.error(" [Error getting implementation address for method " + methodName + "]: " + e);
}
});
});
Expand All @@ -253,8 +255,8 @@ export function listEntrypointSymbols(args: string[]): string {
return "";
}
const entries = symbols
.map((entry) => {
return 'f entry.' + entry.name + ' = ' + entry.address;
.map((symbol) => {
return 'f entry.' + symbol.name + ' = ' + symbol.address;
}).join('\n');
return "fs+symbols\n" + entries + "\nfs-";
}
Expand Down

0 comments on commit ba873ed

Please sign in to comment.