Skip to content

Instantly share code, notes, and snippets.

@iGio90
Created March 5, 2017 16: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 iGio90/ed84a7ea165c3e0d9dc8bd4059806136 to your computer and use it in GitHub Desktop.
Save iGio90/ed84a7ea165c3e0d9dc8bd4059806136 to your computer and use it in GitHub Desktop.
hook.py
import frida
import sys
scriptname = sys.argv[1]
fd = open(scriptname, "r")
def on_message(message, data):
print(message)
print(data)
session = frida.get_usb_device().attach("com.supercell.clashroyale")
script = session.create_script(fd.read())
fd.close()
script.on('message', on_message)
script.load()
sys.stdin.read()
cr.js
/**
* Created by igio90 on 19/02/17.
*/
var f = Module.findBaseAddress("libg.so");
console.log("base addr: " + f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment