关于直接下载第三方IPA应用分发平台之蒲公英的研究

目前基于第三方应用分发的平台比较常用的就属蒲公英、fir等,在我们提交到平台后,我们可以通过扫描应用二维码来下载,比如蒲公英平台如下:

那么以上是非常普通的一个操作过程,问题来了:如何直接在电脑端下载IPA安装包呢,即不通过手机来下载安装包直接安装,我们想把IPA直接提取出来研究或分享。

常规模式:

1,通过浏览器调试模式,切换到移动设备,即可通过点击安装来获取下载链接,一般链接地址为:

<a href="itms-services://?action=download-manifest&url=https://www.xxx.com/app/plist/xxx.plist>下载安装</a>

 2,我们通过下载plist文件,即:

https://www.xxx.com/app/plist/xxx.plist

直接就获取到了IPA安装包路径,通过下载即可,一般xxx.plist文件格式为:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>https://www.xxx.com/7874ef31e63f3f3370dddd24e94cfc37.ipa?auth_key=1626230327-e25af869b8124a8bdac5c02eb506182b-0-64e533dd9a7ecd74227843406302e6e4&amp;response-content-disposition=attachment%3Bfilename%3D%E6%98%93%E6%95%99%E6%95%99%E5%AD%A6%E5%8A%A9%E6%89%8B_2.3.0.ipa</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>full-size-image</string>
                    <key>needs-shine</key>
                    <false/>
                    <key>url</key>
                    <string>https://cdn-app-icon..com/c/f/f/9/b/cff9bdcd0fccc74fa7eb5fbd382f46c6?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>display-image</string>
                    <key>needs-shine</key>
                    <false/>
                    <key>url</key>
                    <string>https://cdn-app-icon.xxxx.com/c/f/f/9/b/cff9bdcd0fccc74fa7eb5fbd382f46c6?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.xxx</string>
                <key>bundle-version</key>
                <string>2.3.0</string>
                <key>kind</key>
                <string>software</string>
                <key>subtitle</key>
                <string>xxxx</string>
                <key>title</key>
                <string>xxxx</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

其中software-package下的url即为IPA地址,直接下载即可,非常简单,但是我们在获取蒲公英的plist文件后却无法下载,注意,蒲公英需要用Safari浏览器打开,并切换到 develop - User Agent - Safari iPhone 模式下。

点击安装出现如下界面:

可见plist文件地址为: 

https%3A%2F%2Fwww.pgyer.com%2Fapp%2Fplist%2F0c3ab9242b3879832a39b797d6f0bd89%2Finstall%2F%2Fs.plist

通过urlDecode解码后:http://tool.chinaz.com/tools/urlencode.aspx

https://www.pgyer.com/app/plist/0c3ab9242b3879832a39b797d6f0bd89/install//s.plist

下载此文件得到界面:

至此,我们似乎无法获取到具体IPA的下载地址了吧。

特殊模式:

1,借助curl终端命令来解决此问题,通过研究得知在请求中需要加入代理参数,如下:

--user-agent "com.apple.appstored/1.0 iOS/14.3 model/iPhone10,2 hwp/t8015 build/18C66 (6; dt:158) AMS/1"

 2,下载此plist文件命令如下:

curl --user-agent "com.apple.appstored/1.0 iOS/14.3 model/iPhone10,2 hwp/t8015 build/18C66 (6; dt:158) AMS/1" https://www.pgyer.com/app/plist/0c3ab9242b3879832a39b797d6f0bd89/install//s.plist -o pgy.plist

4,打开下载后的plist文件,内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>https://oss.pgyer.com/9d6bfa2875d04273fcafa646d4715c7f.ipa?auth_key=1626245309-42ee54e8f5532f8d4ff14d3b5c4dec8c-0-53a53c8ecf489b455d72059394b97990&amp;response-content-disposition=attachment%3Bfilename%3D%E7%83%AD%E8%A1%80%E7%A5%9E%E9%80%94_1.0.ipa</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>full-size-image</string>
                    <key>needs-shine</key>
                    <false/>
                    <key>url</key>
                    <string>https://cdn-app-icon.pgyer.com/8/7/c/2/d/87c2df7983ec05dce6c538d5d6346304?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>display-image</string>
                    <key>needs-shine</key>
                    <false/>
                    <key>url</key>
                    <string>https://cdn-app-icon.pgyer.com/8/7/c/2/d/87c2df7983ec05dce6c538d5d6346304?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.yuetu.shentu.rexuest</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>subtitle</key>
                <string>热血神途</string>
                <key>title</key>
                <string>热血神途</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

 5,至此安装包地址就拿到了,然后直接下载即可,采用如下命令:

wget "https://oss.pgyer.com/9d6bfa2875d04273fcafa646d4715c7f.ipa?auth_key=1626245309-42ee54e8f5532f8d4ff14d3b5c4dec8c-0-53a53c8ecf489b455d72059394b97990&amp;response-content-disposition=attachment%3Bfilename%3D%E7%83%AD%E8%A1%80%E7%A5%9E%E9%80%94_1.0.ipa"

至此,就解决了蒲公英这种特殊情况。

另外,如果想一步到位获取到ipa下载地址,可以执行如下命令:

curl --user-agent 'com.apple.appstored/1.0 iOS/14.3 model/iPhone10,2 hwp/t8015 build/18C66 (6; dt:158) AMS/1' https://www.pgyer.com/app/plist/0c3ab9242b3879832a39b797d6f0bd89/install//s.plist -s | grep "oss.pgyer.com" | sed 's#</string># #g' | sed 's#<string># #g' | awk '{print $1}'

或保存到一个txt文件,命令如下:

curl --user-agent 'com.apple.appstored/1.0 iOS/14.3 model/iPhone10,2 hwp/t8015 build/18C66 (6; dt:158) AMS/1' https://www.pgyer.com/app/plist/0c3ab9242b3879832a39b797d6f0bd89/install//s.plist -s | grep "oss.pgyer.com" | sed 's#</string># #g' | sed 's#<string># #g' | awk '{print $1}' > d.txt

 

安装IPA文件

1,通过iFunbox下载安装,下载地址:http://dl.i-funbox.com/cn/

2,通过Xcode安装,下载地址:https://developer.apple.com/cn/xcode/resources/

 3,通过风车安装,下载地址:https://www.fengchetech.cn/

 

备注:以上内容仅供技术学习参考,请勿用于违法行为,请依规操作第三方平台功能流程。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

群鸿

感谢认可,多谢打赏。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值