Skip to content

无法 hook #58

@JHC000abc

Description

@JHC000abc

测试环境:
ubuntu 22.04
chrome 浏览器

(crawler) developer@1606ae51e715:/home/jhc/Projects/Python/Crawler$ npm --version
6.14.18

测试站点:https://demos.geetest.com/comment.html

Image Image Image Image

日志:

eveloper/.config/JetBrains/PyCharm2025.2/node/versions/24.11.1/bin/node /home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/proxy-server.js
缓存文件已加载完毕,目前有缓存 6个
[AnyProxy Log][2025-11-24 17:57:25]: throttle :10000kb/s
[AnyProxy Log][2025-11-24 17:57:25]: Http proxy started on port 10086
[AnyProxy Log][2025-11-24 17:57:25]: web interface started on port 8002
[AnyProxy Log][2025-11-24 17:58:11]: received https CONNECT request www.google.com
[AnyProxy Log][2025-11-24 17:58:11]: will forward to local https server
(node:21737) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[AnyProxy Log][2025-11-24 17:58:11]: [internal https]proxy server for www.google.com established
[AnyProxy Log][2025-11-24 17:58:12]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:12]: received https CONNECT request apps.bdimg.com
[AnyProxy Log][2025-11-24 17:58:12]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:12]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:12]: [internal https]proxy server for demos.geetest.com established
[AnyProxy Log][2025-11-24 17:58:12]: [internal https]proxy server for apps.bdimg.com established
[AnyProxy Log][2025-11-24 17:58:12]: received request to: GET demos.geetest.com/comment.html
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET demos.geetest.com/libs/gt.js
[AnyProxy Log][2025-11-24 17:58:13]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:13]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:13]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:13]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:13]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:13]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:13]: [internal https]proxy server for demos.geetest.com established
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET demos.geetest.com/img/%E8%A1%A8%E6%83%85.png
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET demos.geetest.com/img/%E5%9B%BE%E7%89%87.png
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET demos.geetest.com/gt/register-userdemo?t=1763978293062
[AnyProxy Log][2025-11-24 17:58:13]: received https CONNECT request content-autofill.googleapis.com
[AnyProxy Log][2025-11-24 17:58:13]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:13]: [internal https]proxy server for content-autofill.googleapis.com established
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET demos.geetest.com/img/%E5%AD%97%E5%8F%B7.png
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET content-autofill.googleapis.com/v1/pages/ChVDaHJvbWUvMTQyLjAuNzQ0NC4xNzUSGQnv2u4DfQtCIBIFDTE9lDAhHjykXBgbk2cYt6nKAQ==?alt=proto
[AnyProxy Log][2025-11-24 17:58:13]: received https CONNECT request apiv6.geetest.com
[AnyProxy Log][2025-11-24 17:58:13]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:13]: [internal https]proxy server for apiv6.geetest.com established
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET apiv6.geetest.com/gettype.php?gt=cb25522b383a44c171e2e6566654c18f&callback=geetest_1763978300009
Error: ENOENT: no such file or directory, open '/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/src/components/global-assign-hook-component/core/hook.js'
    at Object.openSync (node:fs:560:18)
    at Object.readFileSync (node:fs:444:35)
    at loadPluginsAsString (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/plugins-manager.js:41:27)
    at loadPluginsAsStringWithCache (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/plugins-manager.js:22:33)
    at processRealtime (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:195:36)
    at processJavaScriptResponse (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:163:9)
    at Object.process (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:54:13)
    at Object.beforeSendResponse (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/rules.js:6:35)
    at beforeSendResponse.next (<anonymous>)
    at onFulfilled (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:65:19)
    at /home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:54:5
    at new Promise (<anonymous>)
    at co (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:50:10)
    at toPromise (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:118:63)
    at next (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:99:29)
    at onFulfilled (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:69:7) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/src/components/global-assign-hook-component/core/hook.js'
}
[AnyProxy Log][2025-11-24 17:58:13]: received request to: GET apiv6.geetest.com/get.php?gt=cb25522b383a44c171e2e6566654c18f&challenge=e22d2325c1f1f98c2ce93f26e56bfcb6&lang=zh-cn&pt=0&client_type=web&w=oIza1CdFgXB2t6NOpD5rXsL6F6mTopZWjQOOB7vsZElgX2vmrparui0SvGjLy2xH(IgD3LXz7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QIqJFkhJqUvBrfgIGgbDbzX2eS0pYHUrWMhLupZXRR25)9pRBg3WZT19fLMGwVyFifOfWReoXmt)8UpOGWfgDBMWEcrF3lsjjvjB90XL09GrBhg.a4d3e92b4eceab40e99d060d096d1df21016b3fe89a0ce2d4f411c19af2dce745975ce7855a4cd344245aa59056b171a7576eef9fd57422a201676ad61a6485493d1e8723c0fff03eaff89a57a1d0a97cf1b6e4aa17f2bdcb577e41b48113546f427371df07a01641ea13e5d83696f8df5b98d20b229d341dda9d0e2b8ee4c62&callback=geetest_1763978302550
[AnyProxy Log][2025-11-24 17:58:14]: received https CONNECT request beacons.gcp.gvt2.com
[AnyProxy Log][2025-11-24 17:58:14]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:14]: [internal https]proxy server for beacons.gcp.gvt2.com established
[AnyProxy Log][2025-11-24 17:58:14]: received request to: POST beacons.gcp.gvt2.com/domainreliability/upload
Error: ENOENT: no such file or directory, open '/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/src/components/global-assign-hook-component/core/hook.js'
    at Object.openSync (node:fs:560:18)
    at Object.readFileSync (node:fs:444:35)
    at loadPluginsAsString (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/plugins-manager.js:41:27)
    at loadPluginsAsStringWithCache (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/plugins-manager.js:22:33)
    at processRealtime (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:195:36)
    at processJavaScriptResponse (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:163:9)
    at Object.process (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:54:13)
    at Object.beforeSendResponse (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/rules.js:6:35)
    at beforeSendResponse.next (<anonymous>)
    at onFulfilled (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:65:19)
    at /home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:54:5
    at new Promise (<anonymous>)
    at co (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:50:10)
    at toPromise (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:118:63)
    at next (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:99:29)
    at onFulfilled (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:69:7) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/src/components/global-assign-hook-component/core/hook.js'
}
[AnyProxy Log][2025-11-24 17:58:23]: received https CONNECT request content-autofill.googleapis.com
[AnyProxy Log][2025-11-24 17:58:23]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:23]: received request to: GET content-autofill.googleapis.com/v1/pages/ChVDaHJvbWUvMTQyLjAuNzQ0NC4xNzUSGQnv2u4DfQtCIBIFDTE9lDAhHjykXBgbk2cYt6nKAQ==?alt=proto
[AnyProxy Log][2025-11-24 17:58:26]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:26]: received https CONNECT request static.geetest.com
[AnyProxy Log][2025-11-24 17:58:26]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:26]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: [internal https]proxy server for static.geetest.com established
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET demos.geetest.com/comment.html
[AnyProxy Log][2025-11-24 17:58:28]: received https CONNECT request content-autofill.googleapis.com
[AnyProxy Log][2025-11-24 17:58:28]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET content-autofill.googleapis.com/v1/pages/ChVDaHJvbWUvMTQyLjAuNzQ0NC4xNzUSGQnv2u4DfQtCIBIFDTE9lDAhHjykXBgbk2cYt6nKAQ==?alt=proto
[AnyProxy Log][2025-11-24 17:58:28]: received https CONNECT request beacons.gcp.gvt2.com
[AnyProxy Log][2025-11-24 17:58:28]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET demos.geetest.com/libs/gt.js
[AnyProxy Log][2025-11-24 17:58:28]: received request to: POST beacons.gcp.gvt2.com/domainreliability/upload
[AnyProxy Log][2025-11-24 17:58:28]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:28]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:28]: received https CONNECT request demos.geetest.com
[AnyProxy Log][2025-11-24 17:58:28]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: [internal https]proxy server for demos.geetest.com established
[AnyProxy Log][2025-11-24 17:58:28]: [internal https]proxy server for demos.geetest.com established
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET demos.geetest.com/img/%E8%A1%A8%E6%83%85.png
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET demos.geetest.com/img/%E5%9B%BE%E7%89%87.png
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET demos.geetest.com/gt/register-userdemo?t=1763978308250
[AnyProxy Log][2025-11-24 17:58:28]: received https CONNECT request content-autofill.googleapis.com
[AnyProxy Log][2025-11-24 17:58:28]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: [internal https]proxy server for content-autofill.googleapis.com established
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET content-autofill.googleapis.com/v1/pages/ChVDaHJvbWUvMTQyLjAuNzQ0NC4xNzUSGQnv2u4DfQtCIBIFDTE9lDAhHjykXBgbk2cYt6nKAQ==?alt=proto
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET demos.geetest.com/img/%E5%AD%97%E5%8F%B7.png
[AnyProxy Log][2025-11-24 17:58:28]: received https CONNECT request apiv6.geetest.com
[AnyProxy Log][2025-11-24 17:58:28]: will forward to local https server
[AnyProxy Log][2025-11-24 17:58:28]: received request to: GET apiv6.geetest.com/gettype.php?gt=cb25522b383a44c171e2e6566654c18f&callback=geetest_1763978312042
Error: ENOENT: no such file or directory, open '/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/src/components/global-assign-hook-component/core/hook.js'
    at Object.openSync (node:fs:560:18)
    at Object.readFileSync (node:fs:444:35)
    at loadPluginsAsString (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/plugins-manager.js:41:27)
    at loadPluginsAsStringWithCache (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/plugins-manager.js:22:33)
    at processRealtime (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:195:36)
    at processJavaScriptResponse (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:163:9)
    at Object.process (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/components/global-assign-hook-component/core/global-assign-hook-component-main.js:54:13)
    at Object.beforeSendResponse (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/rules.js:6:35)
    at beforeSendResponse.next (<anonymous>)
    at onFulfilled (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:65:19)
    at /home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:54:5
    at new Promise (<anonymous>)
    at co (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:50:10)
    at toPromise (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:118:63)
    at next (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:99:29)
    at onFulfilled (/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/node_modules/co/index.js:69:7) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/jhc/Projects/Python/Crawler/js/ast-hook-for-js-RE/src/proxy-server/src/components/global-assign-hook-component/core/hook.js'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions