Javascript:跟踪函数父对象层次结构,以便从窗口上下文中调用它(Javascript: Tracing a Function Parent Object Hierarchy, In Order

编程入门 行业动态 更新时间:2024-10-20 11:43:23
Javascript:跟踪函数父对象层次结构,以便从窗口上下文中调用它(Javascript: Tracing a Function Parent Object Hierarchy, In Order to Call It From the Window Context)

我有一个第三方页面,其中包含由WebPack生成的复杂,半混淆的脚本。 它最终调用一个函数,深埋在数组中对象内的某个对象内部等。调试它时,我可以看到调用函数的行,但我想跟踪整个对象层次结构,这样我就可以调用这个函数从窗口上下文。

在调试和断开相关的行时,我得到了调用堆栈,但这并没有帮助我对我调用这个函数的方式进行反向工程,因为它隐藏在对象和数组中。

有没有办法追溯这个? 例如,可能有Function对象打印其父对象?

提前致谢。

I have a 3rd-party page with a complex, semi-obfuscated script generated by WebPack. It eventually calls a function, buried deep inside some object within an object within an array, etc. When debugging it I can see the line where the function is called at, but I want to trace the entire object hierarchy so I can call this function from the window context.

When debugging and breakpointing the relevant line, I get the call stack, but this doesn't help me reverse-engineer the way I can call this function, since it's buried within objects and arrays.

Is there any way to trace this backwards? For example, maybe have the Function object print its parents?

Thanks in advance.

最满意答案

在下面的文章中查看“获取函数的堆栈跟踪”,这是您不知道的Javascript提示和技巧

希望这可以帮助

check this "Get the stack trace for a function" in the following article Javascript Tips & Tricks you didn't know

Hope this helps

更多推荐

本文发布于:2023-08-07 01:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458848.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文中   函数   层次   对象   窗口

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!