From f2c804e0175c54307e4e592ac55ba10141608d39 Mon Sep 17 00:00:00 2001 From: NewUserHa <32261870+NewUserHa@users.noreply.github.com> Date: Sat, 27 Apr 2024 10:03:30 +0800 Subject: [PATCH 1/2] Update medusa.py --- medusa.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/medusa.py b/medusa.py index 01e4d9a4..7eabd80f 100755 --- a/medusa.py +++ b/medusa.py @@ -1104,6 +1104,9 @@ def do_run(self, line) -> None: pattern = r'\b\d+\b' get_pid = re.findall(pattern, option) self.run_frida(False, False, '', self.device, get_pid[0], host, port) + elif flags[0] == '-F': + pid = self.device.get_frontmost_application().pid + self.run_frida(False, False, "", self.device, pid, host, port) else: self.run_frida(False, False, line, self.device, -1, host, port) From d0c2a1ca9594a4150e9287fa179c03609df4f7a0 Mon Sep 17 00:00:00 2001 From: NewUserHa <32261870+NewUserHa@users.noreply.github.com> Date: Mon, 29 Apr 2024 03:51:52 +0800 Subject: [PATCH 2/2] Update medusa.py --- medusa.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/medusa.py b/medusa.py index 7eabd80f..720f9925 100755 --- a/medusa.py +++ b/medusa.py @@ -1066,6 +1066,7 @@ def do_run(self, line) -> None: Options: run [package name] : Initiate a Frida session and attach to the selected package + -f : Initiate a Frida session and attach to the topmost application -f [package name] : Initiate a Frida session and spawn the selected package -n [package number] : Initiate a Frida session and spawn the 3rd party package using its index returned by the 'list' command -p [pid] : Initiate a Frida session using a process id @@ -1104,7 +1105,7 @@ def do_run(self, line) -> None: pattern = r'\b\d+\b' get_pid = re.findall(pattern, option) self.run_frida(False, False, '', self.device, get_pid[0], host, port) - elif flags[0] == '-F': + elif flags[0] == '-f': pid = self.device.get_frontmost_application().pid self.run_frida(False, False, "", self.device, pid, host, port) else: