From c293ec76f0849dfb6391a70ac7ee443b8266ce09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=A6=E4=BD=A0=E4=B8=80=E8=B5=B7=E5=81=B7=E8=A5=BF?= =?UTF-8?q?=E7=93=9C?= <20512058+axhlzy@users.noreply.github.com> Date: Tue, 30 Mar 2021 18:07:54 +0800 Subject: [PATCH] Update Ufun.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试修改后的代码,修改一个小问题,新增更详细的显示信息 --- U3DHook/Ufun.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/U3DHook/Ufun.js b/U3DHook/Ufun.js index c93a20ec..df767d69 100644 --- a/U3DHook/Ufun.js +++ b/U3DHook/Ufun.js @@ -2,7 +2,7 @@ * @Author lzy * @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 */ @@ -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