Skip to content

Instantly share code, notes, and snippets.

@T31M
Created October 11, 2016 23:10
Show Gist options
  • Save T31M/b3d4f521ce62abc0919c00ccf2416f4b to your computer and use it in GitHub Desktop.
Save T31M/b3d4f521ce62abc0919c00ccf2416f4b to your computer and use it in GitHub Desktop.
Frida Static Analysis Dump
#Basic Static Analysis of an Android App
#discovers modules and their exports
#by T31M
import frida, sys, os
PACKAGE_NAME = ""
session = frida.get_usb_device().attach(PACKAGE_NAME)
PATH = os.path.join(os.getcwd(), PACKAGE_NAME)
if not os.path.exists(PATH):
os.makedirs(PATH)
f = open(os.path.join(PATH,"_modules.txt"), "w")
for module in session.enumerate_modules():
f.write(str(module) + "\n")
g = open(os.path.join(PATH,module.name +".txt"), "w")
for export in module.enumerate_exports():
g.write(str(export) + "\n")
g.close()
print("Wrote Exports for: "+ module.name)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment