wechat-crash-helper
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

wechat-crash-helper

基于 frida 的 pc 版微信异常助手,主要用于静默微信的异常报告窗口,各版本通杀。

适用于:

  • 个人微信 (任意版本)
  • 企业微信 (任意版本)

前置要求

  • windows > 7
  • nodejs 8.x / 10.x / 14.x x86 (不要用 nodejs 12.xfridanodejs 12.x 识别有问题,会导致安装失败)
  • typescript >= 8.x (引用此包时,可不使用 typescript)

安装

npm i wechat-crash-helper

使用方式

import {
  WechatCrashHelper,
  WechatFileName,
  DetachReason,
} from 'wechat-crash-helper'
 
const wxFile = WechatFileName.wechat
const helper = new WechatCrashHelper(wxFile)
main().catch((reason) => {
  console.log('执行异常:', reason)
})
 
async function main() {
  await helper.attach()
  await helper.setDetachedCallback(onDetached)
  await helper.closeBugReportFlag()
  await helper.closeSendBugReport()
  const info = await helper.getInfo()
  console.log('从微信获得信息:', info)
 
  const modules = await helper.enumerateModules()
  console.log('当前模块列表:', JSON.stringify(modules, null, 2))
 
  setTimeout(() => {
    console.log('准备分离')
    helper.detach()
  }, 15000)
}
 
function onDetached(reason: DetachReason) {
  switch (reason) {
    case DetachReason.ProcessTerminated:
      console.log(`进程结束: ${reason}`)
      break
    case DetachReason.ApplicationRequested:
      console.log(`脚本分离: ${reason}`)
      break
 
    default:
      break
  }
}
 
async function onBeforeExit() {
  await helper.detach()
}
 
process.on('beforeExit', onBeforeExit)
process.on('SIGINT', onBeforeExit)

开发模式

npm i
npm run dev

Readme

Keywords

none

Package Sidebar

Install

npm i wechat-crash-helper

Weekly Downloads

0

Version

1.1.3

License

ISC

Unpacked Size

33.5 kB

Total Files

15

Last publish

Collaborators

  • binsee