diff --git a/Makefile b/Makefile index b8bd85f..7a9be2d 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ WECHATPATH=/Applications/WeChat.app/Contents/MacOS +DYLIBFILE=WeChatTweak.dylib build:: - clang -dynamiclib ./WeChatHook.m -fobjc-link-runtime -current_version 1.0 -compatibility_version 1.0 -o ./WeChatHook.dylib + clang -dynamiclib ./WeChatTweak.m -fobjc-link-runtime -current_version 1.0 -compatibility_version 1.0 -o ./${DYLIBFILE} debug:: make build - DYLD_INSERT_LIBRARIES=./WeChatHook.dylib ${WECHATPATH}/WeChat & + DYLD_INSERT_LIBRARIES=./${DYLIBFILE} ${WECHATPATH}/WeChat & install:: @if ! [[ $EUID -eq 0 ]]; then\ @@ -16,14 +17,14 @@ install:: echo "Can not find the WeChat.";\ exit 1;\ fi - @if ! [ -f "./WeChatHook.dylib" ]; then\ + @if ! [ -f "./${DYLIBFILE}" ]; then\ echo "Can not find the dylib file, please build first.";\ exit 1;\ fi @cp ${WECHATPATH}/WeChat ${WECHATPATH}/WeChat.bak; - @cp ./WeChatHook.dylib ${WECHATPATH}/WeChatHook.dylib; - @./insert_dylib @executable_path/WeChatHook.dylib ${WECHATPATH}/WeChat ${WECHATPATH}/WeChat --all-yes; + @cp ./${DYLIBFILE} ${WECHATPATH}/${DYLIBFILE}; + @./insert_dylib @executable_path/${DYLIBFILE} ${WECHATPATH}/WeChat ${WECHATPATH}/WeChat --all-yes; @echo "Install successed!"; uninstall:: @@ -40,9 +41,9 @@ uninstall:: exit 1;\ fi - @rm -rf ${WECHATPATH}/WeChatHook.dylib; + @rm -rf ${WECHATPATH}/${DYLIBFILE}; @mv ${WECHATPATH}/WeChat.bak ${WECHATPATH}/WeChat; @echo "Uninstall successed"; clean:: - rm -rf ./WeChatHook.dylib + rm -rf ./${DYLIBFILE} diff --git a/README-Chinese.md b/README-Chinese.md new file mode 100644 index 0000000..065e224 --- /dev/null +++ b/README-Chinese.md @@ -0,0 +1,35 @@ +# WeChatTweak-macOS + +[![README](https://img.shields.io/badge/README-English-blue.svg)](https://github.com/Sunnyyoung/WeChatTweak-macOS/blob/master/README.md) [![README](https://img.shields.io/badge/README-中文-blue.svg)](https://github.com/Sunnyyoung/WeChatTweak-macOS/blob/master/README-Chinese.md) + +微信macOS客户端消息撤回拦截动态库。 + +## 截图 + +![](https://raw.githubusercontent.com/Sunnyyoung/WeChatTweak-macOS/master/Screenshot/WeChatTweak-macOS.png) + +## 功能 + +- 阻止消息撤回 + +## 使用 + +- `sudo make install` 安装动态库 +- `sudo make uninstall` 卸载动态库 + +## 开发调试 + +**Requirement: Command Line Tools** + +运行命令:`xcode-select --install` 安装Command Line Tools。 + +- `make build` 编译dylib动态库到当前目录下 +- `make debug` 编译dylib动态库并临时注入微信macOS客户端 +- `make clean` 清除生成文件 + +## 依赖 + +- [insert_dylib](https://github.com/Tyilo/insert_dylib) + +## License +The [MIT License](LICENSE). diff --git a/README.md b/README.md index e061580..5b5b752 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ -# WeChatHook-macOS +# WeChatTweak-macOS -A dynamic library hook for WeChat macOS. +[![README](https://img.shields.io/badge/README-English-blue.svg)](https://github.com/Sunnyyoung/WeChatTweak-macOS/blob/master/README.md) [![README](https://img.shields.io/badge/README-中文-blue.svg)](https://github.com/Sunnyyoung/WeChatTweak-macOS/blob/master/README-Chinese.md) + +A dynamic library tweak for WeChat macOS. ## Screenshot -![](https://raw.githubusercontent.com/Sunnyyoung/WeChatHook-macOS/master/Screenshot/WeChatHook-macOS.png) +![](https://raw.githubusercontent.com/Sunnyyoung/WeChatTweak-macOS/master/Screenshot/WeChatTweak-macOS.png) ## Feature @@ -12,8 +14,8 @@ A dynamic library hook for WeChat macOS. ## Usage -- `sudo make install` Inject the dylib to `WeChat` by [insert_dylib](https://github.com/Tyilo/insert_dylib) -- `sudo make uninstall` Uninstall the injection. +- `sudo make install` Inject the dylib to `WeChat` by [insert_dylib](https://github.com/Tyilo/insert_dylib) +- `sudo make uninstall` Uninstall the injection ## Development @@ -21,9 +23,9 @@ A dynamic library hook for WeChat macOS. Run `xcode-select --install` to install Command Line Tools. -- `make build` Build the dylib file to the same dicrectory. -- `make debug` Build the dylib file and run `WeChat` with dynamic injection. -- `make clean` Clean output files. +- `make build` Build the dylib file to the same dicrectory +- `make debug` Build the dylib file and run `WeChat` with dynamic injection +- `make clean` Clean output files ## Dependency diff --git a/Screenshot/WeChatHook-macOS.png b/Screenshot/WeChatTweak-macOS.png similarity index 100% rename from Screenshot/WeChatHook-macOS.png rename to Screenshot/WeChatTweak-macOS.png diff --git a/WeChatHook.dylib b/WeChatTweak.dylib similarity index 98% rename from WeChatHook.dylib rename to WeChatTweak.dylib index b13baf6..34b1dcf 100755 Binary files a/WeChatHook.dylib and b/WeChatTweak.dylib differ diff --git a/WeChatHook.m b/WeChatTweak.m similarity index 100% rename from WeChatHook.m rename to WeChatTweak.m