Skip to content

Instantly share code, notes, and snippets.

@corycook
Last active February 5, 2020 11:40
Show Gist options
  • Save corycook/eb7351ea36066ae0cc09 to your computer and use it in GitHub Desktop.
Save corycook/eb7351ea36066ae0cc09 to your computer and use it in GitHub Desktop.
Command line shortcut to enumerate modules with frida
import frida, argparse
parser = argparse.ArgumentParser(description='List modules for a process')
parser.add_argument('process_names', metavar='process name', nargs='+', help='names of processes to enumerate')
parser.add_argument('-R', dest='target', action='store_const', const=True, default=False,
help='target remote device')
try:
args = parser.parse_args()
target = frida
if args.target:
target = frida.get_remote_device()
for process in args.process_names:
for module in target.attach(process).enumerate_modules():
print('%s' % module)
except BaseException as e:
print(e)
@gscattolin
Copy link

This module doesn't work no more. Session= target.attach(process) doesn't have an enumerate_modules() method. Use Js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment