import frida def on_message(message, data): if message['type'] == 'send': print("[*] {0}".format(message['payload'])) else: print(message) def main(): # device = frida.get_usb_device() # device = frida.get_device_manager().add_remote_device('127.0.0.1:62025') device = frida.get_remote_device() print(device, device.enumerate_processes()) # return # process = device.attach('com.yemao.demo') process = device.attach('demo') # process = device.attach('com.android.settings.intelligence') with open('./build/02.js', encoding='utf-8') as f: jscode = f.read() script = process.create_script(jscode) script.on('message', on_message) script.load() while True: command = input ("\nEnter command:\nl: Exit\n2: Call secret function\n3: Get Total Value\nchoice:") if command == "1": print('script.exports_sync = ', dir(script.exports_sync)) break elif command== "2":#在这里调用 script.exports_sync.callfunc() elif command == "3": script.exports_sync.gettotalvalue() elif command == "4": script.exports_sync.CallSecretFunc() main()