diff --git a/README.md b/README.md index d54dc24..18db834 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,14 @@ The following are the main flags that can be used with fridump: process the process that you will be injecting to optional arguments: - -h, --help show this help message and exit - -o dir, --out dir provide full output directory path. (def: 'dump') - -U, --usb device connected over usb - -v, --verbose verbose - -r, --read-only dump read-only parts of memory. More data, more errors - -s, --strings run strings on all dump files. Saved in output dir. - --max-size bytes maximum size of dump file in bytes (def: 20971520) + -h, --help show this help message and exit + -o dir, --out dir provide full output directory path. (def: 'dump') + -D id, --device id connect to device with the given id + -U, --usb device connected over usb + -v, --verbose verbose + -r, --read-only dump read-only parts of memory. More data, more errors + -s, --strings run strings on all dump files. Saved in output dir. + --max-size bytes maximum size of dump file in bytes (def: 20971520) To find the name of a local process, you can use: @@ -33,6 +34,7 @@ Examples: fridump -U Safari - Dump the memory of an iOS device associated with the Safari app fridump -U -s com.example.WebApp - Dump the memory of an Android device and run strings on all dump files + fridump -D emulator-5554 com.example.WebApp - Dump the memory of a process in an emulated Android device fridump -r -o [full_path] - Dump the memory of a local application and save it to the specified directory More examples can be found [here](http://pentestcorner.com/introduction-to-fridump/) diff --git a/fridump.py b/fridump.py index e9a5dc2..77938e1 100644 --- a/fridump.py +++ b/fridump.py @@ -31,6 +31,8 @@ def MENU(): help='the process that you will be injecting to') parser.add_argument('-o', '--out', type=str, metavar="dir", help='provide full output directory path. (def: \'dump\')') + parser.add_argument('-D', '--device', type=str, metavar='id', + help='connect to device with the given id') parser.add_argument('-U', '--usb', action='store_true', help='device connected over usb') parser.add_argument('-v', '--verbose', action='store_true', @@ -53,6 +55,7 @@ def MENU(): APP_NAME = arguments.process DIRECTORY = "" USB = arguments.usb +DEVICE = arguments.device DEBUG_LEVEL = logging.INFO STRINGS = arguments.strings MAX_SIZE = 20971520 @@ -71,6 +74,8 @@ def MENU(): try: if USB: session = frida.get_usb_device().attach(APP_NAME) + elif DEVICE: + session = frida.get_device(DEVICE).attach(APP_NAME) else: session = frida.attach(APP_NAME) except Exception as e: