Github地址:https://github.com/suruixin/w...

效果图

主动回复音讯

自定义回复文件图片

自定义回复音讯

发送音讯

群发音讯

勾销主动回复

背景

hi!大家好,明天给大家带来我的小工具锦集第二季,对于微信助手的话题,大概在2019年6月份左右,看到了一个十分有意思的我的项目微信每日说,过后整好动手了树莓派,想要部署一版,用来做每日天气推送(原谅我穷,还常常被雨淋)起初在应用的过程中发现web版微信不反对2017年后注册的微信号登陆(当初可能更多的微信号),在通过了漫长的查找过程,最终发现了赵庆明老师对于微信hook的课程(目前已下架),决定已这个为突破口,开发一版微信助手工具,目前我的项目曾经收尾

奈何本人能力无限,本人写的dll惨不忍睹,正好有位大佬开源了本人的我的项目(wechat-bot),于是,我就十分开心的利用electron制作了我的微信助手工具

上面来对我的我的项目进行一个简略的介绍

技术栈

vue-cli3vuetifysasselectron-builderelectron-updatenode-ffi-napi

对于node-ffi-napi大家能够参考我的node-ffi从入门到放弃(装置篇)来进行装置

版本要求

node: 12.16.0-x86node-gyp: 7.0.0ffi-napi: 2.4.5微信版本: 2.9.0.123

微信: 2.9.0.123
提取码:j4m0

注入器及hook文件地址

hook

注入器

目录

./├ public                   // 公共文件寄存地址├ src│  ├ config                // 配置文件寄存地址│  │  ├ config.ts          // 零碎中须要用到的不对外公开的配置信息│  │  ├ index.ts           // 零碎中须要用到的初始化配置信息│  │  └ yaml.ts            // 将初始化配置寄存到用户电脑上,并生成yarm文件│  ├ enum                  // 数据类型文件寄存地址│  │  ├ ipc.ts             // 主过程和渲染过程通信│  │  ├ mainEnum.ts        // 主过程中用到的数据类型│  │  └ weChat.ts          // 调用微信hook进行数据传输的数据类型│  ├ interface             // 接口寄存地址│  │  ├ api.ts             // 数据申请接口│  │  ├ config.ts          // 初始化配置信息接口│  │  ├ mainInterface.ts   // 主过程中用到的接口│  │  ├ views.ts           // 渲染过程中用到的接口│  │  ├ vuexInterface.ts   // vuex用到的接口│  │  └ weChatParams.ts    // 微信hook用到的接口│  ├ mainProcess            // 主过程寄存地址│  │  ├ BrowserWindow      // 主过程配置文件│  │  │  └ index.ts│  │  ├ Inject             // 注入文件│  │  │  ├ Inject.ts      // 注入文件封装│  │  │  └ manage.ts      // 注入文件应用│  │  ├ ipc                // 主过程与渲染过程通信│  │  │  └ index.ts│  │  ├ tray               // 托盘│  │  │  └ index.ts│  │  ├ update             // 降级│  │  │  └ index.ts│  │  └ index.ts           // 主过程输入文件│  ├ render                 // 渲染过程寄存地址│  │  ├ api                // 数据申请│  │  │  ├ index.ts       // 数据申请进口文件│  │  │  ├ turing.ts      // 图灵机器人数据申请│  │  │  └ weChat.ts      // 微信hook数据申请│  │  ├ assets             // 渲染过程动态文件│  │  │  ├ icon           // icon│  │  │  ├ images         // 图片│  │  │  └ sass           // 全局sass文件│  │  ├ components         // 组件│  │  │  ├ Common│  │  │  │  └ Snackbar.vue // 谬误揭示│  │  │  ├ Main             // 通用主页面│  │  │  │  ├ components│  │  │  │  │  ├ content.vue        // 内容区域│  │  │  │  │  ├ footer.vue         // 底部│  │  │  │  │  ├ navigation.vue     // 左侧边栏│  │  │  │  │  └ title.vue          // 头部│  │  │  │  └ index.vue  // 通用主页面入口文件│  │  │  └ Socket│  │  │     └ Socket│  │  │         └ WeChat.ts // 微信hook websocket监听│  │  ├ mixins             // 混入│  │  │  └ index.ts│  │  ├ plugins            // 插件│  │  │  ├ tool│  │  │  │  ├ api.ts     // api文件输入│  │  │  │  └ index.ts   // 输入本目录下所有文件│  │  │  ├ common.ts      // 通用办法│  │  │  ├ main.ts        // vue全局注入│  │  │  └ vuetify.ts     // vuetify配置│  │  ├ router             // 路由│  │  │  ├ index.ts│  │  │  └ routes.ts│  │  ├ store              // vuex│  │  │  ├ modules│  │  │  │  ├ index.ts│  │  │  │  ├ main.ts│  │  │  │  └ userList.ts│  │  │  ├ actions.ts│  │  │  ├ getters.ts│  │  │  ├ index.ts│  │  │  ├ mutations.ts│  │  │  └ mutations.ts│  │  ├ utils              // 工具封装│  │  │  ├ axios.ts       // axios封装│  │  │  ├ ipc.ts         // 通用主过程通信分装│  │  │  └ require.ts     // get post等申请封装│  │  └ views              // 页面│  │      ├ About          // 对于页面│  │      │ └ AboutPage.vue          // 对于页面│  │      ├ Home           // 首页(未想好做什么样的)│  │      ├ SendMsg        // 发送音讯页面│  │      │ ├ SendMsgPage            // 发送音讯页面相干信息│  │      │ │ ├ userList            // 好友列表相干│  │      │ │ │ ├ listItem.vue     // 单好友页面│  │      │ │ │ └ listWrapper.vue  // 好友组页面│  │      │ │ ├ setParams.vue       // 右侧发送音讯│  │      │ │ └ userList.vue        // 好友列表│  │      │ └ SendMsgPage.vue        // 发送音讯页面入口│  │      └ Tool           // 配置页面(未想好做什么样的)│  ├ type                   // 类型别名文件寄存地址│  ├ App.vue│  ├ background.ts          // 主过程入口│  ├ main.ts│  ├ registerServiceWorker.ts│  ├ shims-node.d.ts│  ├ shims-tsx.d.ts│  └ shims-vue.d.ts├ static│  ├ dll // 动态链接库(hook和注入)寄存地址│  └ icon // 打包icon寄存地址├ package.json├ tsconfig.json└ vue.config.js

electron简介

electron 是 GitHub 公布的跨平台桌面利用开发工具,应用 JavaScriptHTMLCSS 构建跨平台的桌面应用程序,其自身是基于 C++ 开发的

官网: https://www.electronjs.org/

文档: https://www.electronjs.org/docs

主过程

向微信过程注入dll

import ffi from "ffi-napi";import { DllInject } from "@/interface/mainInterface";import { join } from "path";export default class Inject {  private Handel: DllInject;  public constructor(dllPath: string) {    this.Handel = ffi.Library(dllPath, {      Inject: ['int', ["string", "string"]]    })  }  public Inject(dllPath: string, exePath: string): number {    return this.Handel.Inject(dllPath, exePath);  }  public StatusCode(code: number): string {    const StatusCode: {      [p: number]: string;    } = {      0: "胜利",      1: "没有找到微信过程,请确认微信是否关上",      2: "关上过程失败",      3: "分配内存空间失败",      4: "写入内存失败",      5: "查找LoadLibraryA失败",      6: "启动近程线程失败"    };    return StatusCode[code]  }}const InDllPath = join(global.__static, "/dll/demoInject.dll");const BeInDllPath = join(global.__static, "/dll/version2.9.0.123-4.5.7.69.dll");const WeChatInject = new Inject(this.InDllPath);WeChatInject.Inject(BeInDllPath, "WeChat.exe");

渲染过程

后续将api整顿好,提供地址,内容太多,写完后发现不是很好,删除了

致谢

感激cixingguangming55555大佬提供的wechat-bot

正告

本我的项目初衷为解决生存中须要被动回复音讯/发送文件,严禁用于打广告/推广等行为

微信助手不属于腾讯认可的助手工具,所以用于营销,发广告等行为会导致封号,这也是我说严禁用于打广告/推广的起因,心愿大家能够在腾讯容许的范畴内进行应用

如二次开发给女朋友查问干湿垃圾,每日天气播报等等,同时欢送各位it敌人加好友一起钻研前端 c++常识(自己前端一枚,会一些简略的c++)