更新部分代码

更新部分代码
This commit is contained in:
DKJone 2019-01-23 13:29:44 +08:00
parent a9ec53a367
commit 30db0bfdf3
20 changed files with 1612 additions and 127 deletions

View File

@ -14,6 +14,7 @@
3.微信步数修改
4.小游戏作弊(剪刀石头布和掷骰子)
5.自动抢红包高级配置
安装后在微信设置中点击“微信小助手”
更多请查看下图:
![IMG_0223](./IMG_0223.jpg)

View File

@ -37,6 +37,18 @@
114CCC7B21F817D500A4646E /* fishhook.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC7A21F817D500A4646E /* fishhook.h */; };
114CCC7D21F817D500A4646E /* dkhelperDylib.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC7C21F817D500A4646E /* dkhelperDylib.h */; };
114CCC7F21F817D500A4646E /* dkhelperDylib.m in Sources */ = {isa = PBXBuildFile; fileRef = 114CCC7E21F817D500A4646E /* dkhelperDylib.m */; };
114CCC8B21F830C800A4646E /* MMUICommonUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC8A21F830C800A4646E /* MMUICommonUtil.h */; };
114CCC8F21F830D200A4646E /* WCUIAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC8C21F830D200A4646E /* WCUIAlertView.h */; };
114CCC9021F830D200A4646E /* WechatHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC8D21F830D200A4646E /* WechatHeaders.h */; };
114CCC9121F830D200A4646E /* UiUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC8E21F830D200A4646E /* UiUtil.h */; };
114CCC9421F831C200A4646E /* DKHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC9221F831C200A4646E /* DKHelper.h */; };
114CCC9521F831C200A4646E /* DKHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 114CCC9321F831C200A4646E /* DKHelper.m */; };
114CCC9821F831D400A4646E /* DKHelperConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC9621F831D400A4646E /* DKHelperConfig.h */; };
114CCC9921F831D400A4646E /* DKHelperConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 114CCC9721F831D400A4646E /* DKHelperConfig.m */; };
114CCC9C21F831EB00A4646E /* DKHelperSettingController.m in Sources */ = {isa = PBXBuildFile; fileRef = 114CCC9A21F831EA00A4646E /* DKHelperSettingController.m */; };
114CCC9D21F831EB00A4646E /* DKHelperSettingController.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC9B21F831EA00A4646E /* DKHelperSettingController.h */; };
114CCCA021F8323E00A4646E /* DKGroupFilterController.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CCC9E21F8323D00A4646E /* DKGroupFilterController.h */; };
114CCCA121F8323E00A4646E /* DKGroupFilterController.m in Sources */ = {isa = PBXBuildFile; fileRef = 114CCC9F21F8323D00A4646E /* DKGroupFilterController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -73,7 +85,7 @@
114CCC3D21F817D500A4646E /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
114CCC3F21F817D500A4646E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
114CCC4121F817D500A4646E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
114CCC4521F817D500A4646E /* dkhelperDylib.xm */ = {isa = PBXFileReference; lastKnownFileType = text; name = dkhelperDylib.xm; path = Logos/dkhelperDylib.xm; sourceTree = "<group>"; };
114CCC4521F817D500A4646E /* dkhelperDylib.xm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; name = dkhelperDylib.xm; path = Logos/dkhelperDylib.xm; sourceTree = "<group>"; };
114CCC4621F817D500A4646E /* dkhelperDylib.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = dkhelperDylib.mm; path = Logos/dkhelperDylib.mm; sourceTree = "<group>"; };
114CCC4921F817D500A4646E /* MDConfigManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MDConfigManager.h; path = Config/MDConfigManager.h; sourceTree = "<group>"; };
114CCC4B21F817D500A4646E /* MDConfigManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MDConfigManager.m; path = Config/MDConfigManager.m; sourceTree = "<group>"; };
@ -101,6 +113,18 @@
114CCC7A21F817D500A4646E /* fishhook.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = fishhook.h; path = fishhook/fishhook.h; sourceTree = "<group>"; };
114CCC7C21F817D500A4646E /* dkhelperDylib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dkhelperDylib.h; sourceTree = "<group>"; };
114CCC7E21F817D500A4646E /* dkhelperDylib.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = dkhelperDylib.m; sourceTree = "<group>"; };
114CCC8A21F830C800A4646E /* MMUICommonUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMUICommonUtil.h; sourceTree = "<group>"; };
114CCC8C21F830D200A4646E /* WCUIAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WCUIAlertView.h; sourceTree = "<group>"; };
114CCC8D21F830D200A4646E /* WechatHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WechatHeaders.h; sourceTree = "<group>"; };
114CCC8E21F830D200A4646E /* UiUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UiUtil.h; sourceTree = "<group>"; };
114CCC9221F831C200A4646E /* DKHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DKHelper.h; sourceTree = "<group>"; };
114CCC9321F831C200A4646E /* DKHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DKHelper.m; sourceTree = "<group>"; };
114CCC9621F831D400A4646E /* DKHelperConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DKHelperConfig.h; sourceTree = "<group>"; };
114CCC9721F831D400A4646E /* DKHelperConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DKHelperConfig.m; sourceTree = "<group>"; };
114CCC9A21F831EA00A4646E /* DKHelperSettingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DKHelperSettingController.m; sourceTree = "<group>"; };
114CCC9B21F831EA00A4646E /* DKHelperSettingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DKHelperSettingController.h; sourceTree = "<group>"; };
114CCC9E21F8323D00A4646E /* DKGroupFilterController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DKGroupFilterController.h; sourceTree = "<group>"; };
114CCC9F21F8323D00A4646E /* DKGroupFilterController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DKGroupFilterController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -192,8 +216,14 @@
114CCC4321F817D500A4646E /* dkhelperDylib */ = {
isa = PBXGroup;
children = (
114CCC8921F8307500A4646E /* wechatHeaders */,
114CCC8821F8306500A4646E /* MyUtils */,
114CCC7C21F817D500A4646E /* dkhelperDylib.h */,
114CCC7E21F817D500A4646E /* dkhelperDylib.m */,
114CCC9B21F831EA00A4646E /* DKHelperSettingController.h */,
114CCC9A21F831EA00A4646E /* DKHelperSettingController.m */,
114CCC9E21F8323D00A4646E /* DKGroupFilterController.h */,
114CCC9F21F8323D00A4646E /* DKGroupFilterController.m */,
114CCC4421F817D500A4646E /* Logos */,
114CCC4821F817D500A4646E /* Config */,
114CCC5521F817D500A4646E /* Trace */,
@ -280,6 +310,28 @@
name = fishhook;
sourceTree = "<group>";
};
114CCC8821F8306500A4646E /* MyUtils */ = {
isa = PBXGroup;
children = (
114CCC9621F831D400A4646E /* DKHelperConfig.h */,
114CCC9721F831D400A4646E /* DKHelperConfig.m */,
114CCC9221F831C200A4646E /* DKHelper.h */,
114CCC9321F831C200A4646E /* DKHelper.m */,
);
path = MyUtils;
sourceTree = "<group>";
};
114CCC8921F8307500A4646E /* wechatHeaders */ = {
isa = PBXGroup;
children = (
114CCC8E21F830D200A4646E /* UiUtil.h */,
114CCC8C21F830D200A4646E /* WCUIAlertView.h */,
114CCC8D21F830D200A4646E /* WechatHeaders.h */,
114CCC8A21F830C800A4646E /* MMUICommonUtil.h */,
);
path = wechatHeaders;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@ -290,10 +342,18 @@
114CCC7D21F817D500A4646E /* dkhelperDylib.h in Headers */,
114CCC4E21F817D500A4646E /* MDCycriptManager.h in Headers */,
114CCC5221F817D500A4646E /* MDMethodTrace.h in Headers */,
114CCC9821F831D400A4646E /* DKHelperConfig.h in Headers */,
114CCC8B21F830C800A4646E /* MMUICommonUtil.h in Headers */,
114CCCA021F8323E00A4646E /* DKGroupFilterController.h in Headers */,
114CCC9421F831C200A4646E /* DKHelper.h in Headers */,
114CCC9021F830D200A4646E /* WechatHeaders.h in Headers */,
114CCC9D21F831EB00A4646E /* DKHelperSettingController.h in Headers */,
114CCC8F21F830D200A4646E /* WCUIAlertView.h in Headers */,
114CCC7B21F817D500A4646E /* fishhook.h in Headers */,
114CCC6F21F817D500A4646E /* LLDBTools.h in Headers */,
114CCC4A21F817D500A4646E /* MDConfigManager.h in Headers */,
114CCC6921F817D500A4646E /* OCSelectorTrampolines.h in Headers */,
114CCC9121F830D200A4646E /* UiUtil.h in Headers */,
114CCC6521F817D500A4646E /* OCMethodTrace.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -457,15 +517,19 @@
114CCC5721F817D500A4646E /* a1a2-selectortramps-arm.s in Sources */,
114CCC5D21F817D500A4646E /* a1a2-selectortramps-x86_64.s in Sources */,
114CCC6721F817D500A4646E /* OCMethodTrace.m in Sources */,
114CCC9921F831D400A4646E /* DKHelperConfig.m in Sources */,
114CCC4C21F817D500A4646E /* MDConfigManager.m in Sources */,
114CCC9C21F831EB00A4646E /* DKHelperSettingController.m in Sources */,
114CCC7921F817D500A4646E /* fishhook.c in Sources */,
114CCC7621F817D500A4646E /* AntiAntiDebug.m in Sources */,
114CCC6B21F817D500A4646E /* OCSelectorTrampolines.mm in Sources */,
114CCC5B21F817D500A4646E /* a1a2-selectortramps-i386.s in Sources */,
114CCC6121F817D500A4646E /* a2a3-selectortramps-i386.s in Sources */,
114CCC5F21F817D500A4646E /* a2a3-selectortramps-arm.s in Sources */,
114CCCA121F8323E00A4646E /* DKGroupFilterController.m in Sources */,
114CCC7F21F817D500A4646E /* dkhelperDylib.m in Sources */,
114CCC4721F817D500A4646E /* dkhelperDylib.mm in Sources */,
114CCC9521F831C200A4646E /* DKHelper.m in Sources */,
114CCC7121F817D500A4646E /* LLDBTools.mm in Sources */,
114CCC6321F817D500A4646E /* a2a3-selectortramps-x86_64.s in Sources */,
114CCC5421F817D500A4646E /* MDMethodTrace.m in Sources */,

View File

@ -144,7 +144,7 @@
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.sinoroad.dkhelper</string>
<string>com.tencent.xin</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@ -0,0 +1,28 @@
//
// DKGroupFilterController.h
// testHookDylib
//
// Created by 朱德坤 on 2019/1/22.
// Copyright © 2019 DKJone. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "DKHelper.h"
NS_ASSUME_NONNULL_BEGIN
@protocol MultiSelectGroupsViewControllerDelegate <NSObject>
- (void)onMultiSelectGroupReturn:(NSArray *)arg1;
@optional
- (void)onMultiSelectGroupCancel;
@end
@interface DKGroupFilterController : UIViewController
- (instancetype)initWithBlackList:(NSArray *)blackList;
@property (nonatomic, assign) id<MultiSelectGroupsViewControllerDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,119 @@
//
// DKGroupFilterController.m
// testHookDylib
//
// Created by on 2019/1/22.
// Copyright © 2019 DKJone. All rights reserved.
//
#import "DKGroupFilterController.h"
#import <objc/objc-runtime.h>
#import "MMUICommonUtil.h"
@interface DKGroupFilterController ()<ContactSelectViewDelegate>{
MMUIViewController *helper;
}
@property (strong, nonatomic) ContactSelectView *selectView;
@property (strong, nonatomic) NSArray *blackList;
@end
@implementation DKGroupFilterController
- (instancetype)initWithBlackList:(NSArray *)blackList {
if (self = [super initWithNibName:nil bundle:nil]) {
_blackList = blackList;
helper = [[objc_getClass("MMUIViewController") alloc] init];
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [DKHelper backgroundColor];
[self initTitleArea];
[self initSelectView];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
MMServiceCenter *serviceCenter = [objc_getClass("MMServiceCenter") defaultCenter];
CContactMgr *contactMgr = [serviceCenter getService:objc_getClass("CContactMgr")];
for (NSString *contactName in self.blackList) {
CContact *contact = [contactMgr getContactByName:contactName];
[self.selectView addSelect:contact];
}
}
- (void)initTitleArea {
self.navigationItem.leftBarButtonItem = [objc_getClass("MMUICommonUtil") getBarButtonWithTitle:@"取消" target:self action:@selector(onCancel:) style:0];
self.navigationItem.rightBarButtonItem = [self rightBarButtonWithSelectCount:self.blackList.count];
self.title = @"黑名单";
[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName: [UIFont boldSystemFontOfSize:18.0]}];
}
- (UIBarButtonItem *)rightBarButtonWithSelectCount:(unsigned long)selectCount {
UIBarButtonItem *barButtonItem;
if (selectCount == 0) {
barButtonItem = [objc_getClass("MMUICommonUtil") getBarButtonWithTitle:@"确定" target:self action:@selector(onDone:) style:2];
} else {
NSString *title = [NSString stringWithFormat:@"确定(%lu)", selectCount];
barButtonItem = [objc_getClass("MMUICommonUtil") getBarButtonWithTitle:title target:self action:@selector(onDone:) style:4];
}
return barButtonItem;
}
- (void)onCancel:(UIBarButtonItem *)item {
if ([self.delegate respondsToSelector:@selector(onMultiSelectGroupCancel)]) {
[self.delegate onMultiSelectGroupCancel];
}
}
- (void)onDone:(UIBarButtonItem *)item {
if ([self.delegate respondsToSelector:@selector(onMultiSelectGroupReturn:)]) {
NSArray *blacklist = [[self.selectView.m_dicMultiSelect allKeys] copy];
[self.delegate onMultiSelectGroupReturn:blacklist];
}
}
- (void)initSelectView {
self.selectView = [[objc_getClass("ContactSelectView") alloc] initWithFrame:[DKHelper viewFrame] delegate:self];
self.selectView.m_uiGroupScene = 5;
self.selectView.m_bMultiSelect = YES;
[self.selectView initData:5];
self.selectView.m_bShowHistoryGroup = false;
self.selectView.m_bShowRadarCreateRoom = false;
[self.selectView initView];
[self.view addSubview:self.selectView];
}
#pragma mark - ContactSelectViewDelegate
- (void)onSelectContact:(CContact *)arg1 {
self.navigationItem.rightBarButtonItem = [self rightBarButtonWithSelectCount:[self getTotalSelectCount]];
}
- (unsigned long)getTotalSelectCount {
return (unsigned long)[self.selectView.m_dicMultiSelect count];
}
- (UIViewController *)getViewController{
return self;
}
//
- (MMUIViewController *) forwardingTargetForSelector:(SEL)aSelector {
if ([helper respondsToSelector:aSelector]) {
return helper;
}
return nil;
}
@end

View File

@ -0,0 +1,16 @@
//
// DKHelperSettingController.h
// testHookDylib
//
// Created by 朱德坤 on 2019/1/10.
// Copyright © 2019 DKJone. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DKHelperSettingController : UIViewController
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,262 @@
//
// DKHelperSettingController.m
// testHookDylib
//
// Created by on 2019/1/10.
// Copyright © 2019 DKJone. All rights reserved.
//
#import "DKHelperSettingController.h"
#import <objc/objc-runtime.h>
#import "DKHelper.h"
#import "DKGroupFilterController.h"
@interface DKHelperSettingController ()<MultiSelectGroupsViewControllerDelegate>{
WCTableViewManager * manager;
}
@end
@implementation DKHelperSettingController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"小助手设置";
CGRect tableFrame = [DKHelper viewFrame];
manager = [DKHelper tableManageWithViewFrame];
[manager addTableViewToSuperView:self.view];
manager.tableView.frame = tableFrame;
self.view.backgroundColor = [DKHelper backgroundColor];
[self reloadTableData];
self.navigationItem.leftBarButtonItem = [DKHelper leftNavigationItem];
}
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
if(DKHelperConfig.hasShowTips){return;}
[DKHelper showAlertWithTitle:@"重要提示" message:@"本软件完全免费,插件功能仅供学习,由本软件产生的任何利益纠纷须有使用者自行承担。在收到微信团队\"\"继续使用可能有封号风险,需使用者自行承担。如遇到提醒,请卸载本软件,更换官方微信客户端" btnTitle:@"我明白了" handler:^(UIButton *sender) {
DKHelperConfig.hasShowTips = true;
} btnTitle:@"有风险我不使用了" handler:^(UIButton *sender) {
exit(0);
}];
}
- (void)reloadTableData{
[manager clearAllSection];
//MARK:
WCTableViewSectionManager *redEnvelopSection = [DKHelper sectionManage];
redEnvelopSection.headerTitle = @"自动抢红包设置";
[manager addSection:redEnvelopSection];
WCTableViewCellManager *autoEnvelopCell = [DKHelper switchCellWithSel:@selector(autoEnvelopSwitchChange:) target:self title:@"自动抢红包" switchOn:[DKHelperConfig autoRedEnvelop]];
[redEnvelopSection addCell:autoEnvelopCell];
//MARK:
WCTableViewSectionManager *toBeNO1Section = [DKHelper sectionManage];
toBeNO1Section.headerTitle = @"装逼必备";
[manager addSection:toBeNO1Section];
//
WCTableViewCellManager *revokeInterceptCell = [DKHelper switchCellWithSel:@selector(revokeIntercept:) target:self title:@"消息防撤回" switchOn:[DKHelperConfig preventRevoke]];
[toBeNO1Section addCell:revokeInterceptCell];
//
WCTableViewCellManager *changeStepsCell = [DKHelper switchCellWithSel:@selector(changedSteps:) target:self title:@"修改微信步数" switchOn:[DKHelperConfig changeSteps]];
[toBeNO1Section addCell:changeStepsCell];
if ([DKHelperConfig changeSteps]){
NSString * steps = [NSString stringWithFormat:@"%ld",[DKHelperConfig changedSteps]];
WCTableViewCellManager *changedStepsCell = [DKHelper cellWithSel:@selector(showChangedStepInput) target:self title:@"\t步数:" rightValue: steps accessoryType:1];
[toBeNO1Section addCell:changedStepsCell];
}
//
WCTableViewCellManager *gamePlugCell = [DKHelper switchCellWithSel:@selector(gamePlugEnable:) target:self title:@"小游戏作弊" switchOn:[DKHelperConfig gamePlugEnable]];
[toBeNO1Section addCell:gamePlugCell];
//MARK:
WCTableViewSectionManager *supportAuthorSection = [DKHelper sectionManage];
supportAuthorSection.headerTitle = @"支持作者";
[manager addSection:supportAuthorSection];
WCTableViewNormalCellManager * payMeCell = [DKHelper cellWithSel:@selector(payForMe) target:self title:@"请作者喝杯咖啡"];
[supportAuthorSection addCell:payMeCell];
WCTableViewNormalCellManager *myBlogCell = [DKHelper cellWithSel:@selector(openBlog) target:self title:@"我的博客"];
[supportAuthorSection addCell:myBlogCell];
WCTableViewNormalCellManager *myGitHubCell = [DKHelper cellWithSel:@selector(openGitHub) target:self title:@"本项目GitHub" rightValue:@"请给个⭐️" accessoryType:1];
[supportAuthorSection addCell:myGitHubCell];
//MARK:
WCTableViewSectionManager *advancedSection = [DKHelper sectionManage];
advancedSection.headerTitle = @"高级功能";
[manager addSection:advancedSection];
//
WCTableViewCellManager *redEnvelopBackGroundCell = [DKHelper switchCellWithSel:@selector(autoEnveloBackGround:) target:self title:@"锁屏及后台抢红包" switchOn:[DKHelperConfig redEnvelopBackGround]];
[advancedSection addCell:redEnvelopBackGroundCell];
//
NSString *delay = @"不延迟";
if ([DKHelperConfig redEnvelopDelay] > 0){
delay = [NSString stringWithFormat:@"%ld毫秒",[DKHelperConfig redEnvelopDelay]];
}
WCTableViewCellManager *redEnvelopDelayCell = [DKHelper cellWithSel:@selector(redEnvelopDelay) target:self title:@"延迟抢红包" rightValue:delay accessoryType:1];
[advancedSection addCell:redEnvelopDelayCell];
//
NSString *textFilter = [DKHelperConfig redEnvelopTextFiter].length ? [DKHelperConfig redEnvelopTextFiter] : @"不过滤" ;
WCTableViewCellManager *redEnvelopTextFilterCell = [DKHelper cellWithSel:@selector(redEnvelopTextFilter) target:self title:@"关键词过滤" rightValue:textFilter accessoryType:1];
[advancedSection addCell:redEnvelopTextFilterCell];
//
NSString * groupFilter = [DKHelperConfig redEnvelopGroupFiter].count ? [NSString stringWithFormat:@"已过滤%ld个群",[DKHelperConfig redEnvelopGroupFiter].count] : @"不过滤";
WCTableViewCellManager *redEnvelopGroupFilterCell = [DKHelper cellWithSel:@selector(redEnvelopGroupFiter) target:self title:@"群聊过滤" rightValue:groupFilter accessoryType:1];
[advancedSection addCell:redEnvelopGroupFilterCell];
//
WCTableViewCellManager *redEnvelopCatchMeCell = [DKHelper switchCellWithSel:@selector(redEnvelopCatchMe:) target:self title:@"抢自己的红包" switchOn:[DKHelperConfig redEnvelopCatchMe]];
[advancedSection addCell:redEnvelopCatchMeCell];
//
WCTableViewCellManager *redEnvelopMultipleCatchCell = [DKHelper switchCellWithSel:@selector(redEnvelopMultipleCatch:) target:self title:@"防止同时抢多个红包" switchOn:[DKHelperConfig redEnvelopMultipleCatch]];
[advancedSection addCell:redEnvelopMultipleCatchCell];
[manager.tableView reloadData];
}
- (void)autoEnvelopSwitchChange:(UISwitch *)sender{
DKHelperConfig.autoRedEnvelop = sender.isOn;
}
- (void)revokeIntercept:(UISwitch *)sender{
DKHelperConfig.preventRevoke = sender.isOn;
}
- (void)changedSteps:(UISwitch *)sender{
DKHelperConfig.changeSteps = sender.isOn;
[self reloadTableData];
}
- (void)showChangedStepInput{
NSString * str = [NSString stringWithFormat:@"%ld",DKHelperConfig.changedSteps];
WCUIAlertView * alert = [[objc_getClass("WCUIAlertView") alloc] initWithTitle:@"输入步数" message:@"最好不要超过60000否则可能被封号"];
[alert addBtnTitle:@"确定" target:self sel:@selector(changeStepOK:)];
[alert showTextFieldWithMaxLen:5];
UITextField * filed = alert.getTextField;
filed.text = str;
[alert show];
}
-(void)changeStepOK:(MMTextFieldAlertController *)sender{
NSString * str = sender.getTextField.text;
DKHelperConfig.changedSteps = str.integerValue ;
[self reloadTableData];
}
-(void)gamePlugEnable:(UISwitch *)sender{
DKHelperConfig.gamePlugEnable = sender.isOn;
if (sender.isOn){
[DKHelper showAlertWithTitle:@"" message:@"小游戏作弊暂只支持掷骰子和剪刀石头布" btnTitle:@"知道了" handler:^(UIButton *sender) { }];
}
}
- (void)payForMe{
ScanQRCodeLogicController *logic = [[objc_getClass("ScanQRCodeLogicController") alloc] initWithViewController:self CodeType:31 needCameraScan:NO];
NewQRCodeScanner *sc = [[objc_getClass("NewQRCodeScanner") alloc] initWithDelegate:logic CodeType:31];
[sc notifyResult:@"wxp://f2f1L6sAArNEGn95uW57A7WPP1iO7r2vl2oU" type:@"QR_CODE" version:5 rawData:[@"wxp://f2f1L6sAArNEGn95uW57A7WPP1iO7r2vl2oU" dataUsingEncoding:4]];
}
- (void)openBlog{
NSURL *blogUrl = [NSURL URLWithString:@"https://dkjone.github.io"];
MMWebViewController *webViewController = [[objc_getClass("MMWebViewController") alloc] initWithURL:blogUrl presentModal:NO extraInfo:nil];
[self.navigationController PushViewController:webViewController animated:YES];
}
- (void)openGitHub{
NSURL *blogUrl = [NSURL URLWithString:@"https://github.com/DKWechatHelper/DKWechatHelper"];
MMWebViewController *webViewController = [[objc_getClass("MMWebViewController") alloc] initWithURL:blogUrl presentModal:NO extraInfo:nil];
[self.navigationController PushViewController:webViewController animated:YES];
}
-(void)autoEnveloBackGround:(UISwitch *)sender{
if (!sender.isOn){
DKHelperConfig.redEnvelopBackGround = false;
return;
}
__block UISwitch * s = sender;
[DKHelper showAlertWithTitle:@"重要提示" message:@"开启后台抢红包会使微信一直保持后台运行,消耗电池电量。您是否继续开启?" btnTitle:@"开启" handler:^(UIButton *sender) {
DKHelperConfig.redEnvelopBackGround = true;
} btnTitle:@"取消" handler:^(UIButton *sender) {
s.on = false;
}];
}
- (void)redEnvelopDelay{
NSString * str = [NSString stringWithFormat:@"%ld",DKHelperConfig.redEnvelopDelay];
WCUIAlertView * alert = [[objc_getClass("WCUIAlertView") alloc] initWithTitle:@"输入延迟时间(1秒=1000毫秒)" message:@""];
[alert addBtnTitle:@"确定" target:self sel:@selector(changeDelayOK:)];
[alert showTextFieldWithMaxLen:6];
UITextField * filed = alert.getTextField;
filed.placeholder = str;
if (DKHelperConfig.redEnvelopDelay) {
filed.text = str;
}
[alert show];
}
-(void)changeDelayOK:(MMTextFieldAlertController *)sender{
NSString * str = sender.getTextField.text;
DKHelperConfig.redEnvelopDelay = str.integerValue ;
[self reloadTableData];
}
- (void)redEnvelopTextFilter{
NSString *str = [DKHelperConfig redEnvelopTextFiter].length ? [DKHelperConfig redEnvelopTextFiter] : @"不过滤" ;
WCUIAlertView * alert = [[objc_getClass("WCUIAlertView") alloc] initWithTitle:@"输入关键词以英文逗号分隔(例:抢一罚五,罚款)" message:@""];
[alert addBtnTitle:@"确定" target:self sel:@selector(changeTextFilterOK:)];
[alert addBtnTitle:@"取消" target:self sel:nil];
[alert showTextFieldWithMaxLen:200];
UITextField * filed = alert.getTextField;
filed.placeholder = str;
if([DKHelperConfig redEnvelopTextFiter].length ){
filed.text = str;
}
[alert show];
}
-(void)changeTextFilterOK:(MMTextFieldAlertController *)sender{
NSString * str = sender.getTextField.text;
DKHelperConfig.redEnvelopTextFiter = str ;
[self reloadTableData];
}
-(void)redEnvelopGroupFiter{
DKGroupFilterController *contactsViewController = [[DKGroupFilterController alloc] initWithBlackList:DKHelperConfig.redEnvelopGroupFiter];
contactsViewController.delegate = self;
MMUINavigationController *navigationController = [[objc_getClass("MMUINavigationController") alloc] initWithRootViewController:contactsViewController];
[self presentViewController:navigationController animated:YES completion:nil];
}
-(void)redEnvelopCatchMe:(UISwitch *)sender{
DKHelperConfig.redEnvelopCatchMe = sender.isOn;
}
-(void)redEnvelopMultipleCatch:(UISwitch *)sender{
DKHelperConfig.redEnvelopMultipleCatch = sender.isOn;
}
#pragma mark - MultiSelectGroupsViewControllerDelegate
- (void)onMultiSelectGroupCancel {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)onMultiSelectGroupReturn:(NSArray *)arg1 {
DKHelperConfig.redEnvelopGroupFiter = arg1;
[self reloadTableData];
[self dismissViewControllerAnimated:YES completion:nil];
}
@end

View File

@ -1,6 +1,61 @@
#line 1 "/mycode/github/DKWechatHelper/dkhelper/dkhelperDylib/Logos/dkhelperDylib.xm"
#import <UIKit/UIKit.h>
#import "DKHelper.h"
#import "DKHelperSettingController.h"
// *** DO NOT EDIT THIS FILE! ***
// This file is generated by Logos processing using dkhelperDylib.xm during each build.
// Logos by Dustin Howett
// See http://iphonedevwiki.net/index.php/Logos
#include <substrate.h>
#if defined(__clang__)
#if __has_feature(objc_arc)
#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained
#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed))
#define _LOGOS_SELF_CONST const
#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained))
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
#else
#define _LOGOS_SELF_TYPE_NORMAL
#define _LOGOS_SELF_TYPE_INIT
#define _LOGOS_SELF_CONST
#define _LOGOS_RETURN_RETAINED
#endif
@class WCTableViewNormalCellManager; @class UIViewController; @class NewSettingViewController;
static void (*_logos_orig$_ungrouped$NewSettingViewController$reloadTableData)(_LOGOS_SELF_TYPE_NORMAL NewSettingViewController* _LOGOS_SELF_CONST, SEL); static void _logos_method$_ungrouped$NewSettingViewController$reloadTableData(_LOGOS_SELF_TYPE_NORMAL NewSettingViewController* _LOGOS_SELF_CONST, SEL); static void _logos_method$_ungrouped$NewSettingViewController$setting(_LOGOS_SELF_TYPE_NORMAL NewSettingViewController* _LOGOS_SELF_CONST, SEL); static void (*_logos_orig$_ungrouped$UIViewController$viewWillAppear$)(_LOGOS_SELF_TYPE_NORMAL UIViewController* _LOGOS_SELF_CONST, SEL, BOOL); static void _logos_method$_ungrouped$UIViewController$viewWillAppear$(_LOGOS_SELF_TYPE_NORMAL UIViewController* _LOGOS_SELF_CONST, SEL, BOOL);
static __inline__ __attribute__((always_inline)) __attribute__((unused)) Class _logos_static_class_lookup$WCTableViewNormalCellManager(void) { static Class _klass; if(!_klass) { _klass = objc_getClass("WCTableViewNormalCellManager"); } return _klass; }
#line 6 "/mycode/github/DKWechatHelper/dkhelper/dkhelperDylib/Logos/dkhelperDylib.xm"
static void _logos_method$_ungrouped$NewSettingViewController$reloadTableData(_LOGOS_SELF_TYPE_NORMAL NewSettingViewController* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd){
_logos_orig$_ungrouped$NewSettingViewController$reloadTableData(self, _cmd);
WCTableViewManager *tableViewMgr = MSHookIvar<id>(self, "m_tableViewMgr");
MMTableView *tableView = [tableViewMgr getTableView];
WCTableViewNormalCellManager *newCell = [_logos_static_class_lookup$WCTableViewNormalCellManager() normalCellForSel:@selector(setting) target:self title:@"微信小助手"];
[((WCTableViewSectionManager*)tableViewMgr.sections[0]) addCell: newCell];
[tableView reloadData];
}
static void _logos_method$_ungrouped$NewSettingViewController$setting(_LOGOS_SELF_TYPE_NORMAL NewSettingViewController* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) {
UIViewController *vc = [[DKHelperSettingController alloc] init];
[((UIViewController *)self).navigationController PushViewController:vc animated:true];
}
static void _logos_method$_ungrouped$UIViewController$viewWillAppear$(_LOGOS_SELF_TYPE_NORMAL UIViewController* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, BOOL animated){
_logos_orig$_ungrouped$UIViewController$viewWillAppear$(self, _cmd, animated);
NSLog(@"\n***********************************************\n\t%@ appear\n***********************************************\n",NSStringFromClass([(NSObject*)self class]));
}
static __attribute__((constructor)) void _logosLocalInit() {
{Class _logos_class$_ungrouped$NewSettingViewController = objc_getClass("NewSettingViewController"); MSHookMessageEx(_logos_class$_ungrouped$NewSettingViewController, @selector(reloadTableData), (IMP)&_logos_method$_ungrouped$NewSettingViewController$reloadTableData, (IMP*)&_logos_orig$_ungrouped$NewSettingViewController$reloadTableData);{ char _typeEncoding[1024]; unsigned int i = 0; _typeEncoding[i] = 'v'; i += 1; _typeEncoding[i] = '@'; i += 1; _typeEncoding[i] = ':'; i += 1; _typeEncoding[i] = '\0'; class_addMethod(_logos_class$_ungrouped$NewSettingViewController, @selector(setting), (IMP)&_logos_method$_ungrouped$NewSettingViewController$setting, _typeEncoding); }Class _logos_class$_ungrouped$UIViewController = objc_getClass("UIViewController"); MSHookMessageEx(_logos_class$_ungrouped$UIViewController, @selector(viewWillAppear:), (IMP)&_logos_method$_ungrouped$UIViewController$viewWillAppear$, (IMP*)&_logos_orig$_ungrouped$UIViewController$viewWillAppear$);} }
#line 33 "/mycode/github/DKWechatHelper/dkhelper/dkhelperDylib/Logos/dkhelperDylib.xm"

View File

@ -1,60 +1,32 @@
// See http://iphonedevwiki.net/index.php/Logos
#import <UIKit/UIKit.h>
#import "DKHelper.h"
#import "DKHelperSettingController.h"
@interface CustomViewController
@property (nonatomic, copy) NSString* newProperty;
+ (void)classMethod;
- (NSString*)getMyName;
- (void)newMethod:(NSString*) output;
@end
%hook CustomViewController
+ (void)classMethod
{
%log;
%orig;
%hook NewSettingViewController
- (void)reloadTableData{
%orig;
WCTableViewManager *tableViewMgr = MSHookIvar<id>(self, "m_tableViewMgr");
MMTableView *tableView = [tableViewMgr getTableView];
WCTableViewNormalCellManager *newCell = [%c(WCTableViewNormalCellManager) normalCellForSel:@selector(setting) target:self title:@"微信小助手"];
[((WCTableViewSectionManager*)tableViewMgr.sections[0]) addCell: newCell];
[tableView reloadData];
}
%new
-(void)newMethod:(NSString*) output{
NSLog(@"This is a new method : %@", output);
}
%new
- (id)newProperty {
return objc_getAssociatedObject(self, @selector(newProperty));
}
%new
- (void)setNewProperty:(id)value {
objc_setAssociatedObject(self, @selector(newProperty), value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (NSString*)getMyName
{
%log;
NSString* password = MSHookIvar<NSString*>(self,"_password");
NSLog(@"password:%@", password);
[%c(CustomViewController) classMethod];
[self newMethod:@"output"];
self.newProperty = @"newProperty";
NSLog(@"newProperty : %@", self.newProperty);
return %orig();
- (void)setting {
UIViewController *vc = [[DKHelperSettingController alloc] init];
[((UIViewController *)self).navigationController PushViewController:vc animated:true];
}
%end
%hook UIViewController
- (void)viewWillAppear:(BOOL)animated{
%orig;
NSLog(@"\n***********************************************\n\t%@ appear\n***********************************************\n",NSStringFromClass([(NSObject*)self class]));
}
%end

View File

@ -0,0 +1,94 @@
//
// DKHelper.h
// testHookDylib
//
// Created by 朱德坤 on 2019/1/21.
// Copyright © 2019 DKJone. All rights reserved.
//
#import <Foundation/Foundation.h>
//MARK: - wechat quick imports
#import "UiUtil.h"
#import "WechatHeaders.h"
#import <objc/objc-runtime.h>
#import "WCUIAlertView.h"
#import "DKHelperConfig.h"
#import <UIKit/UIKit.h>
//MARK: - quick objc finds
#define FUiUtil objc_getClass("UiUtil")
#define FMMUICommonUtil objc_getClass("MMUICommonUtil")
#define FWCTableViewCellManager objc_getClass("WCTableViewNormalCellManager")
typedef void(^BtnBlock)(UIButton *sender);
NS_ASSUME_NONNULL_BEGIN
@interface DKHelper : NSObject
+ (UIBarButtonItem *)leftNavigationItem;
+ (UINavigationController *)navigationContrioller;
+ (UIColor *)backgroundColor;
+ (CGRect)viewFrame;
+ (WCTableViewManager *)tableManageWithViewFrame;
+ (WCTableViewSectionManager *) sectionManage;
+ (WCTableViewNormalCellManager *)cellWithSel:(SEL)sel target:(id)target title:(NSString *)title;
+ (WCTableViewNormalCellManager *)cellWithSel:(SEL)sel target:(id)target title:(NSString *)title rightValue:(NSString *)rightValue accessoryType:(long long) acctype;
+ (WCTableViewNormalCellManager *)switchCellWithSel:(SEL)sel target:(id)target title:(NSString *)title switchOn:(BOOL)switchOn;
+ (WCUIAlertView *)showAlertWithTitle:(NSString *)title message:(NSString *)msg btnTitle:(NSString *)btnTitle handler:(BtnBlock)handler;
+ (WCUIAlertView *)showAlertWithTitle:(NSString *)title message:(NSString *)msg btnTitle:(NSString *)btn1 handler:(BtnBlock)handler1 btnTitle:(NSString *)btn2 handler:(BtnBlock)handler2;
@end
@interface WeChatRedEnvelopParam : NSObject
- (NSDictionary *)toParams;
@property (strong, nonatomic) NSString *msgType;
@property (strong, nonatomic) NSString *sendId;
@property (strong, nonatomic) NSString *channelId;
@property (strong, nonatomic) NSString *nickName;
@property (strong, nonatomic) NSString *headImg;
@property (strong, nonatomic) NSString *nativeUrl;
@property (strong, nonatomic) NSString *sessionUserName;
@property (strong, nonatomic) NSString *sign;
@property (strong, nonatomic) NSString *timingIdentifier;
@property (assign, nonatomic) BOOL isGroupSender;
@end
@interface WBRedEnvelopParamQueue : NSObject
+ (instancetype)sharedQueue;
- (void)enqueue:(WeChatRedEnvelopParam *)param;
- (WeChatRedEnvelopParam *)dequeue;
- (WeChatRedEnvelopParam *)peek;
- (BOOL)isEmpty;
@end
@class WeChatRedEnvelopParam;
@interface WBReceiveRedEnvelopOperation : NSOperation
- (instancetype)initWithRedEnvelopParam:(WeChatRedEnvelopParam *)param delay:(unsigned int)delaySeconds;
@end
@interface WBRedEnvelopTaskManager : NSObject
+ (instancetype)sharedManager;
- (void)addNormalTask:(WBReceiveRedEnvelopOperation *)task;
- (void)addSerialTask:(WBReceiveRedEnvelopOperation *)task;
- (BOOL)serialQueueIsEmpty;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,110 @@
//
// DKHelper.m
// testHookDylib
//
// Created by on 2019/1/21.
// Copyright © 2019 DKJone. All rights reserved.
//
#import "DKHelper.h"
@interface DKHelper(){
BtnBlock act1;
BtnBlock act2;
}
@end
@implementation DKHelper
+ (instancetype)shared {
static DKHelper *helper = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
helper = [[DKHelper alloc] init];
});
return helper;
}
+ (UINavigationController *)navigationContrioller{
UITabBarController * tabbarVC = (UITabBarController *)UIApplication.sharedApplication.keyWindow.rootViewController;
NSArray<UINavigationController *> *vcs = tabbarVC.childViewControllers;
return vcs[tabbarVC.selectedIndex];
}
+ (UIBarButtonItem *)leftNavigationItem{
UINavigationController * navc = [DKHelper navigationContrioller];
if (navc.viewControllers.count > 1){
return ((UIViewController *)navc.viewControllers[1]).navigationItem.leftBarButtonItem;
}
return nil;
}
+ (UIColor *)backgroundColor{
return [DKHelper tableManageWithViewFrame].tableView.backgroundColor;
}
+ (CGRect)viewFrame{
CGFloat width = [FUiUtil screenWidthCurOri];
CGFloat y = [FUiUtil navigationBarHeightCurOri] + [FUiUtil normalStatusBarHeight];
CGFloat height = [FUiUtil visibleHeight:[DKHelper navigationContrioller].viewControllers.firstObject] - y;
return CGRectMake(0, y, width, height);
}
+ (WCTableViewManager *)tableManageWithViewFrame{
CGRect tableFrame = [DKHelper viewFrame];
WCTableViewManager* manager = [[objc_getClass("WCTableViewManager") alloc] initWithFrame:tableFrame style:1];
manager.tableView.frame = tableFrame;
return manager;
}
+ (WCTableViewSectionManager *) sectionManage{
return [objc_getClass("WCTableViewSectionManager") defaultSection];
}
+ (WCTableViewNormalCellManager *)cellWithSel:(SEL)sel target:(id)target title:(NSString *)title{
return [objc_getClass("WCTableViewNormalCellManager") normalCellForSel:sel target:target title:title];
}
+ (WCTableViewNormalCellManager *)cellWithSel:(SEL)sel target:(id)target title:(NSString *)title rightValue:(NSString *)rightValue accessoryType:(long long) acctype{
return [objc_getClass("WCTableViewNormalCellManager") normalCellForSel:sel target:target title:title rightValue:rightValue accessoryType:acctype];
}
+ (WCTableViewNormalCellManager *)switchCellWithSel:(SEL)sel target:(id)target title:(NSString *)title switchOn:(BOOL)switchOn{
return [objc_getClass("WCTableViewNormalCellManager") switchCellForSel:sel target:target title:title on:switchOn];
}
+ (WCUIAlertView *)showAlertWithTitle:(NSString *)title message:(NSString *)msg btnTitle:(NSString *)btnTitle handler:(BtnBlock)handler{
WCUIAlertView * alert = [objc_getClass("WCUIAlertView") showAlertWithTitle:title message:msg btnTitle:btnTitle target:DKHelper.shared sel:@selector(action1:)];
DKHelper.shared->act1 = handler;
return alert;
}
+ (WCUIAlertView *)showAlertWithTitle:(NSString *)title message:(NSString *)msg btnTitle:(NSString *)btn1 handler:(BtnBlock)handler1 btnTitle:(NSString *)btn2 handler:(BtnBlock)handler2{
WCUIAlertView * alert = [objc_getClass("WCUIAlertView") showAlertWithTitle:title message:msg btnTitle:btn1 target:DKHelper.shared sel:@selector(action1:) btnTitle:btn2 target:DKHelper.shared sel:@selector(action2:)];
DKHelper.shared->act1 = handler1;
DKHelper.shared->act2 = handler2;
return alert;
}
- (void)action1:(id)sender{
NSArray<UIButton *> *array = [sender valueForKey:@"btnArray"];
act1(array[0]);
}
- (void)action2:(id)sender{
NSArray<UIButton *> *array = [sender valueForKey:@"btnArray"];
act2(array[1]);
}
@end

View File

@ -0,0 +1,60 @@
//
// DKHelperConfig.h
// testHookDylib
//
// Created by 朱德坤 on 2019/1/22.
// Copyright © 2019 DKJone. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DKHelperConfig : NSObject
@property (nonatomic, strong) NSTimer *bgTaskTimer; //后台任务定时器
+ (instancetype)shared;
//程序进入后台处理
- (void)enterBackgroundHandler;
+(BOOL)autoRedEnvelop;
+(void)setAutoRedEnvelop:(BOOL)value;
+(BOOL)preventRevoke;
+(void)setPreventRevoke:(BOOL)value;
+(BOOL)changeSteps;
+(void)setChangeSteps:(BOOL)value;
+(NSInteger)changedSteps;
+(void)setChangedSteps:(NSInteger)value;
+(BOOL)gamePlugEnable;
+(void)setGamePlugEnable:(BOOL)value;
+(BOOL)redEnvelopBackGround;
+(void)setRedEnvelopBackGround:(BOOL)value;
+(NSInteger)redEnvelopDelay;
+(void)setRedEnvelopDelay:(NSInteger)value;
+(NSString *)redEnvelopTextFiter;
+(void)setRedEnvelopTextFiter:(NSString*)value;
+(NSArray *)redEnvelopGroupFiter;
+(void)setRedEnvelopGroupFiter:(NSArray *)value;
+(BOOL)redEnvelopCatchMe;
+(void)setRedEnvelopCatchMe:(BOOL)value;
+(BOOL)redEnvelopMultipleCatch;
+(void)setRedEnvelopMultipleCatch:(BOOL)value;
+(BOOL)hasShowTips;
+(void)setHasShowTips:(BOOL)value;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,199 @@
//
// DKHelperConfig.m
// testHookDylib
//
// Created by on 2019/1/22.
// Copyright © 2019 DKJone. All rights reserved.
//
#import "DKHelperConfig.h"
#import <AVFoundation/AVFoundation.h>
@interface DKHelperConfig()
@property (nonatomic, strong) AVAudioPlayer *blankPlayer; //
@property (nonatomic, assign) UIBackgroundTaskIdentifier bgTaskIdentifier; //
@end
@implementation DKHelperConfig
+ (instancetype)shared {
static DKHelperConfig *config = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
config = [[DKHelperConfig alloc] init];
});
return config;
}
NSString* cmdString(SEL sel){
NSString * str = NSStringFromSelector(sel);
if ([str hasPrefix:@"set"]){
NSString *fitstChar = [str substringWithRange:NSMakeRange(3, 1)].lowercaseString;
NSString *subStr = [str substringWithRange:NSMakeRange(4, str.length-5)];
str = [NSString stringWithFormat:@"%@%@",fitstChar,subStr];
}
return str;
}
+(BOOL)autoRedEnvelop{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setAutoRedEnvelop:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(BOOL)preventRevoke{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setPreventRevoke:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(BOOL)changeSteps{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setChangeSteps:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(NSInteger)changedSteps{
return [NSUserDefaults.standardUserDefaults integerForKey:cmdString(_cmd)];
}
+(void)setChangedSteps:(NSInteger)value{
[NSUserDefaults.standardUserDefaults setInteger:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(BOOL)gamePlugEnable{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setGamePlugEnable:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(BOOL)redEnvelopBackGround{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setRedEnvelopBackGround:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(NSInteger)redEnvelopDelay{
return [NSUserDefaults.standardUserDefaults integerForKey:cmdString(_cmd)];
}
+(void)setRedEnvelopDelay:(NSInteger)value{
[NSUserDefaults.standardUserDefaults setInteger:value forKey:cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(NSString *)redEnvelopTextFiter{
return [NSUserDefaults.standardUserDefaults stringForKey:cmdString(_cmd)];
}
+(void)setRedEnvelopTextFiter:(NSString*)value{
[NSUserDefaults.standardUserDefaults setObject:value forKey:cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(NSArray *)redEnvelopGroupFiter{
return [NSUserDefaults.standardUserDefaults arrayForKey:cmdString(_cmd)];
}
+(void)setRedEnvelopGroupFiter:(NSArray *)value{
[NSUserDefaults.standardUserDefaults setObject:value forKey:cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(BOOL)redEnvelopCatchMe{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setRedEnvelopCatchMe:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
}
+(BOOL)redEnvelopMultipleCatch{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setRedEnvelopMultipleCatch:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
cmdString(_cmd);
}
+(BOOL)hasShowTips{
return [NSUserDefaults.standardUserDefaults boolForKey:cmdString(_cmd)];
}
+(void)setHasShowTips:(BOOL)value{
[NSUserDefaults.standardUserDefaults setBool:value forKey: cmdString(_cmd)];
[NSUserDefaults.standardUserDefaults synchronize];
cmdString(_cmd);
}
- (void)setBgTaskTimer:(NSTimer *)bgTaskTimer{
_bgTaskTimer = bgTaskTimer;
}
//
- (void)enterBackgroundHandler{
if(!DKHelperConfig.redEnvelopBackGround){ return; }
UIApplication *app = [UIApplication sharedApplication];
self.bgTaskIdentifier = [app beginBackgroundTaskWithExpirationHandler:^{
[app endBackgroundTask:self.bgTaskIdentifier];
self.bgTaskIdentifier = UIBackgroundTaskInvalid;
}];
self.bgTaskTimer = [NSTimer scheduledTimerWithTimeInterval:10.0 target:self selector:@selector(requestMoreTime) userInfo:nil repeats:YES];
[self.bgTaskTimer fire];
}
- (void)requestMoreTime{
if ([UIApplication sharedApplication].backgroundTimeRemaining < 30) {
[self playBlankAudio];
[[UIApplication sharedApplication] endBackgroundTask:self.bgTaskIdentifier];
self.bgTaskIdentifier = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
[[UIApplication sharedApplication] endBackgroundTask:self.bgTaskIdentifier];
self.bgTaskIdentifier = UIBackgroundTaskInvalid;
}];
}
}
//
- (void)playBlankAudio{
[self playAudioForResource:@"blank" ofType:@"caf"];
}
//
- (void)playCashReceivedAudio{
[self playAudioForResource:@"cash_received" ofType:@"caf"];
}
//
- (void)playAudioForResource:(NSString *)resource ofType:(NSString *)ofType{
NSError *setCategoryErr = nil;
NSError *activationErr = nil;
[[AVAudioSession sharedInstance]
setCategory: AVAudioSessionCategoryPlayback
withOptions: AVAudioSessionCategoryOptionMixWithOthers
error: &setCategoryErr];
[[AVAudioSession sharedInstance]
setActive: YES
error: &activationErr];
NSURL *blankSoundURL = [[NSURL alloc]initWithString:[[NSBundle mainBundle] pathForResource:resource ofType:ofType]];
if(blankSoundURL){
self.blankPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:blankSoundURL error:nil];
[self.blankPlayer play];
}
}
@end

View File

@ -12,14 +12,4 @@
#define INSERT_SUCCESS_WELCOME " 🎉!!congratulations!!!🎉\n👍----------------insert dylib success----------------👍\n"
@interface CustomViewController
@property (nonatomic, copy) NSString* newProperty;
+ (void)classMethod;
- (NSString*)getMyName;
- (void)newMethod:(NSString*) output;
@end

View File

@ -1,5 +1,3 @@
// weibo: http://weibo.com/xiaoqing28
// blog: http://www.alonemonkey.com
//
// dkhelperDylib.m
// dkhelperDylib
@ -14,78 +12,140 @@
#import <Cycript/Cycript.h>
#import <MDCycriptManager.h>
CHConstructor{
printf(INSERT_SUCCESS_WELCOME);
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull note) {
#ifndef __OPTIMIZE__
CYListenServer(6666);
MDCycriptManager* manager = [MDCycriptManager sharedInstance];
[manager loadCycript:NO];
//MARK: -
NSError* error;
NSString* result = [manager evaluateCycript:@"UIApp" error:&error];
NSLog(@"result: %@", result);
if(error.code != 0){
NSLog(@"error: %@", error.localizedDescription);
}
#endif
}];
CHDeclareClass(ASIdentifierManager)
//广
CHMethod0(NSUUID *, ASIdentifierManager, advertisingIdentifier)
{
NSUUID *advertisingIdentifier;
NSString *key = @"idfa";
NSString *idfa = [[NSUserDefaults standardUserDefaults] stringForKey:key];
if (idfa && idfa.length)
{
advertisingIdentifier = [[NSUUID alloc] initWithUUIDString:idfa];
}
else
{
advertisingIdentifier = [NSUUID UUID];
[[NSUserDefaults standardUserDefaults] setObject:advertisingIdentifier.UUIDString forKey:key];
}
return advertisingIdentifier;
}
@class BaseAuthReqInfo, BaseRequest, ManualAuthAesReqData;
CHDeclareClass(CustomViewController)
CHDeclareClass(ManualAuthAesReqData);
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wstrict-prototypes"
//add new method
CHDeclareMethod1(void, CustomViewController, newMethod, NSString*, output){
NSLog(@"This is a new method : %@", output);
//bundleId ()
CHMethod1(void, ManualAuthAesReqData, setBundleId, NSString *, bundleId)
{
NSLog(@"======-获取请求时验证数据-========");
if ([bundleId isEqualToString:[NSBundle mainBundle].bundleIdentifier])
{
bundleId = @"com.tencent.xin";
}
CHSuper1(ManualAuthAesReqData, setBundleId, bundleId);
}
#pragma clang diagnostic pop
//clientSeqId
CHMethod1(void, ManualAuthAesReqData, setClientSeqId, NSString *, clientSeqId)
{
NSString *key = @"clientSeqId";
NSString *clientSeqId_fist = [[NSUserDefaults standardUserDefaults] stringForKey:key];
if (!clientSeqId_fist || clientSeqId_fist.length == 0)
{
clientSeqId_fist = [[NSUUID UUID].UUIDString stringByReplacingOccurrencesOfString:@"-" withString:@""];
[[NSUserDefaults standardUserDefaults] setObject:clientSeqId_fist forKey:key];
}
CHOptimizedClassMethod0(self, void, CustomViewController, classMethod){
NSLog(@"hook class method");
CHSuper0(CustomViewController, classMethod);
NSString *newClientSeqId;
if ([clientSeqId containsString:@"-"])
{
NSRange range = [clientSeqId rangeOfString:@"-"];
NSString *clientSeqId_last = [clientSeqId substringFromIndex:range.location];
newClientSeqId = [NSString stringWithFormat:@"%@%@", clientSeqId_fist, clientSeqId_last];
}
else
{
newClientSeqId = clientSeqId_fist;
}
CHSuper1(ManualAuthAesReqData, setClientSeqId, newClientSeqId);
}
CHOptimizedMethod0(self, NSString*, CustomViewController, getMyName){
//get origin value
NSString* originName = CHSuper(0, CustomViewController, getMyName);
NSLog(@"origin name is:%@",originName);
//get property
NSString* password = CHIvar(self,_password,__strong NSString*);
NSLog(@"password is %@",password);
[self newMethod:@"output"];
//set new property
self.newProperty = @"newProperty";
NSLog(@"newProperty : %@", self.newProperty);
//change the value
return @"朱德坤";
//deviceName
CHMethod1(void, ManualAuthAesReqData, setDeviceName, NSString *, deviceName)
{
//
deviceName = @"iPhone";
CHSuper1(ManualAuthAesReqData, setDeviceName, deviceName);
}
//add new property
CHPropertyRetainNonatomic(CustomViewController, NSString*, newProperty, setNewProperty);
//
@class MMCrashReportExtLogMgr;
CHConstructor{
CHLoadLateClass(CustomViewController);
CHClassHook0(CustomViewController, getMyName);
CHClassHook0(CustomViewController, classMethod);
CHHook0(CustomViewController, newProperty);
CHHook1(CustomViewController, setNewProperty);
CHDeclareClass(MMCrashReportExtLogMgr);
CHMethod2(void, MMCrashReportExtLogMgr, addLogInfo, int *, arg1, withMessage, const char *, arg2)
{
return;
}
//
@class JailBreakHelper;
CHDeclareClass(JailBreakHelper);
CHMethod0(BOOL, JailBreakHelper, HasInstallJailbreakPluginInvalidIAPPurchase)
{
return NO;
}
CHMethod1(BOOL, JailBreakHelper, HasInstallJailbreakPlugin, id, arg1)
{
return NO;
}
CHMethod0(BOOL, JailBreakHelper, IsJailBreak)
{
return NO;
}
//hook
CHConstructor
{
@autoreleasepool
{
CHLoadLateClass(ASIdentifierManager);
CHHook0(ASIdentifierManager, advertisingIdentifier);
CHLoadLateClass(ManualAuthAesReqData);
CHHook1(ManualAuthAesReqData, setBundleId);
CHHook1(ManualAuthAesReqData, setClientSeqId);
CHHook1(ManualAuthAesReqData, setDeviceName);
CHLoadLateClass(MMCrashReportExtLogMgr);
CHHook2(MMCrashReportExtLogMgr, addLogInfo, withMessage);
CHLoadLateClass(JailBreakHelper);
CHHook0(JailBreakHelper, HasInstallJailbreakPluginInvalidIAPPurchase);
CHHook1(JailBreakHelper, HasInstallJailbreakPlugin);
CHHook0(JailBreakHelper, IsJailBreak);
}
}

View File

@ -0,0 +1,24 @@
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <objc/NSObject.h>
@interface MMUICommonUtil : NSObject
{
}
+ (id)getBottomBarButtonWithTitle:(id)arg1 backgroundImageName:(id)arg2 widthMargin:(double)arg3 target:(id)arg4 action:(SEL)arg5;
+ (id)getBottomBarButtonWithTitle:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(unsigned long long)arg4;
+ (id)getBarButtonWithImage:(id)arg1 withHighlightedImage:(id)arg2 withDisabledImage:(id)arg3 withBackGroundImage:(id)arg4 withBackGroundImageHL:(id)arg5 withBackGroundImageDisable:(id)arg6 target:(id)arg7 action:(SEL)arg8 style:(unsigned long long)arg9 accessibilityStr:(id)arg10;
+ (id)getBarButtonWithImage:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(unsigned long long)arg4 accessibility:(id)arg5 color:(id)arg6;
+ (id)getBarButtonWithImageName:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(unsigned long long)arg4 accessibility:(id)arg5 color:(id)arg6;
+ (id)getBarButtonWithImageName:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(unsigned long long)arg4 accessibility:(id)arg5;
+ (id)getBarButtonWithTitle:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(unsigned long long)arg4 maxWidth:(double)arg5 color:(id)arg6;
+ (id)getBarButtonWithTitle:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(unsigned long long)arg4 color:(id)arg5;
+ (id)getBarButtonWithTitle:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(unsigned long long)arg4;
+ (void)setBottomBarButtonTitleColor:(id)arg1 withStyle:(unsigned long long)arg2;
@end

View File

@ -0,0 +1,60 @@
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <objc/NSObject.h>
@interface UiUtil : NSObject
{
}
+ (void)showCameraAlertForSplitViewIfNeed:(id)arg1 currentWidth:(double)arg2;
+ (_Bool)isiPadSplitViewModeNow;
+ (_Bool)isiPadSplitViewMinimizeModeNow;
+ (void)setStatusBarStyle:(long long)arg1 viewController:(id)arg2;
+ (void)setStatusBarStyle:(long long)arg1;
+ (void)setStatusBarFontBlack;
+ (void)setStatusBarFontWhite;
+ (_Bool)hasRoundCorner;
+ (double)bottomInset;
+ (double)tabBarContentHeight;
+ (double)tabBarHeight;
+ (double)topBarNormalOffset;
+ (_Bool)isTopBarInNormalState;
+ (double)keyboardHeightByNotification:(id)arg1;
+ (void)setTopBarHidden:(_Bool)arg1 withAnimation:(long long)arg2;
+ (void)setTopBarHidden:(_Bool)arg1;
+ (_Bool)isTopBarHidden;
+ (long long)getRotatedOrientation;
+ (void)setStatusBarHidden:(_Bool)arg1 withAnimation:(long long)arg2;
+ (void)setStatusBarHidden:(_Bool)arg1;
+ (_Bool)isStatusBarLandscape;
+ (_Bool)isStatusBarHidden;
+ (void)OnSystemStatusBarFrameChange;
+ (void)OnSystemStatusBarOrientationChange:(long long)arg1;
+ (id)mainWindow;
+ (double)visibleHeight:(id)arg1;
+ (struct CGRect)windowBoundsOri:(long long)arg1;
+ (struct CGRect)screenBoundsOri:(long long)arg1;
+ (struct CGRect)screenBounds;
+ (struct CGSize)screenSizeOri:(long long)arg1;
+ (struct CGSize)screenSize;
+ (double)mainScreenWidth;
+ (double)deviceScreenWidth:(long long)arg1;
+ (double)screenWidth:(long long)arg1;
+ (double)deviceScreenWidth;
+ (double)windowWidth;
+ (double)screenWidthCurOri;
+ (double)screenHeight:(long long)arg1;
+ (double)screenHeightCurOri;
+ (double)navigationBarHeight:(long long)arg1;
+ (double)navigationBarHeightCurOri;
+ (double)navigationBarHeight;
+ (double)statusBarHeight:(long long)arg1;
+ (double)statusBarHeight;
+ (double)normalStatusBarHeight;
@end

View File

@ -0,0 +1,47 @@
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <objc/NSObject.h>
@interface MMTextFieldAlertController : UIAlertController
- (UITextField *)getTextField;
- (void)setTextFieldWithMaxLen:(unsigned int)arg1;
@end
@interface WCUIAlertView : NSObject
{
MMTextFieldAlertController *_alertController;
}
+ (id)getTopVc;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 handler:(id)arg4 btnTitle:(id)arg5 handler:(id)arg6;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 handler:(id)arg4;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 btnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8 btnTitle:(id)arg9 target:(id)arg10 sel:(SEL)arg11 view:(id)arg12;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 view:(id)arg6;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 cancelBtnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 btnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8 view:(id)arg9;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 btnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8 view:(id)arg9;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 destructiveBtnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 cancelBtnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8 view:(id)arg9;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 btnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8 rightBtnStyle:(long long)arg9 view:(id)arg10;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 btnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8 btnTitle:(id)arg9 target:(id)arg10 sel:(SEL)arg11;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 btnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 btnTitle:(id)arg3;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2;
+ (id)showAlertWithTitle:(id)arg1 message:(id)arg2 cancelBtnTitle:(id)arg3 target:(id)arg4 sel:(SEL)arg5 btnTitle:(id)arg6 target:(id)arg7 sel:(SEL)arg8;
- (_Bool)isVisible;
- (void)dismissAnimated:(_Bool)arg1;
- (void)show;
- (void)addBtnTitle:(id)arg1 target:(id)arg2 sel:(SEL)arg3 btnStyle:(long long)arg4;
- (void)addCancelBtnTitle:(id)arg1 target:(id)arg2 sel:(SEL)arg3;
- (void)addBtnTitle:(id)arg1 target:(id)arg2 sel:(SEL)arg3;
- (id)getTextField;
- (void)showTextFieldWithMaxLen:(unsigned int)arg1;
- (id)initWithTitle:(id)arg1 message:(id)arg2;
- (void)dealloc;
@end

View File

@ -0,0 +1,324 @@
//
// WechatHeaders.h
// testHook
//
// Created by 朱德坤 on 2018/12/29.
// Copyright © 2018 DKJone. All rights reserved.
//
#ifndef WechatHeaders_h
#define WechatHeaders_h
#import <UIKit/UIKit.h>
@interface MMUIViewController : UIViewController
- (id)findMainTableView;
@end
@interface MMTabBarBaseViewController : MMUIViewController
@end
#pragma mark - MMTableView
@interface MMTableViewSectionInfo : NSObject
+ (id)sectionInfoDefaut;
+ (id)sectionInfoHeader:(id)arg1;
+ (id)sectionInfoHeader:(id)arg1 Footer:(id)arg2;
- (void)addCell:(id)arg1;
- (void)removeCellAt:(unsigned long long)arg1;
- (unsigned long long)getCellCount;
@end
@interface MMTableViewCellInfo
+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 accessoryType:(long long)arg4;
+ (id)switchCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 on:(BOOL)arg4;
+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 rightValue:(id)arg4 accessoryType:(long long)arg5;
+ (id)editorCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 margin:(double)arg4 tip:(id)arg5 focus:(_Bool)arg6 text:(id)arg7;
+ (id)normalCellForTitle:(id)arg1 rightValue:(id)arg2;
+ (id)urlCellForTitle:(id)arg1 url:(id)arg2;
@property(nonatomic) long long editStyle; // @synthesize editStyle=_editStyle;
@property(retain, nonatomic) id userInfo;
@end
@interface MMTableView: UITableView
@end
//MARK: - WCTableViewNormalCellManager
@class UIColor, UITableViewCell, WCTableViewCellBaseConfig;
@interface WCTableViewCellManager : NSObject
+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3;
+ (id)loadingCell;
+ (id)ActivityIndicatorCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3;
+ (id)detailDisclosureButtonCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3;
+ (id)switchCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 on:(_Bool)arg4;
@end
@interface WCTableViewNormalCellManager : WCTableViewCellManager
+ (WCTableViewNormalCellManager *)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 accessoryType:(long long)arg4;
+ (WCTableViewNormalCellManager *)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 rightValue:(id)arg4 accessoryType:(long long)arg5;
@end
@class NSMutableArray, NSString, UITableView, UIView;
@interface WCTableViewSectionManager : NSObject
@property(nonatomic) double fTopLineLeftInset; // @synthesize fTopLineLeftInset=_fTopLineLeftInset;
@property(nonatomic) double fFooterHeight; // @synthesize fFooterHeight=_fFooterHeight;
@property(nonatomic) double fHeaderHeight; // @synthesize fHeaderHeight=_fHeaderHeight;
@property(copy, nonatomic) NSString *footerTitle; // @synthesize footerTitle=_footerTitle;
@property(copy, nonatomic) NSString *headerTitle; // @synthesize headerTitle=_headerTitle;
+ (id)defaultSection;
+ (id)sectionInfoDefaut;
- (void)removeCellAt:(unsigned long long)arg1;
- (id)getCellAt:(unsigned long long)arg1;
- (unsigned long long)getCellCount;
- (void)insertCell:(id)arg1 At:(unsigned int)arg2;
- (void)didBeClickedAt:(id)arg1;
- (void)addCell:(id)arg1;
- (id)getFooterView;
- (id)getHeaderView;
@end
//MARK: - WCTableViewManager
@class MMTableView, NSMutableArray, NSString;
@protocol MMTableViewInfoDelegate;
@interface WCTableViewManager : NSObject <UITableViewDelegate, UITableViewDataSource >
@property(retain, nonatomic) NSMutableArray *sections;
@property(nonatomic) __weak id <MMTableViewInfoDelegate> delegate;
@property(retain, nonatomic) MMTableView *tableView;
- (id)cellInfoAtIndexPath:(id)arg1;
- (void)clearCell:(id)arg1;
- (void)reloadTableView;
- (void)clearAllSection;
- (void)removeCellAt:(id)arg1;
- (void)removeSectionAt:(unsigned long long)arg1;
- (WCTableViewSectionManager *)getSectionAt:(unsigned long long)arg1;
- (unsigned long long)getSectionCount;
- (void)insertSection:(id)arg1 At:(unsigned int)arg2;
- (void)addSection:(WCTableViewSectionManager *)arg1;
- (id)getTableView;
- (id)initWithFrame:(struct CGRect)arg1 style:(long long)arg2;
- (void)addTableViewToSuperView:(id)arg1;
@end
@interface MMTableViewInfo:WCTableViewManager
@end
@interface NewQRCodeScanner
- (void)notifyDelegate:(id)arg1 type:(id)arg2 version:(int)arg3 rawData:(id)arg4;
- (void)notifyResult:(id)arg1 type:(id)arg2 version:(int)arg3 rawData:(id)arg4;
- (id)initWithDelegate:(id)arg1 CodeType:(int)arg2;
@end
@interface ScanQRCodeLogicController
- (id)initWithViewController:(id)arg1 CodeType:(int)arg2 needCameraScan:(_Bool)arg3;
@end
@interface MMWebViewController: NSObject
- (id)initWithURL:(id)arg1 presentModal:(_Bool)arg2 extraInfo:(id)arg3;
@end
@interface UINavigationController (LogicController)
- (void)PushViewController:(id)arg1 animated:(_Bool)arg2;
@end
@interface ContactSelectView : UIView
@property(nonatomic) unsigned int m_uiGroupScene; // @synthesize m_uiGroupScene;
@property(nonatomic) _Bool m_bMultiSelect; // @synthesize m_bMultiSelect;
@property(nonatomic) _Bool m_bShowHistoryGroup;
@property(nonatomic) _Bool m_bShowRadarCreateRoom;
@property(retain, nonatomic) NSMutableDictionary *m_dicMultiSelect; // @synthesize m_dicMultiSelect;
- (id)initWithFrame:(struct CGRect)arg1 delegate:(id)arg2;
- (void)initData:(unsigned int)arg1;
- (void)initView;
- (void)addSelect:(id)arg1;
@end
@interface MMUINavigationController : UINavigationController
@end
@interface WCPayInfoItem: NSObject
@property(retain, nonatomic) NSString *m_c2cNativeUrl;
@end
@interface CContact: NSObject <NSCoding>
@property (nonatomic, copy) NSString *m_nsOwner; // 拥有者
@property (nonatomic, copy) NSString *m_nsNickName; // 用户昵称
@property (nonatomic, copy) NSString *m_nsUsrName; // 微信id
@property (nonatomic, copy) NSString *m_nsMemberName;
@property(retain, nonatomic) NSString *m_nsHeadImgUrl;
- (id)getContactDisplayName;
@end
@interface CContactMgr : NSObject
- (id)getSelfContact;
- (id)getContactByName:(id)arg1;
- (id)getContactForSearchByName:(id)arg1;
- (_Bool)getContactsFromServer:(id)arg1;
- (_Bool)isInContactList:(id)arg1;
- (_Bool)addLocalContact:(id)arg1 listType:(unsigned int)arg2;
@end
@protocol ContactSelectViewDelegate <NSObject>
- (void)onSelectContact:(CContact *)arg1;
@end
@interface MMServiceCenter : NSObject
+ (instancetype)defaultCenter;
- (id)getService:(Class)service;
@end
@interface CMessageWrap : NSObject
@property (retain, nonatomic) WCPayInfoItem *m_oWCPayInfoItem;
@property(nonatomic, assign) NSInteger m_uiGameType; // 1、猜拳; 2、骰子; 0、自定义表情
@property(nonatomic, assign) unsigned long m_uiGameContent;
@property(nonatomic, strong) NSString *m_nsEmoticonMD5;
@property(nonatomic) long long m_n64MesSvrID;
@property (nonatomic, copy) NSString *m_nsContent; // 内容
@property (nonatomic, copy) NSString *m_nsToUsr; // 接收的用户(微信id)
@property (nonatomic, copy) NSString *m_nsFromUsr; // 发送的用户(微信id)
@property (nonatomic, copy) NSString *m_nsLastDisplayContent;
@property (nonatomic, assign) unsigned int m_uiCreateTime; // 消息生成时间
@property (nonatomic, assign) unsigned int m_uiStatus; // 消息状态
@property (nonatomic, assign) int m_uiMessageType; // 消息类型
@property (nonatomic, copy) NSString *m_nsRealChatUsr;
@property (nonatomic, copy) NSString *m_nsPushContent;
- (id)initWithMsgType:(long long)arg1;
@end
@interface CBaseContact : NSObject
@property (nonatomic, copy) NSString *m_nsEncodeUserName; // 微信用户名转码
@property (nonatomic, assign) int m_uiFriendScene; // 是否是自己的好友(非订阅号、自己)
@property (nonatomic,assign) BOOL m_isPlugin; // 是否为微信插件
- (BOOL)isChatroom;
@end
@interface GameController : NSObject
+ (NSString*)getMD5ByGameContent:(NSInteger) content;
@end
@interface CMessageMgr : NSObject
- (id)GetMsg:(id)arg1 n64SvrID:(long long)arg2;
- (void)onRevokeMsg:(id)msg;
- (void)AddMsg:(id)arg1 MsgWrap:(id)arg2;
- (void)AddLocalMsg:(id)arg1 MsgWrap:(id)arg2 fixTime:(_Bool)arg3 NewMsgArriveNotify:(_Bool)arg4;
- (void)AsyncOnSpecialSession:(id)arg1 MsgList:(id)arg2;
- (id)GetHelloUsers:(id)arg1 Limit:(unsigned int)arg2 OnlyUnread:(BOOL)arg3;
- (void)AddEmoticonMsg:(NSString *)msg MsgWrap:(CMessageWrap *)msgWrap;
- (void)DelMsg:(id)arg1 MsgWrap:(id)arg2;
@end
@interface SettingUtil : NSObject
+ (id)getLocalUsrName:(unsigned int)arg1;
@end
@interface MMNewSessionMgr : NSObject
- (unsigned int)GenSendMsgTime;
@end
@interface WCBizUtil : NSObject
+ (id)dictionaryWithDecodedComponets:(id)arg1 separator:(id)arg2;
@end
@interface NSMutableDictionary (SafeInsert)
- (void)safeSetObject:(id)arg1 forKey:(id)arg2;
@end
@interface NSDictionary (NSDictionary_SafeJSON)
- (id)arrayForKey:(id)arg1;
- (id)dictionaryForKey:(id)arg1;
- (double)doubleForKey:(id)arg1;
- (float)floatForKey:(id)arg1;
- (long long)int64ForKey:(id)arg1;
- (long long)integerForKey:(id)arg1;
- (id)stringForKey:(id)arg1;
@end
@interface NSString (NSString_SBJSON)
- (id)JSONArray;
- (id)JSONDictionary;
- (id)JSONValue;
@end
@interface WCRedEnvelopesLogicMgr: NSObject
- (void)OpenRedEnvelopesRequest:(id)params;
- (void)ReceiverQueryRedEnvelopesRequest:(id)arg1;
- (void)GetHongbaoBusinessRequest:(id)arg1 CMDID:(unsigned int)arg2 OutputType:(unsigned int)arg3;
/** Added Methods */
- (unsigned int)calculateDelaySeconds;
@end
@interface SKBuiltinBuffer_t : NSObject
@property(retain, nonatomic) NSData *buffer; // @dynamic buffer;
@end
@interface HongBaoRes : NSObject
@property(retain, nonatomic) SKBuiltinBuffer_t *retText; // @dynamic retText;
@property(nonatomic) int cgiCmdid; // @dynamic cgiCmdid;
@end
@interface HongBaoReq : NSObject
@property(retain, nonatomic) SKBuiltinBuffer_t *reqText; // @dynamic reqText;
@end
#endif /* WechatHeaders_h */