| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- # -*- coding:utf-8 -*-
- import sys
- __author__ = 'Snow'
- import frida
- dev = frida.get_remote_device()
- session = dev.attach("胡莱三国3")
- src = """
- setImmediate(function(){
- Java.perform(function(){
- send("starting script");
- var CPGameAuthCodeApi = Java.use("com.yulong.game.api.CPGameAuthCodeApi");
- CPGameAuthCodeApi.createGameApi.implementation = function(activity,appid){
- send("appid:"+appid);
- send("activity:"+activity);
- return CPGameAuthCodeApi.createGameApi(activity,appid);
- }
- var COOLPAD12ChannelInterfaceImpl = Java.use("com.hoolai.open.fastaccess.channel.impl.coolpad12.COOLPAD12ChannelInterfaceImpl");
- COOLPAD12ChannelInterfaceImpl.onCreate.implementation = function(context){
- send("onCreate invoked"+context);
- this.onCreate(context);
- }
- COOLPAD12ChannelInterfaceImpl.applicationInit.implementation = function(context){
- send("onCreate invoked"+context);
- this.applicationInit(context);
- }
- });
- });
- """
- def on_message(message,data):
- print("[-] {}".format(message))
- script = session.create_script(src)
- script.on("message", on_message)
- script.load()
- sys.stdin.read()
|