Skip to content

Commit

Permalink
Update Ufun.js
Browse files Browse the repository at this point in the history
测试修改后的代码,修改一个小问题,新增更详细的显示信息
  • Loading branch information
axhlzy authored Mar 30, 2021
1 parent 8433d1c commit c293ec7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions U3DHook/Ufun.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author lzy <[email protected]>
* @HomePage https://github.com/axhlzy
* @CreatedTime 2021/01/16 09:23
* @UpdateTime 2021/03/30 17:47
* @UpdateTime 2021/03/30 18:06
* @Des frida hook u3d functions scrpt
*/

Expand Down Expand Up @@ -651,18 +651,20 @@ function breakPoint(m_ptr,index,name){
var method_addr = ptr(m_ptr).readPointer()

//移除在 B 中添加的条目避免重复显示
var t_method_addr = method_addr.sub(soAddr)
t_arrayAddr.forEach(function(value,index){
if (Number(value) == Number(t_method_addr)) count_method_times[index] = maxCallTime
})

if (t_arrayAddr != undefined ){
var t_method_addr = method_addr.sub(soAddr)
t_arrayAddr.forEach(function(value,index){
if (Number(value) == Number(t_method_addr)) count_method_times[index] = maxCallTime
})
}

// LOG(method_addr.sub(soAddr))
Interceptor.attach(method_addr,{
onEnter:function(args){
// if(index!=undefined && ++count_method_times[index] > maxCallTime) return
LOG("\n-----------------------------------------------------------",LogColor.C33)
var funcName = arr_method_info[0]
LOG("Called "+funcName,LogColor.C96)
LOG("Called "+funcName + "\t at "+method_addr +"("+method_addr.sub(soAddr)+") | MethodInfo "+ptr(m_ptr),LogColor.C96)
LOG("----------------------",LogColor.C33)
for(var i=0;i<arr_method_info[2];i++){
var typeCls = arr_method_info[3][i]
Expand Down

0 comments on commit c293ec7

Please sign in to comment.