Created
December 17, 2022 15:22
-
-
Save dannycreations/ef3ee0ff25ab233b57d7ba5697bbc10d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import frida | |
import time | |
def on_message(message, data): | |
if message['type'] == 'error': | |
print('[!] ' + message['stack']) | |
elif message['type'] == 'send': | |
print('[*] ' + message['payload']) | |
else: | |
print(message) | |
device = frida.get_usb_device() | |
pid = device.spawn(['com.target']) | |
device.resume(pid) | |
time.sleep(1) | |
session = device.attach(pid) | |
with open('source.js') as f: | |
script = session.create_script(f.read()) | |
script.on('message', on_message) | |
script.load() | |
while True: | |
command = input() | |
if command == 'q': | |
session.detach() | |
device.kill(pid) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment