如何修改微信步数?如何对失效的ipa包重签名?

准备工作:Mac电脑、Xcode

步骤:

1、前往Github下载class-dump

https://github.com/nygard/class-dump

2、编译(command + B),Show in Finder,将文件拷贝出来,前往/usr/local/bin/class-dump,将文件放入该目录;

3、打开终端,输入class-dump

4、安装Theos

①用Homebrew进行安装,安装Homebrew代码为:

1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

②把Theos安装在/opt/theos 目录下

1
sudo git clone --recursive https://github.com/theos/theos.git /opt/theos

然后把/opt/theos的权限改为自己所拥有

1
sudo chown $(id -u):$(id -g) /opt/theos

vim ~/.bash_profile

添加如下两行代码,如下图所示:

1
2
export THEOS=/opt/theos
export PATH=/opt/theos/bin/:$PATH

更新bash_profile

1
source ~/.bash_profile

验证是否安装成功:

1
nic.pl

5、安装MonkeyDev

1
2
3
4
xcode-select -p
git clone https://github.com/AloneMonkey/MonkeyDev.git
cd MonkeyDev/bin
sudo ./md-install

若不用可卸载:

1
sudo ./md-uninstall

6、新建工程,选择MonkeyApp

7、通过PP助手下载越狱版的微信,将ipa导入工程,如下图所示:

8、将DemoDylib.m中实现文件替换为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CHDeclareClass(WCDeviceStepObject); // declare class

CHOptimizedMethod(0, self, unsigned int, WCDeviceStepObject, m7StepCount) // hook method (with no arguments and no return value)
{
// write code here ...

return 9999; //步数随意改数
}



CHConstructor // code block that runs immediately upon load
{
@autoreleasepool
{
CHLoadLateClass(WCDeviceStepObject);
CHHook(0, WCDeviceStepObject,m7StepCount);
}
}

9、不使用runtime库,修改如图位置即可,改为NO

10、编译运行,即可看到手机上另一个微信,登录微信,就可以发现步数已经改变了。

温馨提示: 该操作可能会收到微信警告,请勿用于非法用途,仅供参考,依旧上述步骤可对失效的ipa安装包进行重签名。

您的支持将鼓励我继续创作!
0%