Cycript

CYcript must be connected to shell-shattering apps and unshell-shattering apps cannot be connected

Cycript connection successful

Create cy file

Cycript allows you to modify data in memory, etc., without blocking the process You can also use Xcode’s Viewdebug to find which control 1.00 is on first

This is then modified by modifying data in memory in the same way that Cycript does

Logos

You can Hook by combining MonkeyDev with Logos syntax

Start with a new project and create a simple pageCompile the export.app file and export the generated header fileCreate a new project using MonkeyDev, copy the export. App file into the Monkey project, re-sign it, and install it on your phone

This is the content of the exported headerTo write Logos language, you need to modify the way the dylib. xm file is read in advance Hook successfully click button to appear hook, Logos supports multiple language formats

Modify Settings

Interface analysis

The specific code is as follows

#import <UIKit/UIKit.h> #define PHDefaults [NSUserDefaults standardUserDefaults] #define PHSWITCHKEY @"PHSWITCHKEY" #define PHTIMEKEY @"PHTIMEKEY" @interface WCTableViewManager : NSObject @property(retain, nonatomic) NSMutableArray *sections; - (long long)numberOfSectionsInTableView:(UITableView *)tableView; @end @interface NewSettingViewController:UIViewController @end %hook WCTableViewManager - (void)scrollViewWillBeginDragging:(id)arg1{ %orig; / / judgment in recycling keyboard Settings page judgment has started to slip the if ([MSHookIvar < UITableView * > (self, "_tableView"). NextResponder. NextResponder IsKindOfClass :% C (NewSettingViewController)]) {// Retrieve keyboard [MSHookIvar <UITableView *>(self,"_tableView")endEditing:YES]; %new - (void)textFieldDidChangeValue:(NSNotification *)notification {UITextField *sender = (UITextField *)[notification object]; [PHDefaults setValue:sender.text forKey:PHTIMEKEY]; [PHDefaults synchronize]; } %new - (void)switchChang:(UISwitch *)switchView { [PHDefaults setBool:switchView.isOn forKey:PHSWITCHKEY]; [PHDefaults synchronize]; [MSHookIvar <UITableView *>(self,"_tableView") reloadData]; } - (id)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if ([tableView.nextResponder.nextResponder isKindOfClass:%c(NewSettingViewController)] && indexPath.section == [self numberOfSectionsInTableView:tableView] - 1) { UITableViewCell *cell = nil; if (indexPath.row == 0) { static NSString *swCell = @"SWCELL"; cell = [tableView dequeueReusableCellWithIdentifier:swCell]; if (! cell) { cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; } cell.textlabel. text = @" automatically grab red envelope "; UISwitch *switchView = [[UISwitch alloc]init]; switchView.on = [PHDefaults boolForKey:PHSWITCHKEY]; [switchView addTarget:self action:@selector(switchChang:) forControlEvents:UIControlEventValueChanged]; cell.accessoryView = switchView; cell.imageView.image = [UIImage imageNamed:([PHDefaults boolForKey:PHSWITCHKEY] == 1) ? @"unlocked" : @"locked"]; }else if (indexPath.row == 1) { static NSString * waitCell = @"waitCell"; cell = [tableView dequeueReusableCellWithIdentifier:waitCell]; if(! cell){ cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; } cell.textLabel.text = @" wait time (seconds)"; UITextField *textField = [[UITextField alloc]initWithFrame:CGRectMake(0, 0, 150, 40)]; [[NSNotificationCenter defaultCenter] addObserver:self Selector :@selector(textFieldDidChangeValue:) name:UITextFieldTextDidChangeNotification object:textField]; textField.text = [PHDefaults valueForKey:PHTIMEKEY]; textField.borderStyle = UITextBorderStyleRoundedRect; cell.accessoryView = textField; cell.imageView.image = [UIImage imageNamed:@"clock"]; } cell.backgroundColor = [UIColor whiteColor]; return cell; }else { return %orig; } } - (long long)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { / / if it is NewSettingViewController and was the last section 2 or return to the original number if ([tableView. NextResponder. NextResponder isKindOfClass:%c(NewSettingViewController)] && (section == [self numberOfSectionsInTableView:tableView] - 1)) { return 2; }else { return %orig; } } - (long long)numberOfSectionsInTableView:(UITableView *)tableView { if([tableView.nextResponder.nextResponder IsKindOfClass :%c(NewSettingViewController)]) {return %orig + 1; }else { return %orig; }} // set height - (double)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { / / if it is NewSettingViewController and is the last section 44 otherwise returns back to the original value if ([tableView. NextResponder. NextResponder isKindOfClass:%c(NewSettingViewController)] && indexPath.section == [self numberOfSectionsInTableView:tableView] - 1) {// Locate the setting page return 44; }else { return %orig; }} % end / / to add listening to VC keyboard events so will hook NewSettingViewController hookNewSettingViewController % % new - (void)keyboardWillShow:(NSNotification *)note { UIView *view = self.view; CGRect keyBoardRect=[note.userInfo[UIKeyboardFrameEndUserInfoKey]CGRectValue]; view.frame = CGRectMake(0, -keyBoardRect.size.height, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height); } %new - (void)keyboardWillHide:(NSNotification*)note { UIView * view = self.view; view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height); } - (void)viewDidLoad { %orig; [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillShow) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; } %endCopy the code

rendering