Last active
February 19, 2021 16:13
-
-
Save alibo/24baea7c45bbc345f5be2c56e8f0364d to your computer and use it in GitHub Desktop.
[Updated: 19 Feb 2021] Cafebazaar APK Downloader
This file contains hidden or 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 | |
pkg=$1 | |
sdk=${2:-22} | |
cpu=${3:-x86,armeabi-v7a,armeabi} | |
body=$(cat << EOF | |
{ | |
"properties": { | |
"language": 2, | |
"clientVersionCode": 1100301, | |
"androidClientInfo": { | |
"cpu": "$cpu", | |
"sdkVersion": $sdk | |
}, | |
"clientVersion": "11.3.1", | |
"isKidsEnabled": false | |
}, | |
"singleRequest": { | |
"appDownloadInfoRequest": { | |
"downloadStatus": 1, | |
"packageName": "$pkg", | |
"referrers": [] | |
} | |
} | |
} | |
EOF | |
) | |
curl -s -X POST \ | |
https://api.cafebazaar.ir/rest-v1/process/AppDownloadInfoRequest \ | |
-H 'content-type: application/json' \ | |
-d "$body" | jq '(.singleReply.appDownloadInfoReply.cdnPrefix[0] + "apks/" + .singleReply.appDownloadInfoReply.token + ".apk")' | xargs |
This file contains hidden or 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
# ./cafebazaar-apk-downloader.sh <pkg> <sdk:-22> | |
$ ./cafebazaar-apk-downloader.sh com.android.chrome | |
https://appcdn.cafebazaar.ir/apks/019788233059.apk?expire=1614010406&token=66490860be0df8969cd834f184ec07a9&a=.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment