JSREI / ast-hook-for-js-RE

浏览器内存漫游解决方案(探索中...)
Other
1.52k stars 396 forks source link

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

Open liupeitao opened 4 months ago

liupeitao commented 4 months ago

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 commented 4 months ago

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

ScoripiusF commented 3 months ago

我也遇到这个问题,不过我解决了,先说出现的原因 原因出现在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