Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Download in ipatool not working with KbsyncTool (paid support) #1

Open
flashfoxter opened this issue Aug 23, 2022 · 3 comments
Open

Comments

@flashfoxter
Copy link

Hello
Download in ipatool not working with KbsyncTool
https://www.dropbox.com/s/te7g0tfto4ewe1v/photo_2022-08-23%2017.32.06.jpeg?raw=1

@Lessica
Copy link
Owner

Lessica commented Aug 23, 2022

KbsyncTool and ipatool-py do not support payment requests now. You have to purchase it manually on the App Store UI and then you can use ipatool-py to download it.

@flashfoxter
Copy link
Author

Thanks for your answer
Sorry maybe my question is not so clear.

ipatool use "buyProduct" request for download Free App (yes it's sounds strange buy product for free app)

Code from ipatool:

def buyProduct(self, appId, appVer='', productType='C', pricingParameters='STDQ'): # STDQ - buy, STDRDL - redownload, SWUPD - update url = "https://p25-buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/buyProduct"

but when I use KbsyncTool for generating data for "buyProduct" this request return error:
Store buyProduct failed! Message: main.py:205 MZCommerce.ConfirmPaymentSheet_message (errorType -MZCommerce.ConfirmPaymentSheet)

May be I need to change user agent in ipatool or something else ?

@defparam
Copy link

defparam commented Sep 19, 2022

After reversing appstored a little bit I noticed that 2 requests to the /WebObjects/MZBuy.woa/wa/buyProduct endpoint are sent. One is sent right when you attempt to get an app to install and the response from the server is MZCommerce.ConfirmPaymentSheet. This actually causes appstored to open the dialog box to confirm the purchase/installation. After you hit the install button a second request to the /WebObjects/MZBuy.woa/wa/buyProduct is sent but this time it contains:

        <key>hasConfirmedPaymentSheet</key>
        <string>true</string>

I believe this tells the server that the purchase (free or otherwise) has been confirmed and it responds with an authorized response along with the links to the your relevant IPAs.

I'm not sure, but I don't believe ipatool-py inserts the hasConfirmedPaymentSheet key which is probably what is causing it to fail with the ids from your device.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants