Skip to content

Commit 31321d9

Browse files
author
@
committed
update
1 parent 437d4df commit 31321d9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

frida-agent-example/agent/ios/lua.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function dump_luaL_loadbuffer(loadL_bufferPtr:NativePointer){
2626
}
2727
})
2828
}
29-
export function hook_luaL_loadbuffer(loadL_bufferPtr:NativePointer,callback:(scriptName:String,scriptStrBuffer:String,scriptBuffer:ArrayBuffer)=>void){
29+
export function hook_luaL_loadbuffer(loadL_bufferPtr:NativePointer,callback:(scriptName:String,scriptStrBuffer:NativePointer,scriptLen:number)=>void){
3030
Interceptor.attach(loadL_bufferPtr,{
3131
onEnter:function (args) {
3232
// console.log(args[2].readCString(args[3].toInt32()))
@@ -36,9 +36,9 @@ export function hook_luaL_loadbuffer(loadL_bufferPtr:NativePointer,callback:(scr
3636
if(scriptFileName==null){
3737
scriptFileName=""
3838
}
39-
callback(scriptFileName,script!,args[1].readByteArray(args[2].toInt32())!)
39+
callback(scriptFileName,args[1],args[2].toInt32())
4040
}else{
41-
callback("",script!,args[1].readByteArray(args[2].toInt32())!)
41+
callback("",args[1],args[2].toInt32())
4242
}
4343

4444
},

frida-agent-example/agent/ios/v8.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function dump_ScriptEngine_evalString(ScriptEngineEvalStringPtr:NativePoi
1717
}
1818
})
1919
}
20-
export function hook_ScriptEngine_evalString(ScriptEngineEvalStringPtr:NativePointer,callback:(scriptName:String,scriptStrBuffer:String,scriptBuffer:ArrayBuffer)=>void){
20+
export function hook_ScriptEngine_evalString(ScriptEngineEvalStringPtr:NativePointer,callback:(scriptName:String,scriptStrBuffer:NativePointer,scriptLen:number)=>void){
2121
Interceptor.attach(ScriptEngineEvalStringPtr,{
2222
onEnter:function (args) {
2323
// console.log(args[2].readCString(args[3].toInt32()))
@@ -27,9 +27,9 @@ export function hook_ScriptEngine_evalString(ScriptEngineEvalStringPtr:NativePoi
2727
if(scriptFileName==null){
2828
scriptFileName=""
2929
}
30-
callback(scriptFileName,script!,args[1].readByteArray(args[2].toInt32())!)
30+
callback(scriptFileName,args[1],args[2].toInt32())
3131
}else{
32-
callback("",script!,args[1].readByteArray(args[2].toInt32())!)
32+
callback("",args[1],args[2].toInt32())
3333
}
3434

3535
},

0 commit comments

Comments
 (0)