Code Monkey home page Code Monkey logo

docker-comwechat's Introduction

Hi there 👋

好穷啊,有看得上我的富婆吗

  • 🌱 只是一个菜鸡而已。
  • 💰 如果觉得我的项目对你有帮助,可以给个 star 吗。
呐呐,真的要打赏我的话我也不会拒绝的。(一杯奶茶就可以暖他一整天)

docker-comwechat's People

Contributors

tom-snow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-comwechat's Issues

after running test.py port 10808 is not in use.

问题:

你好,大佬~有两个问题想要请教一下:

  1. test.py文件中18888端口和10808端口的定位和作用,运行文件后,18888端口占用情况有变化,而10808端口仍是未占用状态。
  2. test.py运行过程中,新开一个python文件,执行post_wechat_http_api(15或1, port=18888)会处于长时间无响应状态,port参数设置为10808则直接报refused错误。

我感觉可能是我对下面代码的理解可能有偏差,但是找不到对应的解决方式。。烦请大佬有空了帮忙指导下~
print(post_wechat_http_api(APIS.WECHAT_MSG_START_HOOK, port, {"port": 10808}))start_socket_server() 我对start_socket_server的理解是,默认参数port为10808,运行后会只要不关闭程序会一直监听该机器上10808端口。之后新创建py文件,在里面编写调用post_wechat_http_api(操作类型, 10808, dict类型的参数变量)`即可。

背景

已按下列步骤走完流程:

  1. 运行上方命令启动镜像(更推荐使用 docker-compose )
  2. 连接上 VNC 扫码登陆微信(建议扫码登陆后把微信的版本号弹窗等关闭)
  3. 直接在机器上启动示例文件 test.py

python3 test.py的最后输出如下:
image

然后查看端口占用如下:
image

在群晖NAS(AMD CPU)上无法启动

在 1522+ 上用portainer创建容器之后,容器启动不久就会自动关闭,似乎是内部微信未能成功唤起,理由是重启几次之后遇到了一次没有自动结束的情况,但vnc连进去之后是一片黑,从docker console里手动启动微信也是没有结果。一次典型启动后自动结束产生的log如下

--2023-03-11 15:38:26--  https://github.com/ljc545w/ComWeChatRobot/releases/download/3.7.0.30-0.1.1-pre/3.7.0.30-0.1.1-pre.zip
正在解析主机 github.com (github.com)... 192.30.255.112
正在连接 github.com (github.com)|192.30.255.112|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:https://objects.githubusercontent.com/github-production-release-asset-2e65be/469317973/8a2560d4-30fa-481c-a3a1-0d1779dc94bf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230311%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230311T073826Z&X-Amz-Expires=300&X-Amz-Signature=7833fdfc41171f4154cea7ef79fac626efb3299994020f0cd2958b70045dc3ca&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=469317973&response-content-disposition=attachment%3B%20filename%3D3.7.0.30-0.1.1-pre.zip&response-content-type=application%2Foctet-stream [跟随至新的 URL]
--2023-03-11 15:38:26--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/469317973/8a2560d4-30fa-481c-a3a1-0d1779dc94bf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230311%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230311T073826Z&X-Amz-Expires=300&X-Amz-Signature=7833fdfc41171f4154cea7ef79fac626efb3299994020f0cd2958b70045dc3ca&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=469317973&response-content-disposition=attachment%3B%20filename%3D3.7.0.30-0.1.1-pre.zip&response-content-type=application%2Foctet-stream
正在解析主机 objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
正在连接 objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:390095 (381K) [application/octet-stream]
正在保存至: “comwechat.zip”
     0K .......... .......... .......... .......... .......... 13%  418K 1s
    50K .......... .......... .......... .......... .......... 26%  785K 1s
   100K .......... .......... .......... .......... .......... 39%  790K 0s
   150K .......... .......... .......... .......... .......... 52%  105M 0s
   200K .......... .......... .......... .......... .......... 65%  791K 0s
   250K .......... .......... .......... .......... .......... 78%  122M 0s
   300K .......... .......... .......... .......... .......... 91%  119M 0s
   350K .......... .......... ..........                      100%  482K=0.4s
2023-03-11 15:38:27 (1015 KB/s) - 已保存 “comwechat.zip” [390095/390095])
Archive:  comwechat.zip
   creating: comwechat/com/
  inflating: comwechat/com/CWeChatRobot.exe  
  inflating: comwechat/com/DWeChatRobot.dll  
  inflating: comwechat/com/wxRobot.py  
   creating: comwechat/http/
  inflating: comwechat/http/SWeChatRobot.dll  
  inflating: comwechat/http/wxDriver.dll  
  inflating: comwechat/http/wxDriver.lib  
  inflating: comwechat/http/wxDriver.py  
  inflating: comwechat/http/wxDriver64.dll  
  inflating: comwechat/http/wxDriver64.lib  
/usr/bin/xauth:  file /root/.Xauthority does not exist
New Xtigervnc server '<ServerName>:5 (root)' on port 5905 for display :5.
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /root/.vnc/passwd <ServerName>:5 to connect to the VNC server.
---All in one 微信 ComRobot 容器---
2023-03-11 15:38:26 启动容器中...
等待 5 秒再 hook
2023-03-11 15:38:34 感谢使用.

test.py: Bug in setting the version number?

resp = requests.get(url = "https://api.github.com/repos/tom-snow/wechat-windows-versions/releases?per_page=1",params = {"per_page": 1})
latest_version = resp.json()[0]["tag_name"].replace("v","")

There is a "v" in the front of the version number, so the set version number function may get a wrong number set to the wechat

好像是没能正常启动,日志一直报错,用的是英特尔cpu的debian系统的docker

--2023-05-13 19:12:30-- https://github.com/ljc545w/ComWeChatRobot/releases/download/3.7.0.30-0.0.5/3.7.0.30-0.0.5.zip
正在解析主机 github.com (github.com)... 20.205.243.166
正在连接 github.com (github.com)|20.205.243.166|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:https://objects.githubusercontent.com/github-production-release-asset-2e65be/469317973/26741169-111b-4e78-94b1-b261215d71a1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230513%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230513T111231Z&X-Amz-Expires=300&X-Amz-Signature=dd49ea5a45dd975bd681da4f33525e819aa2c73fdd382fc7ae103663a4dce5a2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=469317973&response-content-disposition=attachment%3B%20filename%3D3.7.0.30-0.0.5.zip&response-content-type=application%2Foctet-stream [跟随至新的 URL]
--2023-05-13 19:12:31-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/469317973/26741169-111b-4e78-94b1-b261215d71a1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230513%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230513T111231Z&X-Amz-Expires=300&X-Amz-Signature=dd49ea5a45dd975bd681da4f33525e819aa2c73fdd382fc7ae103663a4dce5a2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=469317973&response-content-disposition=attachment%3B%20filename%3D3.7.0.30-0.0.5.zip&response-content-type=application%2Foctet-stream
正在解析主机 objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
正在连接 objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:309756 (302K) [application/octet-stream]
正在保存至: “comwechat.zip”
0K .......... .......... .......... .......... .......... 16% 68.9K 4s
50K .......... .......... .......... .......... .......... 33% 202K 2s
100K .......... .......... .......... .......... .......... 49% 63.9K 2s
150K .......... .......... .......... .......... .......... 66% 39.3K 2s
200K .......... .......... .......... .......... .......... 82% 22.9K 1s
250K .......... .......... .......... .......... .......... 99% 46.0K 0s
300K .. 100% 4.65T=6.3s
2023-05-13 19:12:38 (48.0 KB/s) - 已保存 “comwechat.zip” [309756/309756])
Archive: comwechat.zip
creating: comwechat/http/
inflating: comwechat/http/SWeChatRobot.dll
inflating: comwechat/http/wxDriver.dll
inflating: comwechat/http/wxDriver.lib
inflating: comwechat/http/wxDriver.py
inflating: comwechat/http/wxDriver64.dll
inflating: comwechat/http/wxDriver64.lib
creating: comwechat/com/
inflating: comwechat/com/CWeChatRobot.exe
inflating: comwechat/com/DWeChatRobot.dll
inflating: comwechat/com/wxRobot.py
/usr/bin/xauth: file /root/.Xauthority does not exist
New Xtigervnc server 'omv.local:5 (root)' on port 5905 for display :5.
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /root/.vnc/passwd omv.local:5 to connect to the VNC server.
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: 没有那个文件或目录
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: 没有那个文件或目录
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: 没有那个文件或目录
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: 没有那个文件或目录
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: 没有那个文件或目录
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: 没有那个文件或目录
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: 没有那个文件或目录
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: 没有那个文件或目录
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
err:vkd3d_check_extensions: Required device extension "VK_KHR_shader_draw_parameters" is not supported.
err:vkd3d_check_extensions: Required device extension "VK_KHR_shader_draw_parameters" is not supported.
err:vkd3d_check_extensions: Required device extension "VK_KHR_shader_draw_parameters" is not supported.
err:vkd3d_check_extensions: Required device extension "VK_KHR_shader_draw_parameters" is not supported.
err:vkd3d_create_vk_device: Failed to create Vulkan device, vr -7.

centos7.9上Hook似乎失败了

  • 系统: centos7.9

  • 启动方式: docker-compose up -d ,
    image

  • 背景: 在连接vnc,扫码登录后,vnc可以看到微信界面正常,但是出现以下报错信息dbus[32]: arguments *******,且通过api无法访问18888端口,显示refused

  • 具体报错: `dbus[32]: arguments to dbus_connection_send_with_reply_and_block() were incorrect, assertion "connection != NULL" failed in file ../../../dbus/dbus-connection.c line 3544.
    This is normally a bug in some application using the D-Bus library.

    D-Bus not built with -rdynamic so unable to print a backtrace
    wine: Assertion failed at address F7779430 (thread 0058), starting debugger...
    2022-12-11 15:51:39: basic_code_modules.cc:73: ERROR: Module rsaenh.dll could not be stored
    2022-12-11 15:51:39: basic_code_modules.cc:73: ERROR: Module api-ms-win-downlevel-shell32-l1 could not be stored
    2022-12-11 15:51:39: basic_code_modules.cc:73: ERROR: Module api-ms-win-downlevel-shell32-l1 could not be stored
    2022-12-11 15:51:39: basic_code_modules.cc:73: ERROR: Module rsaenh.dll could not be stored
    2022-12-11 15:51:49: basic_code_modules.cc:73: ERROR: Module rsaenh.dll could not be stored
    2022-12-11 15:51:49: basic_code_modules.cc:73: ERROR: Module api-ms-win-downlevel-shell32-l1 could not be stored
    2022-12-11 15:51:49: basic_code_modules.cc:73: ERROR: Module api-ms-win-downlevel-shell32-l1 could not be stored
    2022-12-11 15:51:49: basic_code_modules.cc:73: ERROR: Module rsaenh.dll could not be stored`
    cc

  • 报错后端口信息: 18888端口未启动. image

  • 尝试的操作:docker stop container后,docker restart container,日志和端口信息变化如下:虽然18888端口有了,但是调用api无长时间无响应。且vnc登录窗口里可以看到微信窗口变是卡死状态。重启机器后会重复上述问题
    image
    image
    image

无法启动,重复循环等待 5 秒再 hook

---All in one 微信 ComRobot 容器---
2024-02-26 20:00:11 启动容器中...
等待 5 秒再 hook
Cleaning stale pidfile '/root/.vnc/BleachWrt.lan:5905.pid'!
Cleaning stale X11 lock '/tmp/.X5-lock'!
Cleaning stale X11 lock '/tmp/.X11-unix/X5'!

New Xtigervnc server 'BleachWrt.lan:5 (root)' on port 5905 for display :5.
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /root/.vnc/passwd BleachWrt.lan:5 to connect to the VNC server.

VNCserver 启动失败

image

按照 https://blog.honus.top/2022/10/15/580.html 配置,使用 docker-compose up -d 启动 docker 之后调用 docker logs comwechat 报如上错误。

具体的 docker-compose.yaml 文件如下

version: '3.3'
services:
    wechatpchook:
        container_name: comwechat
        environment:
            - VNCPASS=admin123
            - COMWECHAT=https://github.com/ljc545w/ComWeChatRobot/releases/download/3.7.0.30-0.1.0-pre/3.7.0.30-0.1.0-pre.zip
        volumes:
            - "/root/WeChat/Files/:/home/user/.wine/drive_c/users/user/My Documents/WeChat Files/"
            - "/root/WeChat/Data/:/home/user/.wine/drive_c/users/user/Application Data/"
        privileged: true
        network_mode: host
        image: tomsnow1999/docker-com_wechat_robot:latest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.