Coder Social home page Coder Social logo

wechat-bot's Introduction

Wechat-bot 馈人玫瑰之手,历久犹有余香

GitHub license

新坑QQ群: 712370539 因微信号被举报被封,且没有精力管理,暂不建微信群,请直接到QQ群

如何使用

服务器端

第一步 启动PC微信并登陆完成,微信的版本必须是:3.9.2.23

第二步 启动非注入版,funtool.exe

第三步 点启动即可

客户端

本质就是构造一个json,当然,http和websocket的json构造,还有一些区别,具体请去看  这两个文件:
websocket 客户端  :client-3.2.1.121.js 
http  客户端示例:http-3.2.1.121.js 

发送文本消息示例--websocket

function send_txt_msg()
{
  const j={
    id:getid(),
    type:TXT_MSG,
    wxid:'23023281066@chatroom',//roomid或wxid,必填
    roomid:'null',//此处为空
    content:'hello word',
    nickname:"null",//此处为空
    ext:'null'//此处为空
  };
  const s = JSON.stringify(j);
  return s;
}

发送文本消息示例--http

async function send_txt_msg()
{
  const jpara={
    id:getid(),
    type:TXT_MSG,
    wxid:'23023281066@chatroom',//roomid或wxid,必填
    roomid:'null',//此处为空
    content:'hello word',
    nickname:"null",//此处为空
    ext:'null'//此处为空
  };
  const options =
  {
          url: url+'/api/sendtxtmsg',
          body:{
            para:jpara
        },
        json:true
  };
  let data = await rp(options);
  return data;
}

注意

  • 所有遇到的异常,都是因为json构造错误造成
  • 切记,json里面,是7个配对的key和value,差1个都不行

多开

chmod +x build-injector-box.sh
./build-injector-box.sh
sudo docker run -itd --name wechat-bot --rm  \
    -e HOOK_PROC_NAME=WeChat \
    -e TARGET_AUTO_RESTART="yes" \
    -e INJ_CONDITION="[ \"\`ps -aux | grep funtool | grep -v grep\`\" != '' ] && exit 0" \
    -e TARGET_CMD=wechat-start \
    -p 8080:8080 -p 5555:5555 -p 5900:5900 \
    --add-host=dldir1.qq.com:127.0.0.1 \
    chisbread/wechat-bot:1.0
# 与宿主机共享屏幕, 可以共享剪切板和输入法, 但是图形界面依旧会有些bug, 
# 整体功能不受影响。与宿主机共享屏幕会使vnc功能会失效, 这里就取消了vnc端口映射
xhost +local: # or xhost + # 这个很重要, 不然docker容器正常启动也不会显示微信界面
docker run -d --name wechat-bot1 \
    --device /dev/snd \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $HOME/WeChatFiles:'/home/app/WeChat Files' \
    -e DISPLAY=unix$DISPLAY \
    -e XMODIFIERS=@im=fcitx \
    -e QT_IM_MODULE=fcitx \
    -e GTK_IM_MODULE=fcitx \
    -e AUDIO_GID=`getent group audio | cut -d: -f3` \
    -e GID=`id -g` \
    -e UID=`id -u` \
    -e HOOK_PROC_NAME=WeChat \
    -e TARGET_AUTO_RESTART="yes" \
    -e INJ_CONDITION="[ \"\`ps -aux | grep funtool | grep -v grep\`\" != '' ] && exit 0" \
    -e TARGET_CMD=wechat-start -p 5555:5555 --add-host=dldir1.qq.com:127.0.0.1 \
    chisbread/wechat-bot:1.0

参考项目

wechat-bot's People

Contributors

cixingguangming55555 avatar yunnibbd avatar crazyn2 avatar meibao-real avatar dependabot[bot] avatar joffreyn avatar ersutup avatar tsingly avatar lith-angelo avatar

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.