Giter VIP home page Giter VIP logo

wechatassistant-formac's Introduction

另外一种让小助手运行的方法

首先感谢MustangYM大佬的微信小助手!!! 新版小助手已支持3.4.1版本的微信,已同步更新。


安装了插件之后聊天记录丢失的问题,可以通过迁移聊天记录的方式来解决:

执行以下命令即可迁移聊天记录:

cp -R ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat ~/Library/Application\ Support/com.tencent.xinWeChat

同样的,假如是卸载操作,需要把聊天记录迁移回原版微信中,执行以下命令:

cp -R ~/Library/Application\ Support/com.tencent.xinWeChat ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencen


小助手Alfred扩展

在小助手原有的Alfred扩展的基础上修改了下,新增了:

  1. 加载小助手并启动的功能
  2. 使用官方微信双开功能

如果日常使用Alfred,这种方式还是很方便的,不用Alfred的同学继续使用独立App运行吧。

核心代码也是下面那两行,仍是DYLD_INSERT_LIBRARIES加载,所以依然需要自行关闭SIP

XEvGWzqsxod2fli 7fiqGkBleuW3EbD

下载地址:WeChat.Plugin.alfredworkflow


WeChatAssistant-ForMac

DYLD_INSERT_LIBRARIES需要关闭系统的SIP,如果使用此方法,请自行关闭SIP

前段时间,微信小助手用户被大规模封号。

我个人认为,究其原因,可能是下面几点:

  1. 微信可能会检测自身完整性是否被破坏。WeChatExtension是使用insert_dylib写入微信的MachO的Load Commands来进行加载的,这个过程中,必定不可逆的破坏的微信的签名,甚至需要使用codesign进行重签才可以使用。
  2. 微信可以通过检测WeChatExtension这个dylib是否加载到自身进程来进行检测。
  3. 其他可能存在的针对函数功能的检测手段。

经过我一段时间的实践,只要针对前两者进行处理,小助手就已经可以稳定运行了:

  1. 使用原版微信,不破坏微信的任何原始文件,通过设置环境变量DYLD_INSERT_LIBRARIES的值来加载小助手的dylib。
  2. 将WeChatExtension改名为其他系统dylib的名称加载。

所以核心代码就两句:

export DYLD_INSERT_LIBRARIES="改名后的小助手dylib的路径"
nohup /Applications/WeChat.app/Contents/MacOS/WeChat > /tmp/wechat.txt 2>&1 &

为了更方便,将shell封装成App,每次使用只需运行一次这个App,它就会先设置好环境变量并启动官方微信,完美。

下载地址:WeChatAssistant.dmg

假设启动不了,试着重签一下WeChat Assistant.app,重签它不影响微信的自身签名。

codesign --force --deep --sign - /Applications/WeChat\ Assistant.app/

如果后期微信增加了其他类型检测,再见招拆招吧。总之,广阔天地,大有作为。

DualWechat-ForMac

如果不需要小助手的其他功能,日常也只是需要双开功能,那么直接使用官方微信无疑是更加安全的。这次就更简单了,一句话的代码:

nohup /Applications/WeChat.app/Contents/MacOS/WeChat > /tmp/wechat.txt 2>&1 &

下面是封装好的App,只要运行一下就可以双开官方微信了。 下载地址:DualWeChat.dmg

wechatassistant-formac's People

Contributors

levie-vans 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  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  avatar  avatar  avatar

wechatassistant-formac's Issues

M1芯片机器无法启动小助手

首先感谢新思路!
然后在M1芯片上的机器是可以使用的么,还是我的方法有问题~
wechat.txt 内容如下:似乎是不支持arm

dyld[3916]: terminating because inserted dylib '/Applications/WeChat Assistant.app/Contents/Frameworks/AFNetworking.framework/AFNetworking' could not be loaded: tried: '/Applications/WeChat Assistant.app/Contents/Frameworks/AFNetworking.framework/AFNetworking' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/Library/Frameworks/AFNetworking.framework/AFNetworking' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Library/Frameworks/AFNetworking.framework/AFNetworking' (no such file)
dyld[3916]: tried: '/Applications/WeChat Assistant.app/Contents/Frameworks/AFNetworking.framework/AFNetworking' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/Library/Frameworks/AFNetworking.framework/AFNetworking' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Library/Frameworks/AFNetworking.framework/AFNetworking' (no such file)

关于 Assistant 的完整使用流程

请教老师,一方面在 md 中有说到要使用原版微信,不对其进行修改,但另一方面小助手本身安装完成后需要重签才能运行,如何改变第一点呢?

我有做过以下尝试:

  • 完整官方包+微信小助手安装后不重签 + Assistant 启动-- 这种方式下启动的微信并没有成功加载小助手;
  • 完整官方包+ Assistant 启动 -- 同样的也没有成功加载小助手;
  • 安装小助手后 + 重签+Assistant 启动 -- 能够重新加载小助手,但感觉没有规避老师 md 中第一点。

所以老师能详细说说安装方式吗?

请问如何手动执行这些步骤?

系统版本: macOS Big Sur 11.5.1 (20G80)
微信版本: 3.1.5 (18846) 使用 Homebrew 安装

具体步骤:

  1. 首先下载 WeChatExtension-ForMac, 将其中 Rely/Plugin/WeChatExtension/WeChatExtension.framework 和 Rely/Plugin/WeChatExtension/WeChatExtension.framework/WeChatExtension 分别重命名为 AFNetworking.framework 和 AFNetworking
  2. 在 Terminal 中执行 codesign --force --deep --sign - '/Users/Ninzero/Documents/WeChatExtension-ForMac/WeChatExtension/Rely/Plugin/WeChatExtension/AFNetworking.framework/AFNetworking'
  3. export DYLD_INSERT_LIBRARIES='/Users/Ninzero/Documents/WeChatExtension-ForMac/WeChatExtension/Rely/Plugin/WeChatExtension/AFNetworking.framework/AFNetworking'
  4. nohup /Applications/WeChat.app/Contents/MacOS/WeChat > /tmp/wechat.txt 2>&1 &

此时微信被打开, 但没有微信小助手, 以下为 /tmp/wechat.txt 内容

objc[27044]: Class AFHTTPSessionManager is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691008) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c491c8). One of the two will be used. Which one is undefined.
objc[27044]: Class AFNetworkReachabilityManager is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112690f68) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49268). One of the two will be used. Which one is undefined.
objc[27044]: Class AFSecurityPolicy is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112690fb8) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c492b8). One of the two will be used. Which one is undefined.
objc[27044]: Class AFQueryStringPair is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691148) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49308). One of the two will be used. Which one is undefined.
objc[27044]: Class AFHTTPRequestSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691198) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49358). One of the two will be used. Which one is undefined.
objc[27044]: Class AFStreamingMultipartFormData is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x1126911c0) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49380). One of the two will be used. Which one is undefined.
objc[27044]: Class AFMultipartBodyStream is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691210) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c493d0). One of the two will be used. Which one is undefined.
objc[27044]: Class AFHTTPBodyPart is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691238) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c493f8). One of the two will be used. Which one is undefined.
objc[27044]: Class AFJSONRequestSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x1126912d8) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49498). One of the two will be used. Which one is undefined.
objc[27044]: Class AFPropertyListRequestSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691328) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c494e8). One of the two will be used. Which one is undefined.
objc[27044]: Class AFHTTPResponseSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691378) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49538). One of the two will be used. Which one is undefined.
objc[27044]: Class AFJSONResponseSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x1126913c8) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49588). One of the two will be used. Which one is undefined.
objc[27044]: Class AFXMLParserResponseSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691418) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c495d8). One of the two will be used. Which one is undefined.
objc[27044]: Class AFXMLDocumentResponseSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691468) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49628). One of the two will be used. Which one is undefined.
objc[27044]: Class AFPropertyListResponseSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x1126914b8) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49678). One of the two will be used. Which one is undefined.
objc[27044]: Class AFImageResponseSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691508) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c496c8). One of the two will be used. Which one is undefined.
objc[27044]: Class AFCompoundResponseSerializer is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691558) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49718). One of the two will be used. Which one is undefined.
objc[27044]: Class AFURLSessionManagerTaskDelegate is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x112691058) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49768). One of the two will be used. Which one is undefined.
objc[27044]: Class _AFURLSessionTaskSwizzling is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x1126910d0) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c497e0). One of the two will be used. Which one is undefined.
objc[27044]: Class AFURLSessionManager is implemented in both /Applications/WeChat.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking (0x1126910f8) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c49808). One of the two will be used. Which one is undefined.
objc[27044]: Class MarsReachability is implemented in both /Applications/WeChat.app/Contents/Frameworks/matrixreport.framework/Versions/A/matrixreport (0x112813740) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x110c527b8). One of the two will be used. Which one is undefined.
2021-07-29 15:31:54.799 WeChat[27044:916847] Event: kMMLoginEventUseOneClickLogin, from state: stateStart to state: stateShowingOneClick
2021-07-29 15:31:58.125 WeChat[27044:916847] Event: kMMLoginEventOneClickRequestSent, from state: stateShowingOneClick to state: stateWaittingConfirm
2021-07-29 15:32:07.083 WeChat[27044:916847] Event: kMMLoginEventOneClickRequestConfirmed, from state: stateWaittingConfirm to state: stateLoggingIn
<CFData 0x7fb631a71850 [0x7fff80851b70]>{length = 6, capacity = 6, bytes = 0xa483e7855bed}
[SQLITERK_OK] Saved master info with 113 entries.
2021-07-29 15:32:07.679 WeChat[27044:916847] <MMSplitView: 0x7fb631e15030>: the delegate <MMMainViewController: 0x7fb631e12900> was sent -splitView:resizeSubviewsWithOldSize: and left the arranged view frames in an inconsistent state:
2021-07-29 15:32:07.679 WeChat[27044:916847] Split view bounds: {{0, 0}, {770, 638}}
2021-07-29 15:32:07.679 WeChat[27044:916847]     Arranged view frame: {{0, 0}, {269, 638}}
2021-07-29 15:32:07.679 WeChat[27044:916847]     Arranged view frame: {{270, 0}, {501, 638}}
2021-07-29 15:32:07.679 WeChat[27044:916847] The outer edges of the arranged view frames are supposed to line up with the split view's bounds' edges. NSSplitView is working around the problem, perhaps at the cost of more redrawing. (This message is only logged once per NSSplitView.)
<CFData 0x7fb62bc836b0 [0x7fff80851b70]>{length = 6, capacity = 6, bytes = 0xa483e7855bed}
[SQLITERK_OK] Saved master info with 131 entries.
[SQLITERK_OK] Saved master info with 87 entries.
[SQLITERK_OK] Saved master info with 125 entries.
2021-07-29 15:32:08.130 WeChat[27044:916847] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7fb632fde9b0>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
[SQLITERK_OK] Saved master info with 115 entries.
[SQLITERK_OK] Saved master info with 91 entries.
[SQLITERK_OK] Saved master info with 109 entries.
[SQLITERK_OK] Saved master info with 71 entries.
[SQLITERK_OK] Saved master info with 113 entries.
[SQLITERK_OK] Saved master info with 79 entries.
2021-07-29 15:33:14.865 WeChat[27044:916847] Alive 5
2021-07-29 15:34:54.880 WeChat[27044:916847] Alive 10

此外, Release 中的 WeChat Assistant.app 下载安装后显示安装包已损坏, 原因未知.

聊天记录执行命令后还是未空

安装了插件之后聊天记录丢失的问题,可以通过迁移聊天记录的方式来解决:

执行以下命令即可迁移聊天记录:

cp -R ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat ~/Library/Application\ Support/com.tencent.xinWeChat

同样的,假如是卸载操作,需要把聊天记录迁移回原版微信中,执行以下命令:

cp -R ~/Library/Application\ Support/com.tencent.xinWeChat ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencen

执行

cp -R ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat ~/Library/Application\ Support/com.tencent.xinWeChat

后,在目录下有对应文件,但是聊天记录还是不能正常显示

同账号多开环境下的资料迁移说明

发现似乎使用启动器的不少人不知道如何搬运同一个账号在不同沙盒的聊天记录。
所以发出来方便一下各位。
启动器因为破坏沙盒环境没法和官方版共用数据库,然后处于某些原因,路径是嵌套的。具体如下。

启动器方式:个人用户文件夹/资源库/Containers/微信/Data/Library/Containers/微信/Data/

搬家需要做的就是把这个Containers拉出来,和父级的Containers合并。
不确定过程中开启微信是否影响最终效果,建议关闭微信再操作。

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.