Last active
December 13, 2017 10:49
-
-
Save Malayke/89616d9ef8214090dbbf71a676cbcc20 to your computer and use it in GitHub Desktop.
Frida 获取加固后的 apk class 名
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, sys | |
def on_message(message, data): | |
if message['type'] == 'send': | |
print("[*] {0}".format(message['payload'])) | |
else: | |
print(message) | |
jscode = """ | |
Java.perform(function() { | |
Java.enumerateLoadedClasses({ | |
onMatch: function(className) { | |
console.log(className); | |
}, | |
onComplete: function() {} | |
}); | |
}); | |
""" | |
try: | |
# com.tencent.qq 替换成目标 app 包名,可通过 frida-ps 获取 | |
process = frida.get_usb_device().attach('com.tencent.qq') | |
script = process.create_script(jscode) | |
script.on('message', on_message) | |
print('[*] Running...') | |
script.load() | |
sys.stdin.read() | |
except KeyboardInterrupt: | |
sys.exit(1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment