commit a2004d933f47088c5e2a103f97432f4b18187324 Author: 李寻欢 Date: Fri Oct 27 14:08:35 2023 +0800 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62c8935 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..67c3958 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM furacas/wine-vnc-box:latest + +WORKDIR /home/app/.wine/drive_c + +ADD https://github.com/furacas/DllInjector/releases/download/v1.4.0/DllInjector64.exe DllInjector.exe + +RUN sudo chown app:app DllInjector.exe + +ADD https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.5.81/WeChatSetup-3.9.5.81.exe WeChatSetup.exe + +COPY install-wechat.sh install-wechat.sh + +RUN bash -c 'nohup /entrypoint.sh 2>&1 &' && \ + sleep 10 && \ + sudo chown app:app WeChatSetup.exe && \ + ./install-wechat.sh && \ + rm -rf WeChatSetup.exe && \ + rm -rf install-wechat.sh + + +ADD https://github.com/ttttupup/wxhelper/releases/download/3.9.5.81-v10/wxhelper.dll wxhelper.dll + +RUN sudo chown app:app wxhelper.dll + + +COPY cmd.sh /cmd.sh + + +CMD ["/cmd.sh"] + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..d87a88a --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# wxhelper-docker + +## 免责声明 +本仓库发布的内容,仅用于学习研究,请勿用于非法用途和商业用途!如因此产生任何法律纠纷,均与作者无关! +使用此项目可能会造成封号等后果。请自行承担风险。仅用于学习研究,请勿于非法用途。 + +## 项目介绍 +本项目是[wxhelper](https://github.com/ttttupup/wxhelper)的docker一键部署版本,自动完成微信的安装并注入。 + +关于wxhelper的具体使用方法可以参考[wxhelper](https://github.com/ttttupup/wxhelper)的README或对应分支的文档。 + + +## 项目使用 + +运行镜像 + +``` +docker run -d --rm -p 8080:8080 -p 19088:19088 --name wxhelper-docker hxrbunny/wxhelper-docker:latest +``` +浏览器访问 http://127.0.0.1:8080/vnc.html 扫码登录 + + +## 特别注意 +- 只支持AMD64架构,不支持ARM +- 如果你不了解docker的网络架构也不想了解,使用host模式启动可能是更好的方案。但是注意只有Linux支持host模式 + +## 特别感谢 +感谢下列项目,记得给大佬们点🌟 +https://github.com/ttttupup/wxhelper +https://github.com/furacas/DllInjector +https://github.com/tom-snow/wechat-windows-versions diff --git a/cmd.sh b/cmd.sh new file mode 100644 index 0000000..5cf56e0 --- /dev/null +++ b/cmd.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +exec sudo -E bash -c 'supervisord -c /etc/supervisord.conf -l /var/log/supervisord.log' & +sleep 10 + +wine 'C:\Program Files\Tencent\WeChat\WeChat.exe' & + +sleep 10 + +wine 'C:\DllInjector.exe' 'C:\wxhelper.dll' WeChat.exe 2>&1 + +wait \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..84330df --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.3" + +services: + wxhelper-docker: + build: . + restart: unless-stopped + container_name: wxhelper-docker + tty: true + ports: + - 8080:8080 + - 19088:19088 diff --git a/install-wechat.sh b/install-wechat.sh new file mode 100644 index 0000000..4337060 --- /dev/null +++ b/install-wechat.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +## https://gitlab.com/cunidev/gestures/-/wikis/xdotool-list-of-key-codes +function install() { + while : + do + xdotool search '微信安装向导' + NOTFOUND=$? + echo $NOTFOUND + if [ "$NOTFOUND" == "0" ]; then + sleep 80 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key space + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Return + sleep 16 + xdotool key Tab + sleep 0.5 + xdotool key Tab + sleep 0.5 + xdotool key Return + break + fi + sleep 5 + done +} + +wine WeChatSetup.exe & + + +sleep 10 +install +wait +sleep 10 \ No newline at end of file