jxhczhl / JsRpc

远程调用(rpc)浏览器方法,免去抠代码补环境
1.26k stars 313 forks source link

大佬可以请教个问题吗 如何注入if里面的 s(r, c) 方法,我注入的时候显示s方法为定义 #22

Open rookiexjl opened 7 months ago

rookiexjl commented 7 months ago
if (o(t)) {
    for (var e = t.length, r = [], n = 0; n < e; n++) {
        var c = t[n];
        "string" == typeof c ? s(r, c) : "number" != typeof c && "Number" !== a(c) && "String" !== a(c) || s(r, u(c))
    }
    var l = 
jxhczhl commented 7 months ago

打上断点后 尝试暴露给全局(window) 放开断点再看暴露的是否能用。。能用就连rpc 不能用就再找找其他函数暴露

rookiexjl commented 7 months ago

} else { d = s.apply(b, u); window.rookie = s;
if (typeof u=='object'&& u[2]==14){ console.log("b"); console.log(b); console.log("u"); console.log(u); console.log("window.rookie"); console.log(window.rookie.apply(b, u)); } p[++l] = d; } 我这样全局了正常跑了可以 ,
var d = window.rookie.apply(i, u); console.log(d) 这样调 一直error: TypeError: Function.prototype.apply was called on null, which is null and not a function