Skip to content

Instantly share code, notes, and snippets.

@AmesianX
Forked from corycook/frida-modules.py
Created March 19, 2019 20:41
Show Gist options
  • Save AmesianX/9aaaf63b4be5878dc8ebf812efa72a0c to your computer and use it in GitHub Desktop.
Save AmesianX/9aaaf63b4be5878dc8ebf812efa72a0c 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment