From 3d364923ddc2a0ba9779ee04bde4479764cff81f Mon Sep 17 00:00:00 2001 From: Mabrur Habib Date: Wed, 7 Aug 2024 20:01:16 +0700 Subject: [PATCH] FIX: USB_Connectifity --- fridump.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/fridump.py b/fridump.py index e9a5dc2..c0bff5a 100644 --- a/fridump.py +++ b/fridump.py @@ -70,13 +70,22 @@ def MENU(): session = None try: if USB: - session = frida.get_usb_device().attach(APP_NAME) + logging.debug("Attempting to get USB device...") + device = frida.get_usb_device(timeout=5) + session = device.attach(APP_NAME) else: + logging.debug("Attempting to attach to process on local device...") session = frida.attach(APP_NAME) +except frida.ServerNotRunningError: + print("Frida server is not running. Please start the frida server on the device.") + sys.exit(1) +except frida.ProcessNotFoundError: + print(f"Process '{APP_NAME}' not found. Make sure the process is running.") + sys.exit(1) except Exception as e: print("Can't connect to App. Have you connected the device?") logging.debug(str(e)) - sys.exit() + sys.exit(1) # Selecting Output directory