Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js代码兼容问题 #4

Closed
sv3nbeast opened this issue Apr 24, 2022 · 4 comments
Closed

js代码兼容问题 #4

sv3nbeast opened this issue Apr 24, 2022 · 4 comments

Comments

@sv3nbeast
Copy link

image

复制jsenv.js在目标网站控制台运行后报上图

让把这里的this改成let。请问这里是否存js兼容或者语法问题

function Hlclient(wsURL) {
    this.wsURL = wsURL;
    this.handlers = {};
    this.socket = {};

    if (!wsURL) {
        throw new Error('wsURL can not be empty!!')
    }
    this.connect()
}
@jxhczhl
Copy link
Owner

jxhczhl commented Apr 24, 2022

提示这个是因为你在断点调试中。你开浏览器的时候就可以先把jsenv.js注入好的,或者你把局部函数暴露给全局之后,放开断点调试了再注册。

@sv3nbeast
Copy link
Author

我尝试先注入jsenv,没有问题,但是下了断点后再去调用没办法调用,请问这个有办法实现运行到断点处获得参数的值、调用其他函数的功能吗,因为一些加密js到运行了才正常使用,想直接在断点处进行改值,调函数,进行远程交互,抱歉哈,因为js不是很熟练,大概意思是这样。

@jxhczhl
Copy link
Owner

jxhczhl commented Apr 24, 2022

你声明一个window全局变量,列如"window.test=其他局部函数" 这样就相当于暴露给全局了,然后你放开断点,后面调用test函数就行了。

@sv3nbeast
Copy link
Author

学到了,感谢指导和提供的工具

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants