Skip to content

Instantly share code, notes, and snippets.

@T0w3ntum
Created March 7, 2018 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save T0w3ntum/08bcf8597ed206d7f5ade48de4e566c5 to your computer and use it in GitHub Desktop.
Save T0w3ntum/08bcf8597ed206d7f5ade48de4e566c5 to your computer and use it in GitHub Desktop.
Wrapper to call Frida scripts
import frida
import sys
scriptname = sys.argv[1]
procname = sys.argv[2]
fd = open(scriptname, "r")
def on_message(message, data):
print(message)
print(data)
session = frida.get_usb_device().attach(procname)
script = session.create_script(fd.read())
fd.close()
script.on("message", on_message)
script.load()
sys.stdin.read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment