4. Introduction to Cycript tools
(Saurik, Cycript website :www.cycript.org/)
- Cycript is a scripting language, considered objective-javascript, that makes it easy to test and verify the effects of functions.
- On jailbroken phones, it can be injected into third-party apps
- You can also integrate Cycript into your own apps using static libraries (MonkeyDev can write plug-ins for non-jailbroken iOS third-party apps, but permissions are sandboxed)
Install Cycript on your jailbroken phone
Search Cycript on Cydia to install
apt-get install cycript
Copy the code
Cycript usage (injected into third party process space)
- Inject Cycript modules into third-party processes
// Confirm the process name or process PID luz-iphone:/ root# ps -e | grep WeChat 1368?? 6:17. 44 / var/mobile/Containers/Bundle/Application / 749 b5c a8d dc69a - 3-4-9926-1220 e69fc85f/WeChat app/WeChat / / open the way to 1 luz-iphone:/ root# cycript -p WeChat
cy# Luz - iPhone :/ root# cycript -p 1368
cy# // Exit the cycript shortcut **Control+D**Copy the code
- We practice
//WeChat cycript -p WeChat
[[UIApplication sharedApplication] setStatusBarHidden:YES [[UIApplication sharedApplication]setStatusBarHidden:NO] // Displays the status bar [[[UIAlertView alloc]initWithTitle:@"Tanzhou" message:@"Hello luz" delegate:ni cancelButtonTitle:@"ok"OtherButtonTitles :nil, nil] show] // Pop-up [[UIApplication sharedApplication]setApplicationIconBadgeNumber: 1000] / / set the badge number [[UIApplication sharedApplication]setApplicationIconBadgeNumber:1]
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0] //SpringBroad cycript -p SpringBroad [[SBScreenShotter sharedInstance] saveScreenshot:YES] [SBScreenShotter sharedInstance] saveScreenshot:NO] Do not flash [[SBScreenFlash mainScreenFlasher] flashColor:[UIColor magentaColor] withCompletion:nil] The screen flashes purple lightCopy the code