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

🅱️ugs: 教程在Linux复现会存在找不到路径, 最终结果是可以抓到包, 但是浏览器控制台输出: hook is not defined #48

Open
liupeitao opened this issue May 29, 2024 · 2 comments

Comments

@liupeitao
Copy link

10Third-party cookie will be blocked. Learn more in the Issues tab.
JeJmt_36yzIsfsDRk-2EIQ_Le84.br.js:847 Uncaught ReferenceError: cc11001100_hook is not defined
at JeJmt_36yzIsfsDRk-2EIQ_Le84.br.js:847:4
6NFcWbwVeSebUt-Iwz4MYa4EVA8.br.js:251 Uncaught ReferenceError: cc11001100_hook is not defined
at 6NFcWbwVeSebUt-Iwz4MYa4EVA8.br.js:251:4
eKvcHdnNwo1WcxoSioV4ztnfZk8.br.js:1 [Deprecation] Listener added for a 'DOMNodeInserted' mutation event. This event type is deprecated, and will be removed from this browser very soon. Usage of this event listener will cause performance issues today, and represents a large risk of future site breakage. Consider using MutationObserver instead. See https://chromestatus.com/feature/5083947249172480 for more information.
v @ eKvcHdnNwo1WcxoSioV4ztnfZk8.br.js:1
eKvcHdnNwo1WcxoSioV4ztnfZk8.br.js:1 [Deprecation] Listener added for a 'DOMNodeRemoved' mutation event. This event type is deprecated, and will be removed from this browser very soon. Usage of this event listener will cause performance issues today, and represents a large risk of future site breakage. Consider using MutationObserver instead. See https://chromestatus.com/feature/5083947249172480 for more information.
v @ eKvcHdnNwo1WcxoSioV4ztnfZk8.br.js:1
overlay?callback=initializeMap&partner=serp&branch=experimental:1 Uncaught ReferenceError: cc11001100_hook is not defined
at overlay?callback=initializeMap&partner=serp&branch=experimental:1:26
hook
VM242:1 Uncaught ReferenceError: hook is not defined
at :1:1
(anonymous) @ VM242:1
fewf

图片

@liupeitao
Copy link
Author

按照教程, 在Linux系统上会存在路径问题
图片

@liupeitao liupeitao changed the title 可以抓到包, 但是控制台输出: hook is not defined 🅱️ugs: 教程在Linux复现会存在找不到路径, 最终结果是可以抓到包, 但是浏览器控制台输出: hook is not defined May 29, 2024
@ScoripiusF
Copy link

我也遇到这个问题,不过我解决了,先说出现的原因
原因出现在ast-hook-for-js-RE\src\components\global-assign-hook-component\core目录下的plugins-manager.js里,然后作者定义了这么一个变量const hookJsCode = fs.readFileSync(path.join(__dirname, 'src/components/global-assign-hook-component/core/hook.js')).toString();然后你执行的时候估计是在src下的proxy-server下,然后_dirname就会给你识别成项目路径/src/proxy-server,所以这个路径就错啦,两个解决方法
1.修改hookJsCode变量
2.在主目录下执行node src/proxy-server/proxy-server.js

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