majd / ipatool

Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store
MIT License
5.86k stars 491 forks source link

Can't search any APP #300

Open Jagerx opened 1 week ago

Jagerx commented 1 week ago

What happened?

ERR error="country code is invalid: country code mapping for store front () was not found" success=false

131

I find ipatool-auth.service, double click on it check the "show password" box, there is no storefront, just plaintext {"name":" ","password":"myIDPassword"}

No idea what storefront is, and how to solve it.

macOS Sequoia 15.0.

Version

2.1.4

Relevant log output

No response

isaac960623 commented 1 week ago

same here!!!!!

Changzw commented 1 week ago

same here

Changzw commented 1 week ago

image

isaac960623 commented 1 week ago

same here!!!!!

I have now modified the source code to bypass the "no storefront" issue, but now I'm stuck at the download step with the message: received error.

input:

ipatool_test download -i 6477356535

output:

downloading 0% | | ( 0/ 1 B)
download url: https://p25-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct?guid=DA8B6B69D626 5:40PM ERR error="received error: An unknown error has occurred" success=false

lol Any1 can help!!!!!!😂

vijaytholpadi commented 1 week ago

Running into the same issue.

When trying to directly download using a bundleID I am running into the issue:

ipatool download --bundle-identifier="com.herostuff.hero"

7:25PM ERR error="failed to reoslve the country code: country code mapping for store front () was not found" success=false

vijaytholpadi commented 1 week ago

Could be related to the login issue reported? here

hzlzh commented 1 week ago

same here with failed to reoslve the country code: country code mapping for store front () was not found and INF email= name=" " success=true

Imgkl commented 1 week ago

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this

{"name":" ","password":"$password","storefront": "143467"}

FlashTang commented 1 week ago

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this

{"name":" ","password":"$password","storefront": "143467"}

It wroks , thank you

hzlzh commented 1 week ago

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this

{"name":" ","password":"$password","storefront": "143467"}

Still not working, I have an account that is always

{"name":" ","password":"$password$"} or {"name":" ","password":"$password$","storefront": "143441"}

It should be like this below:

{"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"143441-1,34","password":"$password$"}

FlashTang commented 1 week ago

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this {"name":" ","password":"$password","storefront": "143467"}

Still not working, I have an account that is always

{"name":" ","password":"$password$"} or {"name":" ","password":"$password$","storefront": "143441"}

It should be like this below:

{"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"143441-1,34","password":"$password$"}

I can now search with this setting : {"name":" ","password":"$password$","storefront": "xxxxxx"} but failed to download: ERR error="received error: An unknown error has occurred" success=false

isaac960623 commented 1 week ago

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this {"name":" ","password":"$password","storefront": "143467"}

Still not working, I have an account that is always {"name":" ","password":"$password$"} or {"name":" ","password":"$password$","storefront": "143441"} It should be like this below: {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"143441-1,34","password":"$password$"}

I can now search with this setting : {"name":" ","password":"$password$","storefront": "xxxxxx"} but failed to download: ERR error="received error: An unknown error has occurred" success=false

same situation here, guessing this may be caused by apple API. By browsing the url: https://p25-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct?guid=DA8B6B69D626 directly

FlashTang commented 1 week ago

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this {"name":" ","password":"$password","storefront": "143467"}

Still not working, I have an account that is always {"name":" ","password":"$password$"} or {"name":" ","password":"$password$","storefront": "143441"} It should be like this below: {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"143441-1,34","password":"$password$"}

I can now search with this setting : {"name":" ","password":"$password$","storefront": "xxxxxx"} but failed to download: ERR error="received error: An unknown error has occurred" success=false

same situation here, guessing this may be caused by apple API. By browsing the url: https://p25-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct?guid=DA8B6B69D626 directly

Now with this setting : {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"xxxxxx","password":"$password$"}

ERR error="license is required" success=false So : ipatool purchase --bundle-identifier com.xx.xx ERR error="failed to purchase item with param 'STDQ': Account Not In This Store" success=false

maybe because directoryServicesIdentifier is wrong ? where can I find it ?

isaac960623 commented 1 week ago

143467 {"name":" ","storeFront":"143467","password":"Xx112211"}

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this {"name":" ","password":"$password","storefront": "143467"}

Still not working, I have an account that is always {"name":" ","password":"$password$"} or {"name":" ","password":"$password$","storefront": "143441"} It should be like this below: {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"143441-1,34","password":"$password$"}

I can now search with this setting : {"name":" ","password":"$password$","storefront": "xxxxxx"} but failed to download: ERR error="received error: An unknown error has occurred" success=false

same situation here, guessing this may be caused by apple API. By browsing the url: https://p25-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct?guid=DA8B6B69D626 directly

Now with this setting : {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"xxxxxx","password":"$password$"}

ERR error="license is required" success=false So : ipatool purchase --bundle-identifier com.xx.xx ERR error="failed to purchase item with param 'STDQ': Account Not In This Store" success=false

maybe because directoryServicesIdentifier is wrong ? where can I find it ?

It looks like the App you about to download can't be found in the Store region of this front store code you provide(just guessing lol)

Btw, how can you fill in the {passwordToken} and {directoryServicesIdentifier}, I can't get these two by login step

FlashTang commented 1 week ago

143467 {"name":" ","storeFront":"143467","password":"Xx112211"}

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this {"name":" ","password":"$password","storefront": "143467"}

Still not working, I have an account that is always {"name":" ","password":"$password$"} or {"name":" ","password":"$password$","storefront": "143441"} It should be like this below: {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"143441-1,34","password":"$password$"}

I can now search with this setting : {"name":" ","password":"$password$","storefront": "xxxxxx"} but failed to download: ERR error="received error: An unknown error has occurred" success=false

same situation here, guessing this may be caused by apple API. By browsing the url: https://p25-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct?guid=DA8B6B69D626 directly

Now with this setting : {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"xxxxxx","password":"$password$"} ERR error="license is required" success=false So : ipatool purchase --bundle-identifier com.xx.xx ERR error="failed to purchase item with param 'STDQ': Account Not In This Store" success=false maybe because directoryServicesIdentifier is wrong ? where can I find it ?

It looks like the App you about to download can't be found in the Store region of this front store code you provide(just guessing lol)

Btw, how can you fill in the {passwordToken} and {directoryServicesIdentifier}, I can't get these two by login step

Yes, I noticed the err mssage, but I'm ture the app exists in the storefront and the apple id I Iogined is in the correct region I found here https://github.com/majd/ipatool/blob/8a20cfcb1defae0581156e8ff90f2e6105b9d65b/pkg/appstore/store_front.go about passwordToken and directoryServicesIdentifier ,I dont know either, I just copied the one @hzlzh posted above, and I searched google :"directory Services Identifier" Screenshot 2024-10-24 at 15 07 48

Screenshot 2024-10-24 at 15 03 54 but I can't find it

isaac960623 commented 1 week ago

143467 {"name":" ","storeFront":"143467","password":"Xx112211"}

For those who are facing the issue related to storeFront not found. I was able to solve it. Go to Keychain Access -> search for "ipatool-auth.service" -> show password -> Check if the store front value is present in that json -> If not check your storefront ID on this file and add it. At the end the field should be like this {"name":" ","password":"$password","storefront": "143467"}

Still not working, I have an account that is always {"name":" ","password":"$password$"} or {"name":" ","password":"$password$","storefront": "143441"} It should be like this below: {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"143441-1,34","password":"$password$"}

I can now search with this setting : {"name":" ","password":"$password$","storefront": "xxxxxx"} but failed to download: ERR error="received error: An unknown error has occurred" success=false

same situation here, guessing this may be caused by apple API. By browsing the url: https://p25-buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/volumeStoreDownloadProduct?guid=DA8B6B69D626 directly

Now with this setting : {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"21134265614","name":"$name$","storeFront":"xxxxxx","password":"$password$"} ERR error="license is required" success=false So : ipatool purchase --bundle-identifier com.xx.xx ERR error="failed to purchase item with param 'STDQ': Account Not In This Store" success=false maybe because directoryServicesIdentifier is wrong ? where can I find it ?

It looks like the App you about to download can't be found in the Store region of this front store code you provide(just guessing lol) Btw, how can you fill in the {passwordToken} and {directoryServicesIdentifier}, I can't get these two by login step

Yes, I noticed the err mssage, but I'm ture the app exists in the storefront and the apple id I Iogined is in the correct region I found here https://github.com/majd/ipatool/blob/8a20cfcb1defae0581156e8ff90f2e6105b9d65b/pkg/appstore/store_front.go about passwordToken and directoryServicesIdentifier ,I dont know either, I just copied the one @hzlzh posted above, and I searched google :"directory Services Identifier" Screenshot 2024-10-24 at 15 07 48

Screenshot 2024-10-24 at 15 03 54 but I can't find it

pretty similar results with what I got. lol the DSID just like the unique id of Apple ID, so we should find a way to obtain it, and that should solve all the problems. BTW, the password token doesn't seem to affect the download request.

bmcloutier commented 5 days ago

I was able to successfully download. I did several things, so I'm not sure which resolved the issue. Here are the steps I took, maybe they'll help.

  1. Ran ipatool auth login using just email and password flags, then entered one-time code when prompted.
  2. Opened Keychain Access and edited ipatool-auth.service to use the following format: {"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"$DSID$","name":" ","password":"$password$","storefront":"$storeID$"} At this time I had copied the DSID from an earlier post, which didn't work.
  3. Navigated to ~/Library/Application Support/CloudDocs/ and opened account.1 to retrieve what I believe is my DSID
  4. Edited ipatool-auth.service again with my personal DSID It still didn't work, and now the error message told me to log into iTunes again.
  5. Ran ipatool auth revoke
  6. Ran ipatool auth login $token$ -e $mail$ -p $password$
  7. Ran ipatool download -b $appName$ And it worked! Now, my ipatool-auth.service looks like so: {"email":"$mail$","passwordToken":"$encryptedToken$","directoryServicesIdentifier":"$DSID$","name":"$name$","storeFront":"143441-1,34","password":"$password$"}
franciscogneto commented 13 hours ago

I was able to successfully download. I did several things, so I'm not sure which resolved the issue. Here are the steps I took, maybe they'll help.

1. Ran `ipatool auth login` using just email and password flags, then entered one-time code when prompted.

2. Opened Keychain Access and edited ipatool-auth.service to use the following format:
   `{"email":"$mail$","passwordToken":"$token$","directoryServicesIdentifier":"$DSID$","name":" ","password":"$password$","storefront":"$storeID$"}`
   At this time I had copied the DSID from an earlier post, which didn't work.

3. Navigated to ~/Library/Application Support/CloudDocs/ and opened account.1 to retrieve what I believe is my DSID

4. Edited ipatool-auth.service again with my personal DSID
   It still didn't work, and now the error message told me to log into iTunes again.

5. Ran `ipatool auth revoke`

6. Ran `ipatool auth login $token$ -e $mail$ -p $password$`

7. Ran `ipatool download -b $appName$`
   And it worked!
   Now, my ipatool-auth.service looks like so:
   `{"email":"$mail$","passwordToken":"$encryptedToken$","directoryServicesIdentifier":"$DSID$","name":"$name$","storeFront":"143441-1,34","password":"$password$"}`

I am new in IOS analysis, i am using windows, could you explain better ? I am not familiar with Keychain Access so i don't know where to find this in windows