Last active
January 1, 2021 15:58
-
-
Save yougg/cb9942762a1c13d00c4e9faf0d91c580 to your computer and use it in GitHub Desktop.
多多猫 Android应用 破解VIP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 参考: https://www.52pojie.cn/thread-659866-1-1.html | |
cd `mktemp -d` | |
mkdir -p tool app | |
# 安装相关工具 | |
cd tool | |
wget --no-check-certificate -O openjdk.tar.gz https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz | |
wget --no-check-certificate https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool | |
wget --no-check-certificate -O apktool.jar https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.4.jar | |
# wget --no-check-certificate https://github.com/skylot/jadx/releases/download/v0.8.0/jadx-0.8.0.zip | |
tar xzf openjdk.tar.gz | |
chmod a+x apktool | |
export JAVA_HOME=$PWD/jdk-11.0.1 | |
export PATH=$PWD:$JAVA_HOME/bin:$PATH | |
# 下载多多猫App | |
cd ../app | |
# 1.7.433 | |
wget --no-check-certificate -O ddcat.apk 'http://dl-cdn.coolapkmarket.com/down/apk_upload/2019/0731/_1.7.433_b1-18908-o_1dh33dh041aev15i1fp98la10k4q-uid-483139.apk?_upt=50bde9ec1586321377' | |
# 解包apk | |
apktool d -f -o _ddcat ddcat.apk | |
# 修改替换VIP值 | |
# find _ddcat -type f | xargs grep -En 'sput v[0-9]+, Lorg/noear/ddcat/dao/bp;->e:I' | |
IFS=$'\n' | |
for f in `find _ddcat -type f | xargs grep -En 'sput v1, Lorg/noear/ddcat/dao/bp;->e:I'`; do | |
s=$(echo $f | awk -F ':' '{print $1}') | |
sed -i 's/sput v1, Lorg\/noear\/ddcat\/dao\/bp;->e:I/const\/4 v1, 0x3\n\n sput v1, Lorg\/noear\/ddcat\/dao\/bp;->e:I/' $s | |
done | |
# 打包apk | |
apktool b _ddcat -o ddcat_vip.apk | |
# 生成密钥证书 | |
echo -e 'noear\nwcat\nwcat\nZhangzhou\nZJ\n86\ny\n' | keytool -genkey -keystore ddcat.jks -keyalg RSA -validity 10000 -alias ddcat -storepass 123456 | |
# 签名apk | |
jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore ddcat.jks -storepass 123456 ddcat_vip.apk ddcat | |
# 验证apk签名 | |
jarsigner -verify -certs ddcat_vip.apk | |
# 安装ddcat_vip.apk到手机 (如果手机上已安装过多多猫,需要先卸载原版本再安装新的) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment