Skip to content

Issues with Downloading Applications Using ipatool on Kali Linux #333

@Kali-Lucy

Description

@Kali-Lucy

What happened?

Hello everyone,

I'm currently trying to use ipatool on Kali Linux, but I'm facing difficulties with downloading applications. I have successfully authenticated and can perform searches without any issues; however, the problem arises during the download process.

I searched for similar cases here but couldn't find any. Below, I’ve included some images and command outputs to help explain the issue:
Just to demonstrate that the tool is partially functioning. When I execute a search, for example:

./ipatool search Forbes

I receive the expected results:

Image

Image

Now, onto the core issue.

When I execute a download:

./ipatool download --bundle-identifier com.magappzine.forbesmagazine

I got this:

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

However, no requests were captured in my Burp monitoring. And since I know very little about GO, I also sought assistance from ChatGPT, where I was advised to run the following command:

go test -v ./...

which resulted in:

go: downloading github.com/onsi/ginkgo/v2 v2.5.0
go: downloading github.com/onsi/gomega v1.24.0
go: downloading go.uber.org/mock v0.4.0
go: downloading github.com/google/go-cmp v0.5.9
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading golang.org/x/text v0.14.0
go: downloading github.com/go-logr/logr v1.2.3
?       github.com/majd/ipatool/v2      [no test files]
?       github.com/majd/ipatool/v2/cmd  [no test files]
# github.com/majd/ipatool/v2/pkg/keychain [github.com/majd/ipatool/v2/pkg/keychain.test]
pkg/keychain/keychain_get_test.go:16:16: undefined: MockKeyring
pkg/keychain/keychain_get_test.go:21:17: undefined: NewMockKeyring
pkg/keychain/keychain_remove_test.go:15:16: undefined: MockKeyring
pkg/keychain/keychain_remove_test.go:20:17: undefined: NewMockKeyring
pkg/keychain/keychain_set_test.go:16:16: undefined: MockKeyring
pkg/keychain/keychain_set_test.go:21:17: undefined: NewMockKeyring
# github.com/majd/ipatool/v2/pkg/log [github.com/majd/ipatool/v2/pkg/log.test]
pkg/log/logger_test.go:14:15: undefined: MockWriter
pkg/log/logger_test.go:20:16: undefined: NewMockWriter
pkg/log/writer_test.go:13:21: undefined: MockWriter
pkg/log/writer_test.go:14:21: undefined: MockWriter
pkg/log/writer_test.go:20:22: undefined: NewMockWriter
pkg/log/writer_test.go:21:22: undefined: NewMockWriter
# github.com/majd/ipatool/v2/pkg/util/machine [github.com/majd/ipatool/v2/pkg/util/machine.test]
pkg/util/machine/machine_test.go:22:28: undefined: operatingsystem.MockOperatingSystem
pkg/util/machine/machine_test.go:27:28: undefined: operatingsystem.NewMockOperatingSystem
# github.com/majd/ipatool/v2/pkg/http [github.com/majd/ipatool/v2/pkg/http.test]
pkg/http/client_test.go:26:18: undefined: MockCookieJar
pkg/http/client_test.go:31:19: undefined: NewMockCookieJar
# github.com/majd/ipatool/v2/pkg/appstore [github.com/majd/ipatool/v2/pkg/appstore.test]
pkg/appstore/appstore_account_info_test.go:17:26: undefined: keychain.MockKeychain
pkg/appstore/appstore_account_info_test.go:22:27: undefined: keychain.NewMockKeychain
pkg/appstore/appstore_download_test.go:25:32: undefined: keychain.MockKeychain
pkg/appstore/appstore_download_test.go:26:28: undefined: http.MockClient
pkg/appstore/appstore_download_test.go:27:28: undefined: http.MockClient
pkg/appstore/appstore_download_test.go:28:28: undefined: http.MockClient
pkg/appstore/appstore_download_test.go:29:28: undefined: http.MockClient
pkg/appstore/appstore_download_test.go:30:39: undefined: operatingsystem.MockOperatingSystem
pkg/appstore/appstore_download_test.go:31:31: undefined: machine.MockMachine
pkg/appstore/appstore_download_test.go:37:27: undefined: keychain.NewMockKeychain
pkg/appstore/appstore_download_test.go:37:27: too many errors
FAIL    github.com/majd/ipatool/v2/pkg/http [build failed]
FAIL    github.com/majd/ipatool/v2/pkg/log [build failed]
FAIL    github.com/majd/ipatool/v2/pkg/keychain [build failed]
FAIL    github.com/majd/ipatool/v2/pkg/appstore [build failed]
FAIL    github.com/majd/ipatool/v2/pkg/util/machine [build failed]
=== RUN   TestUtil
Running Suite: Util Suite - /home/luciela/mobile/ipatool-2.1.4/pkg/util
============================================================================
Random Seed: 1737146806

Will run 6 of 6 specs
••••••

Ran 6 of 6 Specs in 0.000 seconds
SUCCESS! -- 6 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestUtil (0.00s)
PASS
ok      github.com/majd/ipatool/v2/pkg/util     0.003s
=== RUN   TestOS
Running Suite: OperatingSystem Suite - /home/luciela/mobile/ipatool-2.1.4/pkg/util/operatingsystem
=======================================================================================================
Random Seed: 1737146806

Will run 8 of 8 specs
••••••••

Ran 8 of 8 Specs in 0.001 seconds
SUCCESS! -- 8 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestOS (0.00s)
PASS
ok      github.com/majd/ipatool/v2/pkg/util/operatingsystem     0.005s
FAIL

I noticed that some things failed, but I didn't know what to do next based on that response. Turning to ChatGPT again, I was instructed to run the following command:

go test -v ./ipatool download --bundle-identifier com.magappzine.forbesmagazine

and the result was:

Image

And listing the directory /usr/local/go/src/ contents, there is indeed no folder named 'download'

Image

Any suggestions on what might be causing the issue?
I appreciate any and all help in advance!

  • running GO version go1.23.5 linux/amd64 if it's relevant.

Version

2.1.4

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions