Cycript 的使用

Cycript 的使用

  • 通过 ssh 链接到越狱 iPhone
ssh [email protected] -p 22
  • 通过 ps -e 来搜索 iPhone 上的进程
ps -e | grep QQ
  • 通过 Cycript 进行注入
cycript -p QQ
cy# UIApp
#""
cy# [[UIApplication sharedApplication] setStatusBarHidden:YES] 
cy# [[UIApplication sharedApplication] setStatusBarHidden:NO] 
cy# 

# 查看手机 UIApplication 的
# 动态设置 QQ 程序的状态栏显示



// QQ  cycript -p QQ
[[UIApplication sharedApplication] setStatusBarHidden:YES]   //隐藏状态栏
[[UIApplication sharedApplication] setStatusBarHidden:NO]    //显示状态栏

[[[UIAlertView alloc]initWithTitle:@"Tanzhou" message:@"Hello luz" delegate:ni cancelButtonTitle:@"ok" otherButtonTitles:nil, nil] show]            //弹框

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:9999]   //设置badge数字 
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1]
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]

// SpringBroad cycript -p SpringBroad
[[SBScreenShotter sharedInstance] saveScreenshot:YES]   截屏,闪光
[[SBScreenShotter sharedInstance] saveScreenshot:NO]   截屏,不闪光
[[SBScreenFlash mainScreenFlasher] flashColor:[UIColor magentaColor] withCompletion:nil] 屏幕闪紫色光
  • 修改QQ setApplicationIconBadgeNumber 的效果图
QQ.png

你可能感兴趣的:(Cycript 的使用)