Compare commits

...
9 changed files with 125 additions and 6 deletions

No files matched your search

+4 -2
View File
@@ -21,7 +21,9 @@ jobs:
go-version: '1.19.3'
cache: true
- run: ./tools/version.sh
- run: go build -o ipatool-${{ matrix.os }}
- run: go build -o ipatool-${{ matrix.os }}-${{ matrix.arch }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
GOARCH: ${{ matrix.arch }}
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
+2
View File
@@ -23,6 +23,8 @@ jobs:
- run: go build -o ipatool-${{ matrix.os }}
env:
GOOS: ${{ matrix.os }}
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
- uses: actions/upload-artifact@v2
with:
name: ipatool-${{ matrix.os }}
+2
View File
@@ -45,6 +45,8 @@ jobs:
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
- id: output
run: echo ::set-output name=file::ipatool-${{ needs.get_version.outputs.version }}-${GOOS//darwin/macos}-$GOARCH
env:
+99
View File
@@ -0,0 +1,99 @@
## Changelog
### Version [1.1.4](https://github.com/majd/ipatool/releases/tag/v1.1.4)
- Add support for patching old code signature revisions as a fallback mechanism.
---
### Version [1.1.3](https://github.com/majd/ipatool/releases/tag/v1.1.3)
- Fixed keychain access on iOS.
---
### Version [1.1.2](https://github.com/majd/ipatool/releases/tag/v1.1.2)
- Improved error message for expired token.
- Disabled print buffering and output errors to stderr.
- Added linter.
- Add support for running on iOS.
---
### Version [1.1.1](https://github.com/majd/ipatool/releases/tag/v1.1.1)
- Update swift-argument-parser dependency.
- Remove usage of Swift concurrency.
- Add backward-compatibility for macOS 10.11+.
---
### Version [1.1.0](https://github.com/majd/ipatool/releases/tag/v1.1.0)
- Added support for purchasing apps.
- Implemented auth command.
- Implemented purchase command.
- Implemented --purchase flag in download command.
- Added price checks for purchase flow.
---
### Version [1.0.9](https://github.com/majd/ipatool/releases/tag/v1.0.9)
- Fixed building for older macOS versions.
- Fixed 2FA code not being requested.
---
### Version [1.0.8](https://github.com/majd/ipatool/releases/tag/v1.0.8)
- Added --output option to the download command for specifying the destination path for the downloaded app package.
---
### Version [1.0.7](https://github.com/majd/ipatool/releases/tag/v1.0.7)
- Fixed login requests to the store API when the 2FA code is required.
---
### Version [1.0.6](https://github.com/majd/ipatool/releases/tag/v1.0.6)
- Added support for supplying 2FA code in non-interactive sessions.
---
### Version [1.0.5](https://github.com/majd/ipatool/releases/tag/v1.0.5)
- Added support for specifying device family.
---
### Version [1.0.4](https://github.com/majd/ipatool/releases/tag/v1.0.4)
- Added support for specifying the iTunes Store region.
---
### Version [1.0.3](https://github.com/majd/ipatool/releases/tag/v1.0.3)
- Improved console logging.
---
### Version [1.0.2](https://github.com/majd/ipatool/releases/tag/v1.0.2)
- Improved error messages.
---
### Version [1.0.1](https://github.com/majd/ipatool/releases/tag/v1.0.1)
- Grammatical fixes.
---
### Version [1.0.0](https://github.com/majd/ipatool/releases/tag/v1.0.0)
- Initial release.
+1
View File
@@ -14,6 +14,7 @@
- [Usage](#usage)
- [Compiling](#compiling)
- [License](#license)
- [Changelog](https://github.com/majd/ipatool/blob/main/CHANGELOG.md)
- [FAQ](https://github.com/majd/ipatool/wiki/FAQ)
## Requirements
+6 -2
View File
@@ -69,12 +69,16 @@ func newKeyring(logger log.Logger, passphrase string, interactive bool) (keyring
path := strings.Split(s, " unlock ")[1]
logger.Log().Msgf("enter passphrase to unlock %s (this is separate from your Apple ID password): ", path)
password, err := term.ReadPassword(int(os.Stdin.Fd()))
bytes, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return "", errors.Wrap(err, "failed to read password")
}
return string(password), nil
password := string(bytes)
password = strings.Trim(password, "\n")
password = strings.Trim(password, "\r")
return password, nil
},
})
if err != nil {
+6
View File
@@ -174,6 +174,12 @@ func (a *appstore) downloadFile(dst, sourceURL string) (err error) {
return errors.Wrap(err, ErrOpenFile.Error())
}
defer func() {
if closeErr := file.Close(); closeErr != err && err == nil {
err = closeErr
}
}()
sizeMB := float64(res.ContentLength) / (1 << 20)
a.logger.Verbose().Str("size", fmt.Sprintf("%.2fMB", sizeMB)).Msg("downloading")
+4 -1
View File
@@ -171,7 +171,10 @@ func (a *appstore) promptForAuthCode() (string, error) {
return "", errors.Wrap(err, ErrGetData.Error())
}
return strings.Trim(authCode, "\n"), nil
authCode = strings.Trim(authCode, "\n")
authCode = strings.Trim(authCode, "\r")
return authCode, nil
}
func (*appstore) authDomain(authCode, guid string) string {
+1 -1
View File
@@ -78,7 +78,7 @@ func (c *client[R]) Send(req Request) (Result[R], error) {
}
func (c *client[R]) Do(req *http.Request) (*http.Response, error) {
return c.internalClient.Do(req)
return http.DefaultClient.Do(req)
}
func (*client[R]) NewRequest(method, url string, body io.Reader) (*http.Request, error) {