245 Commits
Author SHA1 Message Date
Majd Alfhaily 747d66fc0a fix: enable update fallback for macos downloads v2.6.0 2026-09-13 23:52:03 +02:00
Majd Alfhaily 1ed3bf94dd feat: prompt for email during interactive login 2026-09-13 23:32:26 +02:00
Majd Alfhaily fb1ca3521b fix: keep authentication input inline and mask passwords 2026-09-13 23:24:08 +02:00
Majd Alfhaily ad88910ad6 feat: add ios builds for jailbroken devices 2026-09-13 23:08:40 +02:00
Majd Alfhaily c66d6537f4 fix: select macos packages for universal apps 2026-09-13 22:31:06 +02:00
Majd Alfhaily 7b4913a71c feat: include platforms in search results 2026-09-13 22:16:35 +02:00
Majd Alfhaily c4323e4c55 docs: simplify readme layout and usage 2026-09-13 22:07:38 +02:00
Majd Alfhaily 2aaf18b832 test: strengthen patch finalization regression coverage 2026-09-13 21:56:37 +02:00
leoca e3dea14461 fix: report zip finalization errors when applying patches 2026-09-13 21:56:37 +02:00
Majd Alfhaily dd28a3a9d8 fix: handle downloads without sinf data 2026-09-13 21:48:48 +02:00
Majd Alfhaily 5a47056bc3 fix: validate libc interpreter reads and cover detection fallbacks 2026-09-13 21:14:01 +02:00
rjvkn ba85241c88 fix: select the Unicorn artifact from the process libc, not the host
linuxUsesMusl globs the filesystem for a musl loader, which reports whether
the machine has musl available rather than whether this process runs on it.
glibc distributions package musl for cross compilation, so on such a host
the musllinux libunicorn is selected and dlopened into a glibc process.

That load succeeds, because the musl libc really is installed, and symbol
resolution then splits across both libcs: glibc exports __sigsetjmp but not
sigsetjmp, so libunicorn's sigsetjmp binds to musl and stores the jump
buffer unmangled, while siglongjmp binds to glibc and applies PTR_DEMANGLE
to it. The restored stack pointer and program counter come out
non-canonical, so the process dies with SIGSEGV (si_code SI_KERNEL) inside
cgo as soon as the SAP machine initializes.

Read PT_INTERP of /proc/self/exe instead, which names the loader this
process was linked against. Statically linked builds have no PT_INTERP and
keep the existing host probe.
2026-09-13 21:14:01 +02:00
Majd Alfhaily 394cd643de feat: support macos version metadata 2026-09-13 17:04:05 +02:00
Majd Alfhaily 62f1c8b435 feat: support macos in list-versions 2026-09-13 17:04:05 +02:00
Majd Alfhaily 5c522b685d fix: resolve macos versions before retrying downloads 2026-09-13 16:48:10 +02:00
Majd Alfhaily ba180d741d fix: include mac purchases and add platform filtering 2026-09-13 16:35:16 +02:00
Majd Alfhaily d1845ba678 fix: improve recovery from unexpected apple authentication responses 2026-09-13 15:19:45 +02:00
Majd Alfhaily a814a71a9f fix: preserve local zip timestamp metadata 2026-09-13 14:19:57 +02:00
Majd Alfhaily 843f5c6c29 fix: frame zip entries for ota installation 2026-09-13 13:46:34 +02:00
Majd Alfhaily b8bac296b8 feat: support xdg session storage with migration 2026-09-13 13:05:56 +02:00
Majd Alfhaily 24f93d332f chore: add github sponsors funding option 2026-09-13 12:50:16 +02:00
Majd Alfhaily e6acb9c3c2 fix: validate http responses before resuming downloads 2026-09-13 12:44:03 +02:00
dajiaohuang abdb5902cb fix: append resumed downloads without progress 2026-09-13 12:44:03 +02:00
Majd Alfhaily 91d4294085 feat: support purchasing apps by app id 2026-09-13 12:31:06 +02:00
Majd Alfhaily 73fabcc283 feat: include itunes artwork in downloaded ipa packages 2026-09-13 12:14:22 +02:00
Majd Alfhaily 30b2909231 fix: recover app store downloads with endpoint fallbacks 2026-09-13 11:28:44 +02:00
Majd Alfhaily a9bd16c9a2 fix: satisfy download test lint 2026-09-04 00:34:11 +02:00
Majd Alfhaily cee3674258 fix: handle ios apps available on macos 2026-09-04 00:34:11 +02:00
Majd Alfhaily 8f9748fa51 feat: add macos search and download support 2026-09-02 21:29:51 +02:00
Majd Alfhaily d5d0b56faf feat: add visionOS search and download support v2.5.0 2026-08-30 11:11:19 +02:00
Majd Alfhaily 30d19a6859 fix: retry transient authentication responses 2026-08-29 21:12:58 +02:00
Majd Alfhaily 27e8902d7e feat: add list purchases command 2026-08-29 16:21:32 +02:00
Majd Alfhaily acaf6c566e fix(keychain): trust credential creator 2026-08-29 15:15:09 +02:00
Majd Alfhaily 652b9d0083 fix(keychain): label stored credentials 2026-08-29 15:15:09 +02:00
Majd Alfhaily a53550f9c4 fix: handle sap guest timeouts 2026-08-29 00:26:00 +02:00
Jan S. 161888d240 feat: copying raw compressed ZIP entries during sinf replication (#506) 2026-08-29 00:05:57 +02:00
Majd Alfhaily abd86cb01a feat(auth): replace App Store login with SAP signing v2.4.0 2026-08-28 23:22:55 +02:00
AhmedBafkir 5f776fe2f5 fix: "An unknown error has occurred" FailureType 5002 (#500) 2026-08-28 18:34:06 +02:00
Majd Alfhailyandhorskin ab79e429d5 fix: fall back to legacy Store authentication (#514)
* fix: fall back to legacy Store authentication

* style: satisfy lint checks

---------

Co-authored-by: horskin <pkh_horskin@photons.com.tw>
v2.3.2
2026-08-03 09:58:15 +02:00
dependabot[bot] 9032d4c192 Bump golang.org/x/crypto from 0.51.0 to 0.52.0 (#509)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.51.0 to 0.52.0.
- [Commits](https://github.com/golang/crypto/compare/v0.51.0...v0.52.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.52.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-10 23:08:22 +02:00
dependabot[bot]andMajd Alfhaily 779a2e66cb Bump golang.org/x/net from 0.51.0 to 0.55.0 (#508)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.51.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.51.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Majd Alfhaily <majd@alfhaily.me>
v2.3.1
2026-07-05 12:46:54 +02:00
Vadim-B52 fd630343bc fix(auth): append trailing slash to native/fast authenticate endpoint (#507)
Apple's account bag now returns the authentication endpoint as
https://auth.itunes.apple.com/auth/v1/native/fast. That endpoint only
responds correctly when the path has a trailing slash; posting to it
without the slash makes Apple's edge return a 301/204 with an empty or
HTML body, so 'ipatool auth login' fails to parse the response and
silently dies (observed as the 'plist: unexpected hex digit' error or a
-5000 with no usable message).

Also improve http client diagnostics: when an XML response body is not a
property list, return 'unexpected response from Apple (HTTP <code>):
<snippet>' instead of the opaque plist parse error.
2026-07-05 12:41:37 +02:00
Rudra Sarkar dcddce4650 Fix 429 rate limit handling and context key type mismatch in login #480 (#481)
fix: handle 429 rate limit and context key type mismatch in login issue #480
2026-05-26 06:21:29 +02:00
Lakr a3fa2f09b3 feat: add tvOS app search and download support (#478) 2026-05-25 13:19:30 +02:00
Majd Alfhaily 85ae82d9c4 chore(repo): delete .github/FUNDING.yml (#475) 2026-05-05 21:23:37 +00:00
Majd Alfhaily 1bee8bc568 chore(repo): remove Patreon funding option (#474) 2026-05-02 16:21:27 +02:00
Majd Alfhaily abaeccefec feat: perform partial zip reads for extracting version and release date (#472) 2026-05-02 12:11:12 +02:00
Majd Alfhailyandliqiang 8c4e037aa3 fix: close ZIP entry readers during replication (#469)
Co-authored-by: liqiang <1573335865@qq.com>
2026-04-16 18:42:55 +00:00
4142ab48ad feat: use auth endpoint from Bag on retries (#468)
* Fix purchase retry to resolve auth endpoint via Bag() before re-login

The retry logic in purchase, download, get-version-metadata, and
list-versions called Login() without an Endpoint when re-authenticating
after a password token expiry. This caused silent failures because the
auth endpoint was empty.

- Add Bag() call before Login() in all retry blocks to resolve the auth
  endpoint dynamically
- Fall back to hardcoded auth endpoint when bag.xml omits
  authenticateAccount
- Detect "Your password has changed." customer message as a token expiry
  trigger alongside failure type 2034
- Increase download retry attempts to 3 to handle license-required then
  token-expired chain

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address PR review: make auth path constant consistent, add password-changed test

- Rename PrivateAppStoreAPIPathAuthenticate to store only the path
  (consistent with other *APIPath* constants), constructing the full
  URL in the Bag() fallback
- Add test for CustomerMessagePasswordChanged triggering
  ErrPasswordTokenExpired in purchaseWithParams

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix purchase "already purchased" detection for Apple API changes

Apple now returns HTTP 200 with FailureType "5002" for already-purchased
apps instead of HTTP 500. Also treat FailureType "1008" (device
verification failed) as a stale token that triggers re-authentication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix download retry to handle new Apple failure types (5002, 1008)

Map FailureType "5002" (license already exists) and "1008" (device
verification failed) to ErrPasswordTokenExpired in the download flow,
triggering re-auth retry consistent with the purchase fix in 438e8e8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix zip corruption on re-download when .ipa already exists

applyPatches opened the destination file with O_CREATE|O_WRONLY but no
O_TRUNC. On re-download, the existing .ipa (which includes sinf data
from ReplicateSinf) is larger than what applyPatches writes (zip entries
+ metadata, no sinf yet). The leftover bytes at the end corrupt the ZIP
end-of-central-directory record, causing ReplicateSinf's zip.OpenReader
to fail with "failed to open zip reader".

Fix: add O_TRUNC to truncate the file before writing, and add a missing
defer dstFile.Close() to prevent file descriptor leaks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Treat "license already exists" as success in purchase and download

When the user already owns an app, purchase should report success
(with alreadyOwned=true) instead of failing with an error. Applied
to both the standalone purchase command and the --purchase flag in
the download command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove Bag() fallback in retry paths, use DefaultAuthEndpoint directly

The bag response from init.itunes.apple.com/bag.xml does not contain
an authenticateAccount key, so the fallback was firing 100% of the time.
Replace the Bag()+Login() pattern in retry paths with Login() using a
DefaultAuthEndpoint constant directly, avoiding an unnecessary network
round-trip. The cmd/auth.go login flow still uses Bag() as before.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use bag auth endpoint for retry login

---------

Co-authored-by: Barnabas Birmacher <birmacher@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 18:23:09 +00:00
Majd AlfhailyandBasil 1858ad7a72 chore(deps): update keyring module to maintained fork (#466)
Co-authored-by: Basil <basil@basil.cafe>
2026-04-14 20:39:55 +02:00