From faa103b98a39fb7738d274173a29a76cac9d9ed2 Mon Sep 17 00:00:00 2001 From: evtromand Date: Fri, 14 Aug 2020 00:14:33 +0300 Subject: [PATCH] Add attaching by pid option --- fridump.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fridump.py b/fridump.py index e9a5dc2..ecc3e3b 100644 --- a/fridump.py +++ b/fridump.py @@ -33,6 +33,8 @@ def MENU(): help='provide full output directory path. (def: \'dump\')') parser.add_argument('-U', '--usb', action='store_true', help='device connected over usb') + parser.add_argument('-p', '--pid', action='store_true', + help='specify app for injection by pid') parser.add_argument('-v', '--verbose', action='store_true', help='verbose') parser.add_argument('-r', '--read-only', action='store_true', @@ -68,6 +70,12 @@ def MENU(): # Start a new Session session = None +if arguments.pid: + if APP_NAME.isnumeric(): + APP_NAME = int(APP_NAME) + else: + print("Can't connect to App. PID must be a number") + exit() try: if USB: session = frida.get_usb_device().attach(APP_NAME)