android13 如何使用httpcanary抓包

1.首先下載httpcanary的專業版
鏈接: https://pan.baidu.com/s/1cgneyOGvpNR8pENQ9RFFDQ 提取碼: ocmb
2.將下面的sh文件,放到手機的 /data/local/tmp 目錄,命令爲cert.sh
並給權限chmod 777 cert.sh

# cert.sh
set -e # Fail on error
# Create a separate temp directory, to hold the current certificates
# Without this, when we add the mount we can't read the current certs anymore.
mkdir -m 700 /data/local/tmp/cert
# Copy out the existing certificates
cp /system/etc/security/cacerts/* /data/local/tmp/cert/
# Create the in-memory mount on top of the system certs folder
mount -t tmpfs tmpfs /system/etc/security/cacerts
# Copy the existing certs back into the tmpfs mount, so we keep trusting them
mv /data/local/tmp/cert/* /system/etc/security/cacerts/
# Copy our new cert in, so we trust that too
cp /data/local/tmp/87bc3517.0 /system/etc/security/cacerts/
# Update the perms & selinux context labels, so everything is as readable as before
chown root:root /system/etc/security/cacerts/*
chmod 644 /system/etc/security/cacerts/*
chcon u:object_r:system_file:s0 /system/etc/security/cacerts/*
# Delete the temp cert directory & this script itself
rm -r /data/local/tmp/cert
# rm ${injectionScriptPath}
echo "System cert successfully injected"

需要注意的是重啓手機之後證書就失效了,每次抓包前執行一下就可以了
3.設置httpcanary的部分

 mv HttpCanary.pem HttpCanary.jks
 mv HttpCanary.jks /data/data/com.guoshi.httpcanary.premium/cache/

其中HttpCanary.pem和87bc3517.0我我已經導出到網盤
鏈接: https://pan.baidu.com/s/1MhDHmxDoRFDFFbjkj5XMRQ 提取碼: 7we0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章