Skip to content

Commit

Permalink
fi
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 10, 2024
1 parent 978f502 commit d4ef5a9
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion src/agent/lib/info/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,40 @@ interface Symbol {

export function listEntrypointSymbols(args: string[]): string {
const validEntrypoints = [
"main", "_start", "_main", "Main",
"WinMain", "wmain", "DllMain", "wWinMain",
"UIApplicationMain",
"applicationDidFinishLaunching",
"application:didFinishLaunchingWithOptions",
"applicationWillResignActive",
"applicationDidEnterBackground",
"applicationWillEnterForeground",
"applicationDidBecomeActive",
"applicationWillTerminate",
"application:configurationForConnectingSceneSession:options",
"application:didDiscardSceneSessions",
"application:openURL:options",
"application:performFetchWithCompletionHandler",
"application:didReceiveRemoteNotification:fetchCompletionHandler",
"application:handleEventsForBackgroundURLSession:completionHandler",
"application:shouldSaveSecureApplicationState",
"application:shouldRestoreSecureApplicationState",
"application:didRegisterForRemoteNotificationsWithDeviceToken",
"application:didFailToRegisterForRemoteNotificationsWithError",
"application:didReceiveRemoteNotification",
"application:handleOpenURL",
"application:continueUserActivity:restorationHandler",
"application:didUpdateUserActivity",
"scene:willConnectToSession:options",
"sceneDidDisconnect",
"sceneDidBecomeActive",
"sceneWillResignActive",
"sceneWillEnterForeground",
"sceneDidEnterBackground",
"application:handleWatchKitExtensionRequest:reply",
"main",
"loadView",
"viewDidLoad"
];
const symbols = new Array<Symbol>();
if (ObjC.available) {
Expand All @@ -207,7 +240,7 @@ export function listEntrypointSymbols(args: string[]): string {
var address = cls[methodName].implementation; // Get the implementation address
console.log(" Method: " + methodName + " | Address: " + address);
if (validEntrypoints.includes(methodName)) {
symbols.push({ name: methodName, address: address });
symbols.push({ name: className + "." + methodName, address: address });
}
} catch (e) {
console.error(" [Error getting implementation address for method " + methodName + "]: " + e);
Expand Down

0 comments on commit d4ef5a9

Please sign in to comment.