第一次提交

This commit is contained in:
张洋 2019-05-30 20:14:01 +08:00
parent c039dff1d7
commit 8788074d21
12 changed files with 215 additions and 0 deletions

42
Install.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
WeChat_path="/Applications/WeChat.app"
if [ ! -d "$WeChat_path" ]
then
WeChat_path="/Applications/微信.app"
if [ ! -d "$WeChat_path" ]
then
echo -e "应用程序文件夹中未发现微信"
exit
fi
fi
app_name="WeChat"
shell_path="$(dirname "$0")"
framework_name="WeChatIntercept"
app_bundle_path="${WeChat_path}/Contents/MacOS"
app_executable_path="${app_bundle_path}/${app_name}"
app_executable_backup_path="${app_executable_path}_backup"
framework_path="${shell_path}/${framework_name}.framework"
echo framework_path-----$framework_path
if [ ! -w "$WeChat_path" ]
then
echo -e "为了将ZY助手写入微信, 请输入密码 "
sudo chown -R $(whoami) "$WeChat_path"
fi
if [ ! -f "$app_executable_backup_path" ] || [ -n "$1" -a "$1" = "--force" ]
then
cp "$app_executable_path" "$app_executable_backup_path"
result="y"
else
read -t 150 -p "已安装ZY助手是否覆盖[y/n]:" result
fi
if [[ "$result" == 'y' ]]; then
cp -r $framework_path ${app_bundle_path}
${shell_path}/insert_dylib --all-yes "${framework_path}/${framework_name}" "$app_executable_backup_path" "$app_executable_path"
echo "安装成功!"
fi

38
Uninstall.sh Executable file
View File

@ -0,0 +1,38 @@
# !/bin/bash
WeChat_path="/Applications/WeChat.app"
if [ ! -d "$WeChat_path" ]
then
WeChat_path="/Applications/微信.app"
if [ ! -d "$WeChat_path" ]
then
echo -e "应用程序文件夹中未发现微信"
exit
fi
fi
app_name="WeChat"
framework_name="WeChatIntercept"
app_bundle_path="${WeChat_path}/Contents/MacOS"
app_executable_path="${app_bundle_path}/${app_name}"
app_executable_backup_path="${app_executable_path}_backup"
framework_path="${app_bundle_path}/${framework_name}.framework"
# 备份WeChat原始可执行文件
if [ -f "$app_executable_backup_path" ]
then
rm "$app_executable_path"
rm -rf "$framework_path"
mv "$app_executable_backup_path" "$app_executable_path"
if [ -f "$app_executable_backup_path" ]
then
echo "卸载失败,请到 /Applications/WeChat.app/Contents/MacOS 路径,删除 WeChatIntercept.framework、WeChat 两个文件文件,并将 WeChat_backup 重命名为 WeChat"
else
echo "卸载成功!"
fi
else
echo "未发现ZY助手"
fi

View File

@ -0,0 +1 @@
Versions/Current/Headers

View File

@ -0,0 +1 @@
Versions/Current/Modules

View File

@ -0,0 +1 @@
Versions/Current/Resources

View File

@ -0,0 +1,80 @@
//
// WeChatIntercept.h
// WeChatIntercept
//
// Created by 张洋 on 2019/5/30.
// Copyright © 2019 张洋. All rights reserved.
//
#import <Cocoa/Cocoa.h>
//! Project version number for WeChatIntercept.
FOUNDATION_EXPORT double WeChatInterceptVersionNumber;
//! Project version string for WeChatIntercept.
FOUNDATION_EXPORT const unsigned char WeChatInterceptVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <WeChatIntercept/PublicHeader.h>
@interface MessageData : NSObject
- (id)initWithMsgType:(long long)arg1;
@property(retain, nonatomic) NSString *fromUsrName;
@property(retain, nonatomic) NSString *toUsrName;
@property(retain, nonatomic) NSString *msgContent;
@property(retain, nonatomic) NSString *msgPushContent;
@property(nonatomic) int messageType;
@property(nonatomic) int msgStatus;
@property(nonatomic) int msgCreateTime;
@property(nonatomic) int mesLocalID;
@property(nonatomic) long long mesSvrID;
@property(retain, nonatomic) NSString *msgVoiceText;
@property(copy, nonatomic) NSString *m_nsEmoticonMD5;
- (BOOL)isChatRoomMessage;
- (NSString *)groupChatSenderDisplayName;
- (id)getRealMessageContent;
- (id)getChatRoomUsrName;
- (BOOL)isSendFromSelf;
- (BOOL)isCustomEmojiMsg;
- (BOOL)isImgMsg;
- (BOOL)isVideoMsg;
- (BOOL)isVoiceMsg;
- (BOOL)canForward;
- (BOOL)IsPlayingSound;
- (id)summaryString:(BOOL)arg1;
- (BOOL)isEmojiAppMsg;
- (BOOL)isAppBrandMsg;
- (BOOL)IsUnPlayed;
- (void)SetPlayed;
@property(retain, nonatomic) NSString *m_nsTitle;
- (id)originalImageFilePath;
@property(retain, nonatomic) NSString *m_nsVideoPath;
@property(retain, nonatomic) NSString *m_nsFilePath;
@property(retain, nonatomic) NSString *m_nsAppMediaUrl;
@property(nonatomic) MessageData *m_refMessageData;
@property(nonatomic) unsigned int m_uiDownloadStatus;
- (void)SetPlayingSoundStatus:(BOOL)arg1;
@end
@interface MessageService : NSObject
- (void)onRevokeMsg:(id)arg1;
- (void)FFToNameFavChatZZ:(id)arg1;
- (void)OnSyncBatchAddMsgs:(NSArray *)arg1 isFirstSync:(BOOL)arg2;
- (void)FFImgToOnFavInfoInfoVCZZ:(id)arg1 isFirstSync:(BOOL)arg2;
- (id)SendTextMessage:(id)arg1 toUsrName:(id)arg2 msgText:(id)arg3 atUserList:(id)arg4;
- (id)GetMsgData:(id)arg1 svrId:(long)arg2;
- (void)AddLocalMsg:(id)arg1 msgData:(id)arg2;
- (void)TranscribeVoiceMessage:(id)arg1 completion:(void (^)(void))arg2;
- (BOOL)ClearUnRead:(id)arg1 FromID:(unsigned int)arg2 ToID:(unsigned int)arg3;
- (BOOL)ClearUnRead:(id)arg1 FromCreateTime:(unsigned int)arg2 ToCreateTime:(unsigned int)arg3;
- (BOOL)hasMsgInChat:(id)arg1;
- (id)GetMsgListWithChatName:(id)arg1 fromLocalId:(unsigned int)arg2 limitCnt:(NSInteger)arg3 hasMore:(char *)arg4 sortAscend:(BOOL)arg5;
- (id)GetMsgListWithChatName:(id)arg1 fromCreateTime:(unsigned int)arg2 limitCnt:(NSInteger)arg3 hasMore:(char *)arg4 sortAscend:(BOOL)arg5;
@end
@interface MMServiceCenter : NSObject
+ (id)defaultCenter;
- (id)getService:(Class)arg1;
@end
@interface XMLDictionaryParser : NSObject
+ (id)sharedInstance;
- (id)dictionaryWithString:(id)arg1;
@end

View File

@ -0,0 +1,6 @@
framework module WeChatIntercept {
umbrella header "WeChatIntercept.h"
export *
module * { export * }
}

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18F132</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>WeChatIntercept</string>
<key>CFBundleIdentifier</key>
<string>offcn.WeChatIntercept</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>WeChatIntercept</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E1001</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<key>DTXcode</key>
<string>1021</string>
<key>DTXcodeBuild</key>
<string>10E1001</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 张洋. All rights reserved.</string>
</dict>
</plist>

Binary file not shown.

View File

@ -0,0 +1 @@
A

View File

@ -0,0 +1 @@
Versions/Current/WeChatIntercept

BIN
insert_dylib Executable file

Binary file not shown.