Skip to content

Instantly share code, notes, and snippets.

@Malayke
Last active December 13, 2017 10:49
Show Gist options
  • Save Malayke/89616d9ef8214090dbbf71a676cbcc20 to your computer and use it in GitHub Desktop.
Save Malayke/89616d9ef8214090dbbf71a676cbcc20 to your computer and use it in GitHub Desktop.
Frida 获取加固后的 apk class 名
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