mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-12 11:37:09 +08:00
新-sec2-lesson4-frida定位和还原简单请求参数
This commit is contained in:
parent
0bb64243fb
commit
5a574c85ce
35
猿人学app逆向/新-sec2-lesson4-frida定位和还原简单请求参数/hook关键词signature.py
Normal file
35
猿人学app逆向/新-sec2-lesson4-frida定位和还原简单请求参数/hook关键词signature.py
Normal file
@ -0,0 +1,35 @@
|
||||
import frida
|
||||
import sys
|
||||
|
||||
|
||||
def on_message(message, data):
|
||||
if message['type'] == 'send':
|
||||
print("[*] {0}".format(message['payload']))
|
||||
else:
|
||||
print(message)
|
||||
|
||||
|
||||
js_code = '''
|
||||
Java.perform(
|
||||
function(){
|
||||
console.log('hook住了')
|
||||
var A = Java.use('com.hualong.framework.b.a')
|
||||
A.a.implementation = function(str){
|
||||
console.log('输入' + str)
|
||||
var res = this.a(str)
|
||||
console.log('输出' + res)
|
||||
}
|
||||
function printstack() {
|
||||
console.log(Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Exception").$new()));
|
||||
}
|
||||
}
|
||||
)
|
||||
'''
|
||||
# app已经启动了
|
||||
process = frida.get_usb_device(-1).attach('引力播')
|
||||
script = process.create_script(js_code)
|
||||
script.on('message', on_message)
|
||||
print('[*] Hook Start Running')
|
||||
script.load()
|
||||
# 守护进程
|
||||
sys.stdin.read()
|
Loading…
x
Reference in New Issue
Block a user