Skip to content

Commit 9969f22

Browse files
author
okayliao
authored
Merge pull request #1 from TKkk-iOSer/master
update 2018-01-28
2 parents 15ef772 + d72c919 commit 9969f22

10 files changed

+115
-100
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ include $(THEOS)/makefiles/common.mk
99

1010
TWEAK_NAME = robot
1111
robot_FILES = $(wildcard src/*.m) src/Tweak.xm
12-
robot_CFLAGS = -fobjc-arc
13-
robot_OBJCFLAGS = -Wno-error
1412

1513
include $(THEOS_MAKE_PATH)/tweak.mk
1614

Others/robot.dylib

247 KB
Binary file not shown.

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,23 @@
22

33
微信小助手-iOS版 v1.0.0
44

5-
> 增加了游戏(石头剪刀布、骰子)作弊功能
6-
7-
使用 [zhPopupController](https://github.com/snail-z/zhPopupController) 来显示作弊内容,并使用 `zhPopupController` 的 Example 模板
8-
9-
<img src="./Others/ScreenShots/WeChatPlugin.jpg" width="500"> <img src="./Others/ScreenShots/Setting-cheat.jpg" width="500">
5+
<img src="./Others/ScreenShots/WeChatPlugin.jpg" width="500">
106

117
**mac OS 版请戳→_[WeChatPlugin-MacOS](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS)**
128

139
---
1410

1511
### 功能
12+
- [x] 游戏作弊(石头剪刀布、骰子)
1613
- [x] 修改微信运动步数
1714
- [x] 消息防撤回
1815
- [x] 自动通过好友请求
1916
- [x] 请求自动通过后发送欢迎语
20-
- [x] 消息自动回复
17+
- [x] 消息自动回复(完全匹配触发)
2118
- [x] 统一设置群公告
2219
- [x] 敏感词自动踢人
2320
- [x] 入群欢迎语
2421
- [x] 群消息自动回复
25-
- [x] 游戏作弊(石头剪刀布、骰子)
2622

2723
**统一设置群公告、敏感词自动踢人、入群欢迎语 仅对自己创建的群有效**
2824

@@ -32,14 +28,14 @@
3228

3329
设置界面:
3430

35-
<img src="./Others/ScreenShots/Setting-01.jpg" height="500" hspace="20" style="display: inline-block"> <img src="./Others/ScreenShots/Setting-02.jpg" height="500" hspace="20" style="display: inline-block">
31+
<img src="./Others/ScreenShots/Setting-03.png" height="500" hspace="20" style="display: inline-block"> <img src="./Others/ScreenShots/Setting-02.jpg" height="500" hspace="20" style="display: inline-block">
3632

3733

3834
---
3935

4036
### 安装
4137

42-
~~详细安装方法可参考[iOS 逆向 - 微信 helloWorld](http://www.jianshu.com/p/04495a429324)~~
38+
~~详细安装方法可参考[iOS 逆向 - 微信 helloWorld](http://www.tkkk.fun/2017/03/19/%E9%80%86%E5%90%91-%E5%BE%AE%E4%BF%A1helloWorld/)~~
4339

4440
#### 0. 准备
4541

@@ -57,8 +53,10 @@
5753
#### 2. 生成注入的app文件
5854

5955
* 可直接通过百度云下载
60-
链接: https://pan.baidu.com/s/1c120oww 密码: 95bx(微信版本为6.5.16)
61-
链接: https://pan.baidu.com/s/1bL1oei 密码: grbi (微信版本 6.5.17)
56+
57+
链接: https://pan.baidu.com/s/1o7UBqL8 密码: f71u (微信版本 6.6.0 新版自动回复失效)
58+
59+
链接: https://pan.baidu.com/s/1c120oww 密码: 95bx(微信版本为6.5.16 无作弊功能)
6260

6361
* 若想修改源码,生成新的dylib,可在修改之后执行`make`,之后拷贝生成的dylib(~~路径为`./theos/obj/debug/robot.dylib`~~),最后执行 `./Others/autoInsertDylib.sh ipa文件路径 dylib文件路径` 即可获得注入dylib的app文件。
6462

@@ -88,7 +86,7 @@
8886
* [insert_dylib](https://github.com/gengjf/insert_dylib)(~~已在./Others/~~)
8987
* [ios-app-signer](https://github.com/DanTheMan827/ios-app-signer) (~~文件太大,请自行下载编译~~)
9088
* [theos](https://github.com/theos/theos)
91-
89+
* [zhPopupController](https://github.com/snail-z/zhPopupController)
9290

9391
---
9492

@@ -100,4 +98,5 @@
10098

10199
#### 听说你想请我喝下午茶?😏
102100

103-
<img src="http://upload-images.jianshu.io/upload_images/965383-8e2af8fe607eee62.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1024" height="300" hspace="7" style="display: inline-block">
101+
<img src="http://upload-images.jianshu.io/upload_images/965383-cbc86dc1d75a6242.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" height="250" hspace="50"/>&nbsp;&nbsp;&nbsp;<img src="http://upload-images.jianshu.io/upload_images/965383-76a1c7c91b987e1a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" height="250" hspace="50" />
102+

src/TKChatRoomSensitiveViewController.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ @implementation TKChatRoomSensitiveViewController
2020

2121
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
2222
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
23-
_tableViewInfo = [[objc_getClass("MMTableViewInfo") alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStyleGrouped];
23+
// 增加对iPhone X的屏幕适配
24+
CGRect winSize = [UIScreen mainScreen].bounds;
25+
if (winSize.size.height == 812) {
26+
winSize.size.height -= 88;
27+
winSize.origin.y = 88;
28+
}
29+
_tableViewInfo = [[objc_getClass("MMTableViewInfo") alloc] initWithFrame:winSize style:UITableViewStyleGrouped];
2430
_tableViewInfo.delegate = self;
2531
}
2632
return self;

src/TKSettingViewController.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ @implementation TKSettingViewController
2222

2323
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
2424
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
25-
_tableViewInfo = [[objc_getClass("MMTableViewInfo") alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStyleGrouped];
25+
// 增加对iPhone X的屏幕适配
26+
CGRect winSize = [UIScreen mainScreen].bounds;
27+
if (winSize.size.height == 812) { // iPhone X 高为812
28+
winSize.size.height -= 88;
29+
winSize.origin.y = 88;
30+
}
31+
_tableViewInfo = [[objc_getClass("MMTableViewInfo") alloc] initWithFrame:winSize style:UITableViewStyleGrouped];
2632
}
2733
return self;
2834
}

src/WeChatRobot.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ typedef NS_ENUM(NSUInteger, TKArrayTpye) {
2626
TKArrayTpyeMsgUserName
2727
};
2828

29+
@class MMTableViewInfo;
30+
2931
#pragma mark - MODEL
3032

3133
@interface CMessageWrap : NSObject
32-
@property(nonatomic, assign) unsigned long m_uiGameType; // 1、猜拳; 2、骰子; 0、自定义表情
34+
@property(nonatomic, assign) NSInteger m_uiGameType; // 1、猜拳; 2、骰子; 0、自定义表情
3335
@property(nonatomic, assign) unsigned long m_uiGameContent;
3436
@property(nonatomic, strong) NSString *m_nsEmoticonMD5;
3537
@property(nonatomic) long long m_n64MesSvrID;
@@ -136,6 +138,7 @@ typedef NS_ENUM(NSUInteger, TKArrayTpye) {
136138
- (void)AddLocalMsg:(id)arg1 MsgWrap:(id)arg2 fixTime:(_Bool)arg3 NewMsgArriveNotify:(_Bool)arg4;
137139
- (void)AsyncOnSpecialSession:(id)arg1 MsgList:(id)arg2;
138140
- (id)GetHelloUsers:(id)arg1 Limit:(unsigned int)arg2 OnlyUnread:(BOOL)arg3;
141+
- (void)AddEmoticonMsg:(NSString *)msg MsgWrap:(CMessageWrap *)msgWrap;
139142
// new
140143
- (void)addAutoVerifyWithArray:(NSArray *)ary arrayType:(TKArrayTpye)type;
141144
- (void)addAutoVerifyWithMessageInfo:(NSDictionary *)info;
@@ -177,6 +180,8 @@ typedef NS_ENUM(NSUInteger, TKArrayTpye) {
177180
@end
178181

179182
@interface NewSettingViewController: MMUIViewController
183+
184+
@property(nonatomic, strong) MMTableViewInfo *m_tableViewInfo; //
180185
- (void)reloadTableData;
181186
@end
182187

@@ -265,4 +270,4 @@ typedef NS_ENUM(NSUInteger, TKArrayTpye) {
265270

266271
@interface GameController : NSObject
267272
+ (NSString*)getMD5ByGameContent:(NSInteger) content;
268-
@end
273+
@end

src/zhFullView.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ - (void)setModels:(NSArray<zhIconLabelModel *> *)models {
117117
}
118118
}
119119
}];
120-
120+
_models = models;
121121
[self startAnimationsCompletion:NULL];
122122
}
123123

124124
- (void)fullViewClicked:(UITapGestureRecognizer *)recognizer {
125-
__weak zhFullView *_self = self;
125+
zhFullView *_self = self;
126126
[self endAnimationsCompletion:^(zhFullView *fullView) {
127127
if (nil != self.didClickFullView) {
128128
_self.didClickFullView((zhFullView *)recognizer.view);
@@ -193,4 +193,3 @@ - (void)endAnimationsCompletion:(void (^)(zhFullView *))completion {
193193
}
194194

195195
@end
196-

src/zhIconLabel.m

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ - (instancetype)initWithFrame:(CGRect)frame {
1919
_iconView = [[UIImageView alloc] init];
2020
_iconView.userInteractionEnabled = YES;
2121
[self addSubview:_iconView];
22-
22+
2323
_textLabel = [[UILabel alloc] init];
2424
_textLabel.userInteractionEnabled = NO;
2525
_textLabel.numberOfLines = 0;
2626
_textLabel.textColor = [UIColor darkGrayColor];
2727
_textLabel.font = [UIFont systemFontOfSize:12];
2828
_textLabel.textAlignment = NSTextAlignmentCenter;
2929
[self addSubview:_textLabel];
30-
30+
3131
_horizontalLayout = NO;
3232
_autoresizingFlexibleSize = NO;
3333
}
@@ -36,30 +36,30 @@ - (instancetype)initWithFrame:(CGRect)frame {
3636

3737
/// 水平布局
3838
- (void)horizontalLayoutSubviews {
39-
39+
4040
CGFloat sideLength = self.frame.size.height - self.imageEdgeInsets.top - self.imageEdgeInsets.bottom;
4141
_iconView.frame = CGRectMake(self.imageEdgeInsets.left, self.imageEdgeInsets.top, sideLength, sideLength);
42-
42+
4343
if (_textLabel.text.length > 0) {
44-
44+
4545
CGFloat x = CGRectGetMaxX(_iconView.frame) + self.imageEdgeInsets.right;
4646
CGFloat h = self.frame.size.height;
4747
CGSize size = [_textLabel sizeThatFits:CGSizeMake(MAXFLOAT, h)];
4848
CGFloat y = (self.frame.size.height - size.height) / 2;
49-
49+
5050
if (_autoresizingFlexibleSize) {
5151
if (_sizeLimit > 0) { // 限宽
5252
if (size.width > _sizeLimit) size.width = _sizeLimit;
5353
}
5454
_textLabel.frame = CGRectMake(x, y, size.width, size.height);
55-
55+
5656
CGRect frame = self.frame;
5757
frame.size.width = _textLabel.frame.origin.x + _textLabel.frame.size.width;
5858
self.frame = frame;
5959
} else {
6060
_textLabel.frame = CGRectMake(x, y, size.width, size.height);
6161
}
62-
62+
6363
} else {
6464
if (_autoresizingFlexibleSize) {
6565
CGRect frame = self.frame;
@@ -73,29 +73,29 @@ - (void)horizontalLayoutSubviews {
7373
- (void)verticalLayoutSubviews {
7474
CGFloat sideLength = self.frame.size.width - self.imageEdgeInsets.left - self.imageEdgeInsets.right;
7575
_iconView.frame = CGRectMake(self.imageEdgeInsets.left, self.imageEdgeInsets.top, sideLength, sideLength);
76-
76+
7777
if (_textLabel.text.length > 0) {
78-
78+
7979
CGFloat y = CGRectGetMaxY(_iconView.frame) + self.imageEdgeInsets.bottom;
8080
CGFloat w = self.frame.size.width;
8181
CGFloat h = self.frame.size.height - y;
82-
82+
8383
if (!_autoresizingFlexibleSize) {
8484
_textLabel.frame = CGRectMake(0, y, w, h);
8585
} else {
86-
86+
8787
CGSize size = [_textLabel sizeThatFits:CGSizeMake(w, h)];
8888
CGFloat x = (self.frame.size.width - size.width) / 2;
8989
if (_sizeLimit > 0) { // 限高
9090
if (size.height > _sizeLimit) size.height = _sizeLimit;
9191
}
9292
_textLabel.frame = CGRectMake(x, y, size.width, size.height);
93-
93+
9494
CGRect frame = self.frame;
9595
frame.size.height = _textLabel.frame.origin.y + _textLabel.frame.size.height;
9696
self.frame = frame;
9797
}
98-
98+
9999
} else {
100100
if (_autoresizingFlexibleSize) {
101101
CGRect frame = self.frame;
@@ -108,6 +108,7 @@ - (void)verticalLayoutSubviews {
108108
- (void)setModel:(zhIconLabelModel *)model {
109109
_textLabel.text = model.text;
110110
_iconView.image = model.icon;
111+
_model = model;
111112
}
112113

113114
- (void)updateLayoutBySize:(CGSize)size finished:(void (^)(zhIconLabel *))finished {

src/zhPopupController.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef NS_ENUM(NSInteger, zhPopupSlideStyle) {
4242

4343
@interface zhPopupController : NSObject
4444

45-
@property (nonatomic, weak) id <zhPopupControllerDelegate> _Nullable delegate;
45+
@property (nonatomic, strong) id <zhPopupControllerDelegate> delegate;
4646

4747
/// Convenient to initialize and set maske type. (Through the `- init` initialization, maskType is zhPopupMaskTypeBlackTranslucent)
4848
+ (instancetype)popupControllerWithMaskType:(zhPopupMaskType)maskType;
@@ -63,7 +63,7 @@ typedef NS_ENUM(NSInteger, zhPopupSlideStyle) {
6363
@property (nonatomic, assign) CGFloat maskAlpha; // When set maskType is zhPopupMaskTypeBlackTranslucent vaild.
6464

6565
/// default is YES. if NO, Mask view will not respond to events.
66-
@property (nonatomic, assign) BOOL dismissOnMaskTouched;
66+
@property (nonatomic, assign) BOOL dismissOnMaskTouched;
6767

6868
/// default is NO. if YES, Popup view disappear from the opposite direction.
6969
@property (nonatomic, assign) BOOL dismissOppositeDirection; // When `layoutType = zhPopupLayoutTypeCenter` is vaild.

0 commit comments

Comments
 (0)