[
  {
    "path": ".gitignore",
    "content": "# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore\n\n!/.theos/*\npackages\nobj\n\n## Build generated\nbuild/\nDerivedData/\n\n## Various settings\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata/\n\n## Other\n*.moved-aside\n*.xccheckout\n*.xcscmblueprint\n\n## Obj-C/Swift specific\n*.hmap\n*.ipa\n*.dSYM.zip\n*.dSYM\n\n# CocoaPods\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\n# Pods/\n\n# Carthage\n#\n# Add this line if you want to avoid checking in source code from Carthage dependencies.\n# Carthage/Checkouts\n\nCarthage/Build\n\n# fastlane\n#\n# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the\n# screenshots whenever they are needed.\n# For more information about the recommended setup visit:\n# https://docs.fastlane.tools/best-practices/source-control/#source-control\n\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots/**/*.png\nfastlane/test_output\n\n# Code Injection\n#\n# After new code Injection tools there's a generated folder /iOSInjectionProject\n# https://github.com/johnno1962/injectionforxcode\n\niOSInjectionProject/\n"
  },
  {
    "path": ".theos/_/DEBIAN/control",
    "content": "Package: com.xia0.fkwechatzan\nName: fkwechatzan\nDepends: mobilesubstrate\nArchitecture: iphoneos-arm\nDescription: 微信集赞助手！集赞换礼品终结者~\nMaintainer: xia0\nAuthor: xia0\nSection: Tweaks\nVersion: 0.0.3-3+debug\nInstalled-Size: 244\n"
  },
  {
    "path": ".theos/_/Library/MobileSubstrate/DynamicLibraries/fkwechatzan.plist",
    "content": "{ Filter = { Bundles = ( \"com.tencent.xin\" ); }; }\n"
  },
  {
    "path": ".theos/build_session",
    "content": ""
  },
  {
    "path": ".theos/fakeroot",
    "content": ""
  },
  {
    "path": ".theos/last_package",
    "content": "./packages/com.xia0.fkwechatzan_0.0.3-3+debug_iphoneos-arm.deb\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019 xia0\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Makefile",
    "content": "GO_EASY_ON_ME = 1\nTHEOS_DEVICE_IP = localhost\nTHEOS_DEVICE_PORT = 2222\nARCHS = armv7 arm64\nTARGET = iphone:latest:7.0\n\ninclude $(THEOS)/makefiles/common.mk\n\nTWEAK_NAME = fkwechatzan\n$(TWEAK_NAME)_FILES = $(wildcard *.m) Morezan.xm Tweak.xm\n$(TWEAK_NAME)_CFLAGS = -Wno-implicit-function-declaration\ninclude $(THEOS_MAKE_PATH)/tweak.mk\n\nafter-install::\n\tinstall.exec \"killall -9 WeChat\"\n"
  },
  {
    "path": "Morezan.xm",
    "content": "\n@interface WCDataItem : NSObject\n\n@property (retain, nonatomic) NSMutableArray * likeUsers;\n\n@property  (nonatomic) int likeCount;\n\n@property (retain, nonatomic) NSString* username;\n\n@property (retain, nonatomic) NSMutableArray * commentUsers;\n\n@property  (nonatomic) int commentCount;\n\n@end\n\n@interface SettingUtil : NSObject\n\n+(NSString*) getCurUsrName;\n\n@end\n\n@interface MMServiceCenter : NSObject\n+ (instancetype)defaultCenter;\n- (id)getService:(Class)service;\n@end\n\n@interface CContactMgr : NSObject\n- (id)getSelfContact;\n- (id)getContactByName:(id)arg1;\n- (id)getContactList:(unsigned int)arg1 contactType:(unsigned int)arg2;\n- (id)getAllContactUserName;\n@end\n\n@interface WCUserComment : NSObject\n\n@property (retain, nonatomic) NSString * nickname;\n\n@property (retain, nonatomic) NSString* username;\n@property (retain, nonatomic) NSString* contentPattern;\n@property (retain, nonatomic) NSString* content;\n\n@property (retain, nonatomic) NSString* commentID;\n@property (retain, nonatomic) NSString* m_cpKeyForComment;//@\"wctlcm|33||z314250405||1563794344\"   @\"wctlcm|99|1|wxid_6913ohfkk7kq12|liuwenling001|1563794437\"\n\n@property (retain, nonatomic) NSString* refCommentID;\n@property (retain, nonatomic) NSString* refUserName;\n\n@property  (nonatomic) int type; //1 mean like 2 mean comment\n@property  (nonatomic) int isRichText; \n@property  (nonatomic) unsigned int createTime; \n\n@end\n\n@interface CBaseContact : NSObject\n@property (nonatomic, copy) NSString *m_nsEncodeUserName;                // 微信用户名转码\n@property (nonatomic, assign) int m_uiFriendScene;                       // 是否是自己的好友(非订阅号、自己)\n@property (nonatomic,assign) BOOL m_isPlugin;                            // 是否为微信插件\n\n@property (nonatomic,assign) unsigned int m_uiType; // 联系人类型  3：公众号  2：群聊  4：正常朋友 1:商家品牌\n\n- (BOOL)isChatroom;\n@end\n\n@interface CContact : CBaseContact\n@property (nonatomic, copy) NSString *m_nsOwner;                        // 拥有者\n@property (nonatomic, copy) NSString *m_nsNickName;                     // 用户昵称\n@property (nonatomic, copy) NSString *m_nsUsrName;                      // 微信id\n@property (nonatomic, copy) NSString *m_nsMemberName;\n@end\n\n@interface WCCommentDetailViewControllerFB : NSObject\n@property (nonatomic, copy) NSMutableArray *arrLikeList;       \n@property (nonatomic, copy) WCDataItem *dataItem; \n@end\n\n#define XLOG(log, ...)\tNSLog(@\"xia0:\" log, ##__VA_ARGS__)\n\nNSArray* getFriendList(){\n\t// if cache exsist, return it.\n\tNSArray* cache = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kFriendListCache\"];\n\tif (cache && [cache count] > 0)\n\t{\n\t\tXLOG(@\"getFriendList cache exsist: %d\", [cache count]);\n\t\treturn cache;\n\t}\n\n\tNSMutableArray* friendList = [NSMutableArray array];\n\tNSArray* allUserNameArr = [[[[%c(MMServiceCenter) defaultCenter] getService:[%c(CContactMgr) class]] getAllContactUserName] allObjects];\n\tfor(NSString* curUsreName in allUserNameArr){\n\t\tCContact* curAddContact = [[[%c(MMServiceCenter) defaultCenter] getService:[%c(CContactMgr) class]] getContactByName:curUsreName];\n\t\tif (curAddContact.m_uiType != 1 && curAddContact.m_uiType != 2 && curAddContact.m_uiType != 3)\n\t\t{\n\t\t\tBOOL isNotFriendZan = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kNotFriendZan\"];\n\n\t\t\tif (isNotFriendZan)\n\t\t\t{ \n\t\t\t\t[friendList addObject:curUsreName];\n\t\t\t}else{\n\t\t\t\tif (curAddContact.m_uiFriendScene != 0)\n\t\t\t\t{\n\t\t\t\t\t[friendList addObject:curUsreName];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t[[NSUserDefaults standardUserDefaults] setObject:friendList forKey:@\"kFriendListCache\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n\n\treturn friendList;\n} \n\n\nNSMutableArray* fkzan(NSMutableArray* origLikeUsers){\n\n\tBOOL isRandomPerOpen = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kRandomPerOpen\"];\n\tNSData *lastData = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kLastNewLikeUsers\"];\n\n\tNSArray *last = [NSKeyedUnarchiver unarchiveObjectWithData:lastData];\n\n\tNSMutableArray* lastMutableArray = [NSMutableArray arrayWithArray: last];\n\n\tif (!isRandomPerOpen && lastMutableArray)\n\t{ \n\t\treturn lastMutableArray;\n\t}\n\n\tNSMutableArray* newLikeUsers = [NSMutableArray array];\n\tNSArray* allUserNameArr = [[[[%c(MMServiceCenter) defaultCenter] getService:[%c(CContactMgr) class]] getAllContactUserName] allObjects];\n\t// uint32_t value = arc4random() % 20;\n\n\tBOOL isKeepOld = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kDatatKeepOld\"];\n\n\tif (isKeepOld)\n\t{\n\t\t// add orig like data\n\t\tif ([origLikeUsers count] > 0)\n\t\t{\n\t\t\tXLOG(\"fkzan keep old zan!\");\n\t\t\tfor(id likeItem in origLikeUsers){\n\t\t\t\t[newLikeUsers addObject:likeItem];\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\n\n\tNSInteger zanCount = [[NSUserDefaults standardUserDefaults] integerForKey:@\"kMoreZanID\"];\n\tif (!zanCount || zanCount == 0)\n\t{\n\t\treturn newLikeUsers;\n\t}\n\n\tNSArray* friendArr = getFriendList();\n\tNSMutableArray* choose = [NSMutableArray arrayWithArray:friendArr];\n\n\t// create new fake data: this add 10\n\tfor (int i = 0; i < zanCount; ++i)\n\t{\t\n\t\tif (!choose || [choose count] <= 0)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\n\t\tuint32_t idx = arc4random() % [choose count];\n\t\tNSString* curAddUserName = [choose objectAtIndex:idx];\n\t\tCContact* curAddContact = [[[%c(MMServiceCenter) defaultCenter] getService:[%c(CContactMgr) class]] getContactByName:curAddUserName];\n\n\n\t\tNSString* curAddNickName = [curAddContact m_nsNickName];\n\n\t\tWCUserComment* curAddUserComment = [[%c(WCUserComment) alloc] init];\n\t\tcurAddUserComment.username = curAddUserName;\n\t\tcurAddUserComment.nickname = curAddNickName;\n\t\tcurAddUserComment.type = 1;\n\t\tcurAddUserComment.isRichText = 1;\n\t\tNSTimeInterval interval=[[NSDate date] timeIntervalSince1970];\n\t\tNSInteger nowTime = interval;\n\t\tcurAddUserComment.createTime = nowTime;\n\n\t\t[newLikeUsers addObject:curAddUserComment];\n\t\t\n\n\t\tBOOL isFriendZanRepeat = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kFriendZanRepeat\"];\n\t\tif (!isFriendZanRepeat)\n\t\t{\n\t\t\t[choose removeObjectAtIndex:idx];\n\t\t}\n\t}\n\tNSData *data = [NSKeyedArchiver archivedDataWithRootObject: newLikeUsers]; \n\t[[NSUserDefaults standardUserDefaults] setObject:data forKey:@\"kLastNewLikeUsers\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n\treturn newLikeUsers;\n}\n\n\nNSMutableArray* fkCmt(NSMutableArray* origCommentUsers){\n\n\t\n\tBOOL isRandomPerOpen = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kRandomPerOpen\"];\n\tNSData* lastData = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kLastNewCommentUsers\"];\n\tNSArray *last = [NSKeyedUnarchiver unarchiveObjectWithData:lastData];\n\tNSMutableArray* lastMutableArray = [NSMutableArray arrayWithArray: last];\n\tif (!isRandomPerOpen && lastMutableArray)\n\t{ \n\t\treturn lastMutableArray;\n\t}\n\n\tNSMutableArray* newCommentUsers = [NSMutableArray array];\n\tNSArray* allUserNameArr = [[[[%c(MMServiceCenter) defaultCenter] getService:[%c(CContactMgr) class]] getAllContactUserName] allObjects];\n\t// uint32_t value = arc4random() % 20;\n\n\tBOOL isKeepOld = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kDatatKeepOld\"];\n\n\tif (isKeepOld)\n\t{\n\t\t// add orig like data\n\t\tif ([origCommentUsers count] > 0)\n\t\t{\n\t\t\tXLOG(\"fkCmt keep old cmt!\");\n\t\t\tfor(id cmtItem in origCommentUsers){\n\t\t\t\t[newCommentUsers addObject:cmtItem];\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\n\n\tNSInteger cmtCount = [[NSUserDefaults standardUserDefaults] integerForKey:@\"kMoreCmtID\"];\n    if (!cmtCount || cmtCount == 0)\n    {\n        return newCommentUsers;\n    }\n\n    NSArray* cmtContent = @[@\"高级\", @\"点赞就完事了\", @\"6666\", @\"赞~\", @\"这个不错\",@\"什么鬼东西= = \", @\"你说的就是这个？\" ,@\"牛皮\", @\"来了~~\", @\"cxk牛b\"];\n\n    BOOL isOpenMyCmt = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kMoreCmtOpenMyCmt\"];\n    if (isOpenMyCmt)\n    {\n    \tNSLog(@\"xia0:create my comment content.\");\n        NSString * myCmtContent = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kMoreCmtMyCmtContent\"];\n        cmtContent = [myCmtContent componentsSeparatedByString:@\"\\n\"];\n    }\n\n    NSLog(@\"xia0:start creat fake cmts\");\n\t// create new fake data: this add 10\n\tfor (int i = 0; i < cmtCount; ++i)\n\t{\t\n\t\t// NSLog(@\"xia0:debug 1\");\n\t\tNSArray* friendArr = getFriendList();\n\t\tuint32_t idx = arc4random() % [friendArr count];\n\t\tNSString* curAddUserName = [friendArr objectAtIndex:idx];\n\t\tCContact* curAddContact = [[[%c(MMServiceCenter) defaultCenter] getService:[%c(CContactMgr) class]] getContactByName:curAddUserName];\n\t\t\n\t\tNSString* curAddNickName = [curAddContact m_nsNickName];\n\t\t// NSLog(@\"xia0:debug 2\");\n\t\tWCUserComment* curAddUserComment = [[%c(WCUserComment) alloc] init];\n\t\tcurAddUserComment.username = curAddUserName;\n\t\tcurAddUserComment.nickname = curAddNickName;\n\t\tcurAddUserComment.type = 2;\n\t\tcurAddUserComment.commentID = [NSString stringWithFormat:@\"%d\", idx];\n\t\tNSTimeInterval interval=[[NSDate date] timeIntervalSince1970];\n\t\tNSInteger nowTime = interval;\n\t\tcurAddUserComment.createTime = nowTime;\n\n\t\tuint32_t cmtContentidx = arc4random() % [cmtContent count];\n\t\tNSString* curAddUserCmtContent = [cmtContent objectAtIndex:cmtContentidx];\n\t\tcurAddUserComment.content = curAddUserCmtContent;\n\t\t// curAddUserComment.contentPattern = @\"<parser><type>1</type><range>{0, 3}</range></parser>\";\n\t\t// curAddUserComment.m_cpKeyForComment = [NSString stringWithFormat:@\"wctlcm|1||%@||%ld\", curAddUserName, nowTime];\n\t\t// NSLog(@\"xia0:debug 3\");\n\t\t// NSLog(@\"xia0:%@ %@ %d %@ %@ %@ %@\", curAddUserName, curAddNickName,curAddUserComment.type, curAddUserComment.commentID, curAddUserComment.content,curAddUserComment.contentPattern,curAddUserComment.m_cpKeyForComment);\n\t\t[newCommentUsers addObject:curAddUserComment];\n\t}\n\tNSData *data = [NSKeyedArchiver archivedDataWithRootObject: newCommentUsers]; \n\t[[NSUserDefaults standardUserDefaults] setObject:data forKey:@\"kLastNewCommentUsers\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n\n\treturn newCommentUsers;\n}\n\n // -[MicroMessengerAppDelegate application:didFinishLaunchingWithOptions:]\n%hook MicroMessengerAppDelegate\n\n-(bool)application:(void *)arg2 didFinishLaunchingWithOptions:(void *)arg3 {\n\t// remove cache when reLaunch wechat for contact updating\n\t[[NSUserDefaults standardUserDefaults] removeObjectForKey:@\"kFriendListCache\"];\n\tgetFriendList();\n\treturn %orig;\n}\n\n%end\n\n\n// more zan in timeline detail\n%hook WCCommentDetailViewControllerFB\n\n-(void)setDataItem:(WCDataItem*)dataItem{\n\n\tBOOL isOpenFKZan = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kOpenFKZan\"];\n\tif (!isOpenFKZan)\n\t{\n\t\treturn %orig;\n\t}\n\n\tNSString* curUsreName = [dataItem username];\n\tNSString* myName = [%c(SettingUtil) getCurUsrName];\n\tif ([curUsreName isEqualToString:myName])\n\t{\n\t\tNSMutableArray* origLikeUsers = [dataItem likeUsers];\n\t\tNSMutableArray* origCommentUsers = [dataItem commentUsers];\n\n\t\tNSMutableArray* newLikeUsers = fkzan(origLikeUsers);\n\t\tNSMutableArray* newCommentUsers = fkCmt(origCommentUsers);\n\n\t\tdataItem.likeUsers = newLikeUsers;\n\t\tdataItem.likeCount = [newLikeUsers count];\n\t\tdataItem.commentUsers = newCommentUsers;\n\t\tdataItem.commentCount = [newCommentUsers count];\n\n\t}\n\n\treturn %orig;\n}\n\n%end\n\n\n// more zan in moment refresh\n%hook WCTimelineMgr\n\n- (void)onDataUpdated:(id)arg1 andData:(NSMutableArray*)data andAdData:(id)arg3 withChangedTime:(unsigned int)arg4{\n\n\tBOOL isOpenFKZan = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kOpenFKZan\"];\n\tif (!isOpenFKZan)\n\t{\n\t\treturn %orig;\n\t}\n\n\t// [[[MMServiceCenter defaultCenter] getService:[CContactMgr class]] getContactByName:[SettingUtil getCurUsrName]]\n\tfor (WCDataItem* item in data){\n\t\tNSString* curUsreName = [item username];\n\t\tint likeCount = [item likeCount];\n\t\tNSMutableArray* likeUsers = [item likeUsers];\n\t\tNSMutableArray* origCommentUsers = [item commentUsers];\n\n\t\tNSString* myName = [%c(SettingUtil) getCurUsrName];\n\n\t\tif ([curUsreName isEqualToString:myName])\n\t\t{\t\n\t\t\tXLOG(@\"WCTimelineMgr onDataUpdated: is my timeline. start fake\");\n\t\t\titem.likeUsers = fkzan(likeUsers);\n\t\t\titem.likeCount = [item.likeUsers count];\n\n\t\t\tNSMutableArray* newCommentUsers = fkCmt(origCommentUsers);\n\t\t\titem.commentUsers = newCommentUsers;\n\t\t\titem.commentCount = [newCommentUsers count];\n\t\t}\n\n\t}\t\n\treturn %orig;\n}\n%end"
  },
  {
    "path": "README.md",
    "content": "# fkwechatzan\n微信集赞、评论插件，随意设置点赞数量和评论。集赞换礼品终结杀手！\n\n### 免责申明\n\n- 本软件仅供个人学习与交流使用，严禁用于商业以及不良用途\n- 如有发现任何商业行为以及不良用途，软件(xia0)作者有权撤销使用权。\n- 本软件相关声明版权及其修改权、更新权和最终解释权均属软件(xia0)作者所有\n\n### Install\n\n- 如果你会iOS越狱开发的话，应该装有theos环境，那么直接运行build.sh脚本就可以了。\n- 如果你会安装deb插件包的话，package目录下有一个deb包。自己传到手机上手动安装也行。\n- 以上你都不熟悉的话，大老板源（BigBoss源）直接在cydia里面搜索fkwechatzan安装就行\n\n\n\n**Cydia/Sileo添加以下源获取最新的版本**\n\n[https://xia0z.github.io](https://xia0z.github.io)\n\n或BigBoss源搜索:fkwechatzan \n\n### 更新\n\n- 2019/08/17:修复了大量bug，全新v0.0.2版本，建议都升级到该版本。\n\n- 2019/08/25:全新v0.03版本，增加了更多的个性化积攒配置。\n\n  \n\n### Todo\n\n- 选择指定好友点赞评论\n- 评论时间随机化，目前就是1分钟。为了更加真实，点赞评论的时间在朋友圈的时间前随机\n- ...\n\n### Introduction\n\n此功能的分析：[**微信集赞/评论插件分析及开发**](http://4ch12dy.site/2019/07/22/fkwechatLike/fkwechatLike/)  \n\n\n\n### Screenshot\n\n- 集赞助手设置界面\n\n  <img src=\"https://github.com/4ch12dy/4ch12dy.github.io/blob/master/articlePic/fkwechatLike/1361564255775_.pic.jpg?raw=true\" width=\"400\" hegiht=\"200\" align=center />\n\n  \n\n- 朋友圈详情界面\n\n  <img src=\"https://github.com/4ch12dy/4ch12dy.github.io/blob/master/articlePic/fkwechatLike/1341564229215_.pic.jpg?raw=true\" width=\"400\" hegiht=\"200\" align=center />\n\n- 赞和评论\n\n<img src=\"https://github.com/4ch12dy/4ch12dy.github.io/blob/master/articlePic/fkwechatLike/1321564227655_.pic.jpg?raw=true\" width=\"400\" hegiht=\"200\" align=center />\n"
  },
  {
    "path": "Tweak.xm",
    "content": "#import \"xia0WeChat.h\"\n#import \"WBSettingViewController.h\"\n\n%hook NewSettingViewController\n\n- (void)reloadTableData {\n\t%orig;\n\n\tMMTableViewInfo *tableViewInfo = MSHookIvar<id>(self, \"m_tableViewMgr\");\n\n\tWCTableViewSectionManager *sectionInfo = [%c(WCTableViewSectionManager) defaultSection];\n\n\tWCTableViewCellManager *settingCell = [%c(WCTableViewCellManager) normalCellForSel:@selector(setting) target:self title:@\"积赞助手 V0.0.3\"];\n\t[sectionInfo addCell:settingCell];\n\n\t[tableViewInfo insertSection:sectionInfo At:0];\n\n\tMMTableView *tableView = [tableViewInfo getTableView];\n\t[tableView reloadData];\n}\n\n%new\n- (void)setting {\n\tWBSettingViewController *settingViewController = [WBSettingViewController new];\n\t[self.navigationController PushViewController:settingViewController animated:YES];\n}\n\n%end"
  },
  {
    "path": "WBBaseViewController.h",
    "content": "#import <UIKit/UIKit.h>\n\n@interface WBBaseViewController : UIViewController\n\n- (void)startLoadingBlocked;\n- (void)startLoadingNonBlock;\n- (void)startLoadingWithText:(NSString *)text;\n- (void)stopLoading;\n- (void)stopLoadingWithFailText:(NSString *)text;\n- (void)stopLoadingWithOKText:(NSString *)text;\n\n@end\n"
  },
  {
    "path": "WBBaseViewController.m",
    "content": "#import \"WBBaseViewController.h\"\n#import \"xia0WeChat.h\"\n#import <objc/objc-runtime.h>\n\n@interface WBBaseViewController ()\n\n@property (strong, nonatomic) MMLoadingView *loadingView;\n\n@end\n\n@implementation WBBaseViewController\n\n- (void)startLoadingBlocked {\n    if (!self.loadingView) {\n        self.loadingView = [self createDefaultLoadingView];\n        [self.view addSubview:self.loadingView];\n    } else {\n        [self.view bringSubviewToFront:self.loadingView];\n    }\n    [self.loadingView setM_bIgnoringInteractionEventsWhenLoading:YES];\n    [self.loadingView setFitFrame:1];\n    [self.loadingView startLoading];\n}\n\n- (void)startLoadingNonBlock {\n    if (!self.loadingView) {\n        self.loadingView = [self createDefaultLoadingView];\n        [self.view addSubview:self.loadingView];\n    } else {\n        [self.view bringSubviewToFront:self.loadingView];\n    }\n    [self.loadingView setM_bIgnoringInteractionEventsWhenLoading:NO];\n    [self.loadingView setFitFrame:1];\n    [self.loadingView startLoading];\n}\n\n- (void)startLoadingWithText:(NSString *)text {\n    [self startLoadingNonBlock];\n    \n    [self.loadingView.m_label setText:text];\n}\n\n- (MMLoadingView *)createDefaultLoadingView {\n    MMLoadingView *loadingView = [[objc_getClass(\"MMLoadingView\") alloc] init];\n    \n    MMServiceCenter *serviceCenter = [objc_getClass(\"MMServiceCenter\") defaultCenter];\n    MMLanguageMgr *languageMgr = [serviceCenter getService:objc_getClass(\"MMLanguageMgr\")];\n    NSString *loadingText = [languageMgr getStringForCurLanguage:@\"Common_DefaultLoadingText\"];\n    \n    [loadingView.m_label setText:loadingText];\n    \n    return loadingView;\n}\n\n- (void)stopLoading {\n    [self.loadingView stopLoading];\n}\n\n- (void)stopLoadingWithFailText:(NSString *)text {\n    [self.loadingView stopLoadingAndShowError:text];\n}\n\n- (void)stopLoadingWithOKText:(NSString *)text {\n    [self.loadingView stopLoadingAndShowOK:text];\n}\n\n@end\n"
  },
  {
    "path": "WBMultiSelectGroupsViewController.h",
    "content": "\n#import <UIKit/UIKit.h>\n\n@protocol MultiSelectGroupsViewControllerDelegate <NSObject>\n- (void)onMultiSelectGroupReturn:(NSArray *)arg1;\n\n@optional\n- (void)onMultiSelectGroupCancel;\n@end\n\n@interface WBMultiSelectGroupsViewController : UIViewController\n\n- (instancetype)initWithBlackList:(NSArray *)blackList;\n\n@property (nonatomic, assign) id<MultiSelectGroupsViewControllerDelegate> delegate;\n\n@end\n"
  },
  {
    "path": "WBMultiSelectGroupsViewController.m",
    "content": "#import \"WBMultiSelectGroupsViewController.h\"\n#import \"xia0WeChat.h\"\n#import <objc/objc-runtime.h>\n\n@interface WBMultiSelectGroupsViewController () <ContactSelectViewDelegate>\n\n@property (strong, nonatomic) ContactSelectView *selectView;\n@property (strong, nonatomic) NSArray *blackList;\n\n@end\n\n@implementation WBMultiSelectGroupsViewController\n\n- (instancetype)initWithBlackList:(NSArray *)blackList {\n    if (self = [super initWithNibName:nil bundle:nil]) {\n        _blackList = blackList;\n    }\n    return self;\n}\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    [self initTitleArea];\n    [self initSelectView];\n}\n\n- (void)viewWillAppear:(BOOL)animated {\n    [super viewWillAppear:animated];\n    \n    MMServiceCenter *serviceCenter = [objc_getClass(\"MMServiceCenter\") defaultCenter];\n    CContactMgr *contactMgr = [serviceCenter getService:objc_getClass(\"CContactMgr\")];\n    \n    for (NSString *contactName in self.blackList) {\n        CContact *contact = [contactMgr getContactByName:contactName];\n        [self.selectView addSelect:contact];\n    }\n}\n\n- (void)initTitleArea {\n    self.navigationItem.leftBarButtonItem = [objc_getClass(\"MMUICommonUtil\") getBarButtonWithTitle:@\"取消\" target:self action:@selector(onCancel:) style:0];\n    \n    self.navigationItem.rightBarButtonItem = [self rightBarButtonWithSelectCount:self.blackList.count];\n    \n    self.title = @\"黑名单\";\n    \n    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName: [UIFont boldSystemFontOfSize:18.0]}];\n}\n\n- (UIBarButtonItem *)rightBarButtonWithSelectCount:(unsigned long)selectCount {\n    \n    UIBarButtonItem *barButtonItem;\n    if (selectCount == 0) {\n        barButtonItem = [objc_getClass(\"MMUICommonUtil\") getBarButtonWithTitle:@\"确定\" target:self action:@selector(onDone:) style:2];\n    } else {\n        NSString *title = [NSString stringWithFormat:@\"确定(%lu)\", selectCount];\n        barButtonItem = [objc_getClass(\"MMUICommonUtil\") getBarButtonWithTitle:title target:self action:@selector(onDone:) style:4];\n    }\n    return barButtonItem;\n}\n\n- (void)onCancel:(UIBarButtonItem *)item {\n    if ([self.delegate respondsToSelector:@selector(onMultiSelectGroupCancel)]) {\n        [self.delegate onMultiSelectGroupCancel];\n    }\n}\n\n- (void)onDone:(UIBarButtonItem *)item {\n    if ([self.delegate respondsToSelector:@selector(onMultiSelectGroupReturn:)]) {\n        NSArray *blacklist = [[self.selectView.m_dicMultiSelect allKeys] copy];\n        [self.delegate onMultiSelectGroupReturn:blacklist];\n    }\n}\n\n- (void)initSelectView {\n    self.selectView = [[objc_getClass(\"ContactSelectView\") alloc] initWithFrame:[UIScreen mainScreen].bounds delegate:self];\n    \n    self.selectView.m_uiGroupScene = 5;\n    self.selectView.m_bMultiSelect = YES;\n    [self.selectView initData:5];\n    [self.selectView initView];\n    \n    [self.view addSubview:self.selectView];\n}\n\n#pragma mark - ContactSelectViewDelegate\n- (void)onSelectContact:(CContact *)arg1 {\n    self.navigationItem.rightBarButtonItem = [self rightBarButtonWithSelectCount:[self getTotalSelectCount]];\n}\n\n- (unsigned long)getTotalSelectCount {\n    return (unsigned long)[self.selectView.m_dicMultiSelect count];\n}\n\n@end\n"
  },
  {
    "path": "WBSettingViewController.h",
    "content": "#import \"WBBaseViewController.h\"\n\n@interface WBSettingViewController : WBBaseViewController\n\n@end\n"
  },
  {
    "path": "WBSettingViewController.m",
    "content": "#import \"xia0WeChat.h\"\n#import \"WBSettingViewController.h\"\n#import <objc/objc-runtime.h>\n#import \"WBMultiSelectGroupsViewController.h\"\n#import \"XEditViewController.h\"\n\n#define XLOG(log, ...)  NSLog(@\"xia0:\" log, ##__VA_ARGS__)\n\n@interface WBSettingViewController () <MultiSelectGroupsViewControllerDelegate>\n\n@property (nonatomic, strong) WCTableViewManager *tableViewInfo;\n\n@end\n\n@implementation WBSettingViewController\n\n- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {\n    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {\n        // 增加对iPhone X的屏幕适配\n        CGRect winSize = [UIScreen mainScreen].bounds;\n        if (winSize.size.height == 812) { // iPhone X 高为812\n            winSize.size.height -= 88;\n            winSize.origin.y = 88;\n        }\n        _tableViewInfo = [[objc_getClass(\"WCTableViewManager\") alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStyleGrouped];\n    }\n    return self;\n}\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    [self initTitle];\n    [self reloadTableData];\n    \n    self.edgesForExtendedLayout = UIRectEdgeNone;\n\n    MMTableView *tableView = [self.tableViewInfo getTableView];\n    [tableView setContentInset:UIEdgeInsetsMake(0,0,65,0)];\n    [self.view addSubview:tableView];\n}\n\n- (void)viewDidDisappear:(BOOL)animated {\n    [super viewDidDisappear:animated];\n    \n    [self stopLoading];\n}\n\n- (void)initTitle {\n    self.title = @\"积攒助手设置\";\n    \n    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName: [UIFont boldSystemFontOfSize:18.0]}];\n}\n\n- (void)reloadTableData {\n    [self.tableViewInfo clearAllSection];\n    \n    [self addZanSettingSection];\n    [self addSupportSection];\n    [self addAboutSection];\n    \n    MMTableView *tableView = [self.tableViewInfo getTableView];\n\n    [tableView reloadData];\n}\n\n#pragma mark - ZanSetting\n- (void)addZanSettingSection {\n    WCTableViewSectionManager *sectionInfo = [objc_getClass(\"WCTableViewSectionManager\") sectionInfoHeader:@\"集赞功能设置:建议先在朋友圈详情页面刷新数据再回到朋友圈查看，每次重新打开微信会更新朋友联系人数量。bug反馈、建议可以去github发起issue。获取最新的版本，可以添加作者源：https://xia0z.github.io\"];\n\n    [sectionInfo addCell:[self createOpenFKZanCell]];\n    BOOL isOpenFKZan = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kOpenFKZan\"];\n    if (isOpenFKZan)\n    {\n        [sectionInfo addCell:[self createFKZanCell]];\n        [sectionInfo addCell:[self createFKCmtCell]];\n\n        [sectionInfo addCell:[self createKeepOldSwitchCell]];\n        [sectionInfo addCell:[self createRandomPerOpenCell]];\n        [sectionInfo addCell:[self createNotFriendZanCell]];\n        [sectionInfo addCell:[self createFriendZanRepeatCell]];\n\n        [sectionInfo addCell:[self createMyCmtSwitchCell]];\n\n        BOOL isOpenMyCmt = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kMoreCmtOpenMyCmt\"];\n        if (isOpenMyCmt)\n        {\n            [sectionInfo addCell:[self createMyCmtContentCell]];\n        }\n    }\n\n    [self.tableViewInfo addSection:sectionInfo];\n}\n\n\n- (WCTableViewCellManager *)createOpenFKZanCell {\n\n    BOOL isOpenFKZan = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kOpenFKZan\"];\n\n    WCTableViewCellManager *cellInfo = [objc_getClass(\"WCTableViewCellManager\") switchCellForSel:@selector(settingOpenFKZanSwitch:) target:self title:@\"开启积攒插件功能\" on:isOpenFKZan];\n\n    return cellInfo;\n}\n\n\n- (WCTableViewCellManager *)createFKZanCell {\n    NSInteger zanCount = [[NSUserDefaults standardUserDefaults] integerForKey:@\"kMoreZanID\"];\n    if (!zanCount)\n    {\n        zanCount = 0;\n    }\n\n     return [objc_getClass(\"WCTableViewCellManager\") normalCellForSel:@selector(settingMoreZan) target:self title:@\"集攒数量设置\" rightValue:[@(zanCount) stringValue] WithDisclosureIndicator:0];\n}\n\n- (void)settingMoreZan{\n    int frienfCount = 0;\n    NSArray* friendArr = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kFriendListCache\"];\n    XLOG(@\"settingMoreZan frienfCount:%d\", [friendArr count]);\n    if (friendArr)\n    {\n        frienfCount = [friendArr count];\n    }\n\n    NSInteger zanCount = [[NSUserDefaults standardUserDefaults] integerForKey:@\"kMoreZanID\"];\n    [self alertControllerWithTitle:@\"积攒数量设置\"\n                           message:@\"设置需要的赞个数\\n数量最多为朋友总数量\"\n                           content:[NSString stringWithFormat:@\"%ld\", (long)zanCount]\n                       placeholder:[NSString stringWithFormat:@\"当前数量:%ld\", (long)zanCount]\n                      keyboardType:UIKeyboardTypeNumberPad\n                               blk:^(UITextField *textField) {\n                                   [[NSUserDefaults standardUserDefaults] setInteger:textField.text.integerValue forKey:@\"kMoreZanID\"];\n                                   [[NSUserDefaults standardUserDefaults] synchronize];\n                                   [self reloadTableData];\n                               }];\n}\n\n- (WCTableViewCellManager *)createFKCmtCell {\n    NSInteger cmtCount = [[NSUserDefaults standardUserDefaults] integerForKey:@\"kMoreCmtID\"];\n    if (!cmtCount)\n    {\n        cmtCount = 0;\n    }\n\n     return [objc_getClass(\"WCTableViewCellManager\") normalCellForSel:@selector(settingMoreCmt) target:self title:@\"评论数量设置\" rightValue:[@(cmtCount) stringValue] WithDisclosureIndicator:0];\n}\n\n- (void)settingMoreCmt{\n    int frienfCount = 0;\n    NSArray* friendArr = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kFriendListCache\"];\n    XLOG(@\"settingMoreCmt frienfCount:%d\", [friendArr count]);\n    if (friendArr)\n    {\n        frienfCount = [friendArr count];\n    }\n\n    NSInteger cmtCount = [[NSUserDefaults standardUserDefaults] integerForKey:@\"kMoreCmtID\"];\n    [self alertControllerWithTitle:@\"评论数量设置\"\n                           message:@\"设置需要的评论个数\\n数量最多为朋友总数量\"\n                           content:[NSString stringWithFormat:@\"%ld\", (long)cmtCount]\n                       placeholder:[NSString stringWithFormat:@\"当前数量:%ld\", (long)cmtCount]\n                      keyboardType:UIKeyboardTypeNumberPad\n                               blk:^(UITextField *textField) {\n                                   [[NSUserDefaults standardUserDefaults] setInteger:textField.text.integerValue forKey:@\"kMoreCmtID\"];\n                                   [[NSUserDefaults standardUserDefaults] synchronize];\n                                   [self reloadTableData];\n                               }];\n}\n\n- (WCTableViewCellManager *)createKeepOldSwitchCell {\n\n    BOOL isKeepOld = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kDatatKeepOld\"];\n\n    WCTableViewCellManager *cellInfo = [objc_getClass(\"WCTableViewCellManager\") switchCellForSel:@selector(settingKeepOldSwitch:) target:self title:@\"开启保留原始赞/评论\" on:isKeepOld];\n\n    return cellInfo;\n}\n\n- (WCTableViewCellManager *)createRandomPerOpenCell {\n\n    BOOL randomPerOpen = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kRandomPerOpen\"];\n\n    WCTableViewCellManager *cellInfo = [objc_getClass(\"WCTableViewCellManager\") switchCellForSel:@selector(settingRandomPerOpenSwitch:) target:self title:@\"开启每次赞/评论数据随机刷新\" on:randomPerOpen];\n\n    return cellInfo;\n}\n\n- (WCTableViewCellManager *)createNotFriendZanCell {\n\n    BOOL notFriendZan = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kNotFriendZan\"];\n\n    WCTableViewCellManager *cellInfo = [objc_getClass(\"WCTableViewCellManager\") switchCellForSel:@selector(settingNotFriendZanSwitch:) target:self title:@\"开启非好友点赞/评论\" on:notFriendZan];\n\n    return cellInfo;\n}\n\n- (WCTableViewCellManager *)createFriendZanRepeatCell {\n\n    BOOL friendZanRepeat = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kFriendZanRepeat\"];\n\n    WCTableViewCellManager *cellInfo = [objc_getClass(\"WCTableViewCellManager\") switchCellForSel:@selector(settingFriendZanRepeatSwitch:) target:self title:@\"开启点赞好友可以重复\" on:friendZanRepeat];\n\n    return cellInfo;\n}\n\n\n- (WCTableViewCellManager *)createMyCmtSwitchCell {\n\n    BOOL isOpenMyCmt = [[NSUserDefaults standardUserDefaults] boolForKey:@\"kMoreCmtOpenMyCmt\"];\n\n    WCTableViewCellManager *cellInfo = [objc_getClass(\"WCTableViewCellManager\") switchCellForSel:@selector(settingMyCmtSwitch:) target:self title:@\"开启自定义评论\" on:isOpenMyCmt];\n\n    return cellInfo;\n}\n\n- (WCTableViewCellManager *)createMyCmtContentCell {\n    NSString *myCmtContent = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kMoreCmtMyCmtContent\"];\n    myCmtContent = myCmtContent.length == 0 ? @\"请填写\" : myCmtContent;\n\n    WCTableViewCellManager *cellInfo = [objc_getClass(\"WCTableViewCellManager\") normalCellForSel:@selector(settingMyCmtContent) target:self title:@\"自定义评论内容\" rightValue:myCmtContent WithDisclosureIndicator:1];\n\n    return cellInfo;\n}\n\n- (void)settingOpenFKZanSwitch:(UISwitch *)arg {\n    [[NSUserDefaults standardUserDefaults] setBool:arg.on forKey:@\"kOpenFKZan\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n    [self reloadTableData];\n}\n\n- (void)settingKeepOldSwitch:(UISwitch *)arg {\n    [[NSUserDefaults standardUserDefaults] setBool:arg.on forKey:@\"kDatatKeepOld\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n    [self reloadTableData];\n}\n\n\n- (void)settingNotFriendZanSwitch:(UISwitch *)arg {\n    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@\"kFriendListCache\"];\n    [[NSUserDefaults standardUserDefaults] setBool:arg.on forKey:@\"kNotFriendZan\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n    [self reloadTableData];\n}\n\n- (void)settingRandomPerOpenSwitch:(UISwitch *)arg {\n    [[NSUserDefaults standardUserDefaults] setBool:arg.on forKey:@\"kRandomPerOpen\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n    [self reloadTableData];\n}\n\n- (void)settingFriendZanRepeatSwitch:(UISwitch *)arg {\n    [[NSUserDefaults standardUserDefaults] setBool:arg.on forKey:@\"kFriendZanRepeat\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n    [self reloadTableData];\n}\n\n- (void)settingMyCmtSwitch:(UISwitch *)arg {\n    [[NSUserDefaults standardUserDefaults] setBool:arg.on forKey:@\"kMoreCmtOpenMyCmt\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n    [self reloadTableData];\n}\n\n- (void)settingMyCmtContent {\n    XEditViewController *editVC = [[XEditViewController alloc] init];\n    editVC.text = [[NSUserDefaults standardUserDefaults] objectForKey:@\"kMoreCmtMyCmtContent\"];\n    [editVC setEndEditing:^(NSString *text) {\n        [[NSUserDefaults standardUserDefaults] setObject:text forKey:@\"kMoreCmtMyCmtContent\"];\n        [[NSUserDefaults standardUserDefaults] synchronize];\n        [self reloadTableData];\n    }];\n    editVC.title = @\"请输入自定义评论内容\";\n    editVC.placeholder = @\"开启时会从中随机生成(一行为一条评论)\";\n    [self.navigationController PushViewController:editVC animated:YES];\n}\n\n#pragma mark - About\n- (void)addAboutSection {\n    WCTableViewSectionManager *sectionInfo = [objc_getClass(\"WCTableViewSectionManager\") sectionInfoHeader:@\"关于我/项目\" Footer:@\"\\nDEVELOPED BY X1A0@2019\\n\\n\"];\n    \n    [sectionInfo addCell:[self createAboutmeCell]];\n    [sectionInfo addCell:[self createGithubCell]];\n    [sectionInfo addCell:[self createBlogCell]];\n    \n    [self.tableViewInfo addSection:sectionInfo];\n}\n\n- (WCTableViewCellManager *)createAboutmeCell {\n    return [objc_getClass(\"WCTableViewCellManager\") normalCellForSel:@selector(showAboutme) target:self title:@\"关于我\" rightValue: @\"xia0\" WithDisclosureIndicator:1];\n}\n\n- (WCTableViewCellManager *)createGithubCell {\n    return [objc_getClass(\"WCTableViewCellManager\") normalCellForSel:@selector(showGithub) target:self title:@\"项目Github\" rightValue: @\"🌟star\" WithDisclosureIndicator:1];\n}\n\n- (WCTableViewCellManager *)createBlogCell {\n    return [objc_getClass(\"WCTableViewCellManager\") normalCellForSel:@selector(showBlog) target:self title:@\"项目分析\"];\n}\n\n- (void)showAboutme {\n    NSURL *gitHubUrl = [NSURL URLWithString:@\"http://4ch12dy.site/aboutme/\"];\n    MMWebViewController *webViewController = [[objc_getClass(\"MMWebViewController\") alloc] initWithURL:gitHubUrl presentModal:NO extraInfo:nil];\n    [self.navigationController PushViewController:webViewController animated:YES];\n}\n\n- (void)showGithub {\n    NSURL *gitHubUrl = [NSURL URLWithString:@\"https://github.com/4ch12dy/fkwechatzan\"];\n    MMWebViewController *webViewController = [[objc_getClass(\"MMWebViewController\") alloc] initWithURL:gitHubUrl presentModal:NO extraInfo:nil];\n    [self.navigationController PushViewController:webViewController animated:YES];\n}\n\n- (void)showBlog {\n    NSURL *blogUrl = [NSURL URLWithString:@\"http://4ch12dy.site/2019/07/22/fkwechatLike/fkwechatLike/\"];\n    MMWebViewController *webViewController = [[objc_getClass(\"MMWebViewController\") alloc] initWithURL:blogUrl presentModal:NO extraInfo:nil];\n    [self.navigationController PushViewController:webViewController animated:YES];\n}\n\n#pragma mark - Support\n- (void)addSupportSection {\n    WCTableViewSectionManager *sectionInfo = [objc_getClass(\"WCTableViewSectionManager\") sectionInfoHeader:@\"若有帮助，可以打赏支持作者\"];\n    \n    [sectionInfo addCell:[self createWeChatPayingCell]];\n    \n    [self.tableViewInfo addSection:sectionInfo];\n}\n\n- (WCTableViewCellManager *)createWeChatPayingCell {\n    return [objc_getClass(\"WCTableViewCellManager\") normalCellForSel:@selector(payingToAuthor) target:self title:@\"微信打赏\" rightValue:@\"支持作者😈\" WithDisclosureIndicator:1];\n}\n\n- (void)payingToAuthor {\n    [self startLoadingNonBlock];\n    ScanQRCodeLogicController *scanQRCodeLogic = [[objc_getClass(\"ScanQRCodeLogicController\") alloc] initWithViewController:self CodeType:31];\n    scanQRCodeLogic.fromScene = 1;\n    \n    NewQRCodeScanner *qrCodeScanner = [[objc_getClass(\"NewQRCodeScanner\") alloc] initWithDelegate:scanQRCodeLogic CodeType:31];\n\n    NSString *rewardStr = @\"m0Ms67nN$+P*ZKLtExYpfe\";\n    NSData *rewardData = [rewardStr dataUsingEncoding:4];  \n    [qrCodeScanner notifyResult:rewardStr type:@\"WX_CODE\" version:0 rawData:rewardData];\n}\n\n#pragma mark - MultiSelectGroupsViewControllerDelegate\n- (void)onMultiSelectGroupCancel {\n    [self dismissViewControllerAnimated:YES completion:nil];\n}\n- (void)onMultiSelectGroupReturn:(NSArray *)arg1 {\n    \n    [self reloadTableData];\n    \n    [self dismissViewControllerAnimated:YES completion:nil];\n}\n\n- (void)alertControllerWithTitle:(NSString *)title content:(NSString *)content placeholder:(NSString *)placeholder blk:(void (^)(UITextField *))blk {\n    [self alertControllerWithTitle:title message:nil content:content placeholder:placeholder blk:blk];\n}\n\n- (void)alertControllerWithTitle:(NSString *)title message:(NSString *)message content:(NSString *)content placeholder:(NSString *)placeholder blk:(void (^)(UITextField *))blk {\n    [self alertControllerWithTitle:title message:message content:content placeholder:placeholder keyboardType:UIKeyboardTypeDefault blk:blk];\n}\n\n- (void)alertControllerWithTitle:(NSString *)title message:(NSString *)message content:(NSString *)content placeholder:(NSString *)placeholder keyboardType:(UIKeyboardType)keyboardType blk:(void (^)(UITextField *))blk  {\n    UIAlertController *alertController = ({\n        UIAlertController *alert = [UIAlertController\n                                    alertControllerWithTitle:title\n                                    message:message\n                                    preferredStyle:UIAlertControllerStyleAlert];\n        [alert addAction:[UIAlertAction actionWithTitle:@\"取消\"\n                                                  style:UIAlertActionStyleCancel\n                                                handler:nil]];\n        [alert addAction:[UIAlertAction actionWithTitle:@\"确定\"\n                                                  style:UIAlertActionStyleDestructive\n                                                handler:^(UIAlertAction * _Nonnull action) {\n                                                    if (blk) {\n                                                        blk(alert.textFields.firstObject);\n                                                    }\n                                                }]];\n\n        [alert addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {\n            textField.placeholder = placeholder;\n            textField.text = content;\n            textField.keyboardType = keyboardType;\n        }];\n\n        alert;\n    });\n\n    [self presentViewController:alertController animated:YES completion:nil];\n}\n\n@end\n"
  },
  {
    "path": "XEditViewController.h",
    "content": "\n#import \"xia0WeChat.h\"\n\n@interface XEditViewController : UIViewController\n\n@property (nonatomic, copy) NSString *text;\n@property (nonatomic, copy) NSString *placeholder;\n@property (nonatomic, copy) void (^endEditing)(NSString *text);\n\n@end\n"
  },
  {
    "path": "XEditViewController.m",
    "content": "#import \"XEditViewController.h\"\n\n@interface XEditViewController ()\n\n@property (nonatomic, strong) MMTextView *textView;\n\n@end\n\n@implementation XEditViewController\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n\n    [self initNav];\n    [self initSubviews];\n    [self setup];\n}\n\n- (void)initNav {\n    self.navigationItem.leftBarButtonItem = [objc_getClass(\"MMUICommonUtil\") getBarButtonWithTitle:@\"返回\" target:self action:@selector(onBack) style:3];\n    self.navigationItem.rightBarButtonItem = [objc_getClass(\"MMUICommonUtil\") getBarButtonWithTitle:@\"完成\" target:self action:@selector(onFinfsh) style:4];\n    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName: [UIFont boldSystemFontOfSize:18.0]}];\n}\n\n- (void)initSubviews {\n    self.textView = ({\n        MMTextView *tv = [[objc_getClass(\"MMTextView\") alloc] initWithFrame:CGRectMake(7, 0, SCREEN_WIDTH - 14, SCREEN_HEIGHT)];\n        tv.font = [UIFont systemFontOfSize:16];\n\n        tv;\n    });\n\n    [self.view addSubview:self.textView];\n}\n\n- (void)setup {\n    self.textView.text = self.text;\n    self.textView.placeholder = self.placeholder;\n    self.view.backgroundColor = [UIColor whiteColor];\n\n    [self.textView becomeFirstResponder];\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyBoardChange:) name:UIKeyboardWillChangeFrameNotification object:nil];\n}\n\n- (void)keyBoardChange:(NSNotification *)note {\n    CGRect keyboardFrame = [note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];\n\n    if (keyboardFrame.origin.y < SCREEN_HEIGHT) {\n        self.textView.frame = CGRectMake(7, 0, SCREEN_WIDTH - 14, SCREEN_HEIGHT - keyboardFrame.size.height);\n    } else {\n        self.textView.frame = CGRectMake(7, 0, SCREEN_WIDTH - 14, SCREEN_HEIGHT);\n    }\n}\n\n- (void)onBack {\n    if (self.textView.text.length > 0 && ![self.textView.text isEqualToString:self.text]) {\n        [self alertControllerWithTitle:@\"确定不保存返回么\"\n                               message:nil\n                             leftBlock:nil\n                            rightBlock:^() {\n                                [self.view endEditing:YES];\n                                [self.navigationController popViewControllerAnimated:YES];\n                            }];\n    } else {\n        [self.view endEditing:YES];\n        [self.navigationController popViewControllerAnimated:YES];\n    }\n}\n\n- (void)onFinfsh {\n    [self.view endEditing:YES];\n    if (self.endEditing) {\n        self.endEditing(self.textView.text);\n    }\n    [self.navigationController popViewControllerAnimated:YES];\n}\n\n- (void)alertControllerWithTitle:(NSString *)title message:(NSString *)message leftBlock:(void (^)(void))leftBlk  rightBlock:(void (^)(void))rightBlk {\n    UIAlertController *alertController = ({\n        UIAlertController *alert = [UIAlertController\n                                    alertControllerWithTitle:title\n                                    message:nil\n                                    preferredStyle:UIAlertControllerStyleAlert];\n\n        [alert addAction:[UIAlertAction actionWithTitle:@\"取消\"\n                                                  style:UIAlertActionStyleCancel\n                                                handler:^(UIAlertAction * _Nonnull action) {\n                                                    if (leftBlk) {\n                                                        leftBlk();\n                                                    }\n                                                }]];\n\n        [alert addAction:[UIAlertAction actionWithTitle:@\"确定\"\n                                                  style:UIAlertActionStyleDefault\n                                                handler:^(UIAlertAction * _Nonnull action) {\n                                                    if (rightBlk) {\n                                                        rightBlk();\n                                                    }\n                                                }]];\n\n        alert;\n    });\n\n    [self presentViewController:alertController animated:YES completion:nil];\n}\n\n@end\n"
  },
  {
    "path": "build.sh",
    "content": "function xecho(){\n\techo -e \"\\033[32m$1 \\033[0m\"\n}\n\ncydiaRepo=\"$HOME/xia0/iOSRE/cydiarepo/debs\"\nROOT=$(cd `dirname $0`; pwd)\n\n\nxecho \"[1] Clear hosts file.\"\ncat /dev/null > ~/.ssh/known_hosts\n\nxecho \"[2] Remove 0ld package.\"\nrm -fr $ROOT/packages\n\nxecho \"[3] Compile...\"\nmake -s clean package #> /dev/null 2>&1\n\nxecho \"[4] Copy deb to xia0Repo if need...\"\n\nif [[ -z $1 || \"$1\" != \"cydia\" ]]; then\n\txecho \"[*] you do not want to copy deb to cydia repo\"\n\nelse\n\txecho \"[*] you do want to copy deb to cydia repo, let's go\"\n\tif [[ \"$1\" = \"cydia\" &&  -d $cydiaRepo ]]; then\n\t\t\n\t\tdebName=`ls $ROOT/packages/ 2>/dev/null | awk -F'_' '{print $1}'` \n\n\t\tif [[ -z $debName || $debName == \"\" ]]; then\n\t\t\txecho \"[-] No deb file in $ROOT/packages\"\n\t\t\texit\n\t\tfi\n\n\t\txecho \"[*] Target deb file: $debName\"\n\n\t\tls $cydiaRepo | grep -q \"$debName\"\n\n\t\tif [[ \"$?\" == \"0\" ]]; then\n\t\t\txecho \"[*] Old $debName in xia0Repo, delete it!\"\n\t\t\trm \"$cydiaRepo/$debName\"*\n\t\telse\n\t\t\txecho \"[*] $debName not in xia0Repo\"\n\t\tfi\n\n\t\txecho \"[*] Do copy $debName to $cydiaRepo\"\n\t\tcp $ROOT/packages/*.deb $cydiaRepo\n\n\telse\n\t\txecho \"[*] $cydiaRepo not exsist, do not need copy deb file.\"\n\tfi\nfi\n\nxecho \"[5] Install to device\"\nmake install\n\nxecho \"[+] All Done.\""
  },
  {
    "path": "control",
    "content": "Package: com.xia0.fkwechatzan\nName: fkwechatzan\nDepends: mobilesubstrate\nVersion: 0.0.3\nArchitecture: iphoneos-arm\nDescription: 微信集赞助手！集赞换礼品终结者~\nMaintainer: xia0\nAuthor: xia0\nSection: Tweaks\n"
  },
  {
    "path": "fkwechatzan.plist",
    "content": "{ Filter = { Bundles = ( \"com.tencent.xin\" ); }; }\n"
  },
  {
    "path": "xia0WeChat.h",
    "content": "#pragma mark - Util\n#import <UIKit/UIKit.h>\n\n\n#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)\n#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)\n//适配IP6和6+的等比放大效果\n#define FIX_SIZE(num) ((num) * SCREEN_WIDTH / 320.0)\n#define FIX_FONT_SIZE(size) SCREEN_WIDTH < 375 ? ((size + 4.0) / 2.0) : SCREEN_WIDTH == 375 ? ((size + 8.0) / 2.0) : ((size + 12.0) / 2.0)\n#define TKFont(size) [UIFont systemFontOfSize:FIX_FONT_SIZE(size)]\n#define RGBA(r, g, b, a) [UIColor colorWithRed:(r) / 255.0 green:(g) / 255.0 blue:(b) / 255.0 alpha:(a)]\n#define RGB(r, g, b) RGBA(r, g, b, 1)\n\n\n\n@interface MMTextView : UITextView\n@property(retain, nonatomic) NSString *placeholder;\n@end\n\n\n@interface WCBizUtil : NSObject\n\n+ (id)dictionaryWithDecodedComponets:(id)arg1 separator:(id)arg2;\n\n@end\n\n@interface SKBuiltinBuffer_t : NSObject\n\n@property(retain, nonatomic) NSData *buffer; // @dynamic buffer;\n\n@end\n\n#pragma mark - Message\n\n@interface WCPayInfoItem: NSObject\n\n@property(retain, nonatomic) NSString *m_c2cNativeUrl;\n\n@end\n\n@interface CMessageMgr : NSObject\n\n- (void)AddLocalMsg:(id)arg1 MsgWrap:(id)arg2 fixTime:(_Bool)arg3 NewMsgArriveNotify:(_Bool)arg4;\n\n@end\n\n@interface CMessageWrap : NSObject\n\n@property (retain, nonatomic) WCPayInfoItem *m_oWCPayInfoItem;\n@property (assign, nonatomic) NSUInteger m_uiMesLocalID;\n@property (retain, nonatomic) NSString* m_nsFromUsr;            ///< 发信人，可能是群或个人\n@property (retain, nonatomic) NSString* m_nsToUsr;              ///< 收信人\n@property (assign, nonatomic) NSUInteger m_uiStatus;\n@property (retain, nonatomic) NSString* m_nsContent;            ///< 消息内容\n@property (retain, nonatomic) NSString* m_nsRealChatUsr;        ///< 群消息的发信人，具体是群里的哪个人\n@property (assign, nonatomic) NSUInteger m_uiMessageType;\n@property (assign, nonatomic) long long m_n64MesSvrID;\n@property (assign, nonatomic) NSUInteger m_uiCreateTime;\n@property (retain, nonatomic) NSString *m_nsDesc;\n@property (retain, nonatomic) NSString *m_nsAppExtInfo;\n@property (assign, nonatomic) NSUInteger m_uiAppDataSize;\n@property (assign, nonatomic) NSUInteger m_uiAppMsgInnerType;\n@property (retain, nonatomic) NSString *m_nsShareOpenUrl;\n@property (retain, nonatomic) NSString *m_nsShareOriginUrl;\n@property (retain, nonatomic) NSString *m_nsJsAppId;\n@property (retain, nonatomic) NSString *m_nsPrePublishId;\n@property (retain, nonatomic) NSString *m_nsAppID;\n@property (retain, nonatomic) NSString *m_nsAppName;\n@property (retain, nonatomic) NSString *m_nsThumbUrl;\n@property (retain, nonatomic) NSString *m_nsAppMediaUrl;\n@property (retain, nonatomic) NSData *m_dtThumbnail;\n@property (retain, nonatomic) NSString *m_nsTitle;\n@property (retain, nonatomic) NSString *m_nsMsgSource;\n@property(nonatomic, assign) NSInteger m_uiGameType;  // 1、猜拳; 2、骰子; 0、自定义表情\n@property(nonatomic, assign) unsigned long m_uiGameContent;\n@property(nonatomic, strong) NSString *m_nsEmoticonMD5;\n\n- (id)initWithMsgType:(long long)arg1;\n+ (_Bool)isSenderFromMsgWrap:(id)arg1;\n\n@end\n\n@interface MMServiceCenter : NSObject\n\n+ (instancetype)defaultCenter;\n- (id)getService:(Class)service;\n\n@end\n\n@interface MMLanguageMgr: NSObject\n\n- (id)getStringForCurLanguage:(id)arg1;\n\n\n@end\n\n#pragma mark - RedEnvelop\n\n@interface WCRedEnvelopesControlData : NSObject\n\n@property(retain, nonatomic) CMessageWrap *m_oSelectedMessageWrap;\n\n@end\n\n@interface WCRedEnvelopesLogicMgr: NSObject\n\n- (void)OpenRedEnvelopesRequest:(id)params;\n- (void)ReceiverQueryRedEnvelopesRequest:(id)arg1;\n- (void)GetHongbaoBusinessRequest:(id)arg1 CMDID:(unsigned int)arg2 OutputType:(unsigned int)arg3;\n\n/** Added Methods */\n- (unsigned int)calculateDelaySeconds;\n\n@end\n\n@interface HongBaoRes : NSObject\n\n@property(retain, nonatomic) SKBuiltinBuffer_t *retText; // @dynamic retText;\n@property(nonatomic) int cgiCmdid; // @dynamic cgiCmdid;\n\n@end\n\n@interface HongBaoReq : NSObject\n\n@property(retain, nonatomic) SKBuiltinBuffer_t *reqText; // @dynamic reqText;\n\n@end\n\n#pragma mark - Contact\n\n@interface CContact: NSObject <NSCoding>\n\n@property(retain, nonatomic) NSString *m_nsUsrName;\n@property(retain, nonatomic) NSString *m_nsHeadImgUrl;\n@property(retain, nonatomic) NSString *m_nsNickName;\n\n- (id)getContactDisplayName;\n\n@end\n\n@interface CContactMgr : NSObject\n\n- (id)getSelfContact;\n- (id)getContactByName:(id)arg1;\n- (id)getContactForSearchByName:(id)arg1;\n- (_Bool)getContactsFromServer:(id)arg1;\n- (_Bool)isInContactList:(id)arg1;\n- (_Bool)addLocalContact:(id)arg1 listType:(unsigned int)arg2;\n\n@end\n\n\n#pragma mark - QRCode\n\n@interface ScanQRCodeLogicController: NSObject\n\n@property(nonatomic) unsigned int fromScene;\n- (id)initWithViewController:(id)arg1 CodeType:(int)arg2;\n- (void)tryScanOnePicture:(id)arg1;\n- (void)doScanQRCode:(id)arg1;\n- (void)showScanResult;\n\n@end\n\n@interface NewQRCodeScanner: NSObject\n\n- (id)initWithDelegate:(id)arg1 CodeType:(int)arg2;\n- (void)notifyResult:(id)arg1 type:(id)arg2 version:(int)arg3 rawData:(NSData *)arg4;\n\n@end\n\n#pragma mark - MMTableView\n\n@interface MMTableViewInfo : UITableView\n\n- (id)getTableView;\n- (void)clearAllSection;\n- (void)addSection:(id)arg1;\n- (void)insertSection:(id)arg1 At:(unsigned int)arg2;\n- (void)setContentInset:(id)arg1;\n\n@end\n\n@interface WCTableViewManager\n\n- (id)getTableView;\n- (void)clearAllSection;\n- (void)addSection:(id)arg1;\n- (void)insertSection:(id)arg1 At:(unsigned int)arg2;\n\n@end\n\n@interface MMTableViewSectionInfo\n\n+ (id)sectionInfoDefaut;\n+ (id)sectionInfoHeader:(id)arg1;\n+ (id)sectionInfoHeader:(id)arg1 Footer:(id)arg2;\n- (void)addCell:(id)arg1;\n\n@end\n\n@interface WCTableViewSectionManager\n\n+ (id)defaultSection;\n+ (id)sectionInfoHeader:(id)arg1;\n+ (id)sectionInfoHeader:(id)arg1 Footer:(id)arg2;\n- (void)addCell:(id)arg1;\n\n@end\n\n@interface MMTableViewCellInfo\n\n+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 accessoryType:(long long)arg4;\n+ (id)switchCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 on:(_Bool)arg4;\n+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 rightValue:(id)arg4 accessoryType:(long long)arg5;\n+ (id)normalCellForTitle:(id)arg1 rightValue:(id)arg2;\n+ (id)urlCellForTitle:(id)arg1 url:(id)arg2;\n\n@end\n\n@interface WCTableViewCellManager\n+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3;\n+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 accessoryType:(long long)arg4;\n+ (id)switchCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 on:(_Bool)arg4;\n+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 rightValue:(id)arg4 accessoryType:(long long)arg5;\n+ (id)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 rightValue:(id)arg4 WithDisclosureIndicator:(long long)arg5;\n+ (id)normalCellForTitle:(id)arg1 rightValue:(id)arg2;\n+ (id)urlCellForTitle:(id)arg1 url:(id)arg2;\n\n@end\n\n@interface MMTableView: UITableView\n\n@end\n\n#pragma mark - UI\n@interface MMUICommonUtil : NSObject\n\n+ (id)getBarButtonWithTitle:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(int)arg4;\n\n@end\n\n@interface MMLoadingView : UIView\n\n@property(retain, nonatomic) UILabel *m_label; // @synthesize m_label;\n@property (assign, nonatomic) BOOL m_bIgnoringInteractionEventsWhenLoading; // @synthesize m_bIgnoringInteractionEventsWhenLoading;\n\n- (void)setFitFrame:(long long)arg1;\n- (void)startLoading;\n- (void)stopLoading;\n- (void)stopLoadingAndShowError:(id)arg1;\n- (void)stopLoadingAndShowOK:(id)arg1;\n\n\n@end\n\n@interface MMWebViewController: NSObject\n\n- (id)initWithURL:(id)arg1 presentModal:(_Bool)arg2 extraInfo:(id)arg3;\n\n@end\n\n\n@protocol ContactSelectViewDelegate <NSObject>\n\n- (void)onSelectContact:(CContact *)arg1;\n\n@end\n\n@interface ContactSelectView : UIView\n\n@property(nonatomic) unsigned int m_uiGroupScene; // @synthesize m_uiGroupScene;\n@property(nonatomic) _Bool m_bMultiSelect; // @synthesize m_bMultiSelect;\n@property(retain, nonatomic) NSMutableDictionary *m_dicMultiSelect; // @synthesize m_dicMultiSelect;\n\n- (id)initWithFrame:(struct CGRect)arg1 delegate:(id)arg2;\n- (void)initData:(unsigned int)arg1;\n- (void)initView;\n- (void)addSelect:(id)arg1;\n\n@end\n\n@interface ContactsDataLogic : NSObject\n\n@property(nonatomic) unsigned int m_uiScene; // @synthesize m_uiScene;\n\n@end\n\n@interface MMUINavigationController : UINavigationController\n\n@end\n\n#pragma mark - UtilCategory\n\n@interface NSMutableDictionary (SafeInsert)\n\n- (void)safeSetObject:(id)arg1 forKey:(id)arg2;\n\n@end\n\n@interface NSDictionary (NSDictionary_SafeJSON)\n\n- (id)arrayForKey:(id)arg1;\n- (id)dictionaryForKey:(id)arg1;\n- (double)doubleForKey:(id)arg1;\n- (float)floatForKey:(id)arg1;\n- (long long)int64ForKey:(id)arg1;\n- (long long)integerForKey:(id)arg1;\n- (id)stringForKey:(id)arg1;\n\n@end\n\n@interface NSString (NSString_SBJSON)\n\n- (id)JSONArray;\n- (id)JSONDictionary;\n- (id)JSONValue;\n\n@end\n\n#pragma mark - UICategory\n\n@interface UINavigationController (LogicController)\n\n- (void)PushViewController:(id)arg1 animated:(_Bool)arg2;\n\n@end\n\n@interface MMUIViewController : UIViewController\n\n- (void)startLoadingBlocked;\n- (void)startLoadingNonBlock;\n- (void)startLoadingWithText:(NSString *)text;\n- (void)stopLoading;\n- (void)stopLoadingWithFailText:(NSString *)text;\n- (void)stopLoadingWithOKText:(NSString *)text;\n\n@end\n\n@interface NewSettingViewController: MMUIViewController\n\n- (void)reloadTableData;\n\n@end\n\n@interface ContactInfoViewController : MMUIViewController\n\n@property(retain, nonatomic) CContact *m_contact; // @synthesize m_contact;\n\n@end\n\n@protocol MultiSelectContactsViewControllerDelegate <NSObject>\n- (void)onMultiSelectContactReturn:(NSArray *)arg1;\n\n@optional\n- (int)getFTSCommonScene;\n- (void)onMultiSelectContactCancelForSns;\n- (void)onMultiSelectContactReturnForSns:(NSArray *)arg1;\n@end\n\n@interface MultiSelectContactsViewController : UIViewController\n\n@property(nonatomic) _Bool m_bKeepCurViewAfterSelect; // @synthesize m_bKeepCurViewAfterSelect=_m_bKeepCurViewAfterSelect;\n@property(nonatomic) unsigned int m_uiGroupScene; // @synthesize m_uiGroupScene;\n\n@property(nonatomic, weak) id <MultiSelectContactsViewControllerDelegate> m_delegate; // @synthesize m_delegate;\n\n@end\n\n@interface GameController : NSObject\n+ (NSString*)getMD5ByGameContent:(NSInteger) content;\n@end\n\n"
  }
]