download

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 58 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppleDBRepoURL is the URL to the AppleDB github repo
	AppleDBRepoURL = "https://github.com/littlebyteorg/appledb"
	AppleDBGitURL  = "https://github.com/littlebyteorg/appledb.git"
	ApiContentsURL = "https://api.github.com/repos/littlebyteorg/appledb/contents/"
)
View Source
const (

	// AppStoreSearchLimit is the maximum number of results returned by the App Store search API
	AppStoreSearchLimit = 200

	ErrLoginRequires2fa             = "MZFinance.BadLogin.Configurator_message"
	FailureTypeInvalidCredentials   = "-5000"
	FailureTypeUnknownError         = "5002"
	FailureTypePasswordTokenExpired = "2034"
	FailureTypeLicenseNotFound      = "9610"
)
View Source
const (
	ERROR_CODE_TOO_MANY_CODES_SENT      = -22981 // Too many verification codes have been sent.
	ERROR_CODE_BAD_CREDS                = -20101 // Your Apple ID or password was incorrect.
	ERROR_CODE_FAILED_TO_UPDATE_SESSION = -20528 // Error Description not available
	ERROR_CODE_BAD_VERIFICATION         = -21669 // Incorrect verification code.

)
View Source
const (
	VaultName           = "ipsw-vault"
	AppName             = "io.blacktop.ipsw"
	KeychainServiceName = "ipsw-auth.service"
)
View Source
const (
	XcodeDlURL = "https://storage.googleapis.com/xcodes-cache"
)

Variables

This section is empty.

Functions

func AppleOssGraphQLTags

func AppleOssGraphQLTags(proxy string, insecure bool, apikey string) (map[string]GithubTag, error)

AppleOssGraphQLTags returns a list of apple-oss-distributions tags from the Github GraphQL API

func CreateWikiFilter

func CreateWikiFilter(cfg *WikiConfig) string

func FilterIpswURLs

func FilterIpswURLs(urls []string, device, version, build string) []string

func GenerateDeviceMap

func GenerateDeviceMap(urls []string)

func GetBuildID

func GetBuildID(version, identifier string) (string, error)

GetBuildID returns the BuildID for a given version and identifier

func GetIpswDB

func GetIpswDB(proxy string, insecure bool) (*info.Devices, error)

GetIpswDB pulls the most up-to-date ipsw_db.json from the repo

func GetLatestTag

func GetLatestTag(prod, proxy string, insecure bool, api string) (string, error)

func GetPreprocessedAppleOssTags

func GetPreprocessedAppleOssTags(proxy string, insecure bool) (map[string]GithubTag, error)

GetPreprocessedAppleOssTags returns a list of preprocessed apple oss tags

func GetProxy

func GetProxy(proxy string) func(*http.Request) (*url.URL, error)

GetProxy takes either an input string or read the enviornment and returns a proxy function

func GetRandomResearcher

func GetRandomResearcher() string

GetRandomResearcher returns a random iOS Vulnerability Researcher

func GetVersion

func GetVersion(buildID string) (string, error)

GetVersion returns the iOS version for a given build ID

func NewRemoteZipReader

func NewRemoteZipReader(zipURL string, config *RemoteConfig) (*zip.Reader, error)

NewRemoteZipReader returns a new remote zip file reader

func ParseIpswURLString

func ParseIpswURLString(url string) (string, string, string)

func QueryXcodeReleasesAPI

func QueryXcodeReleasesAPI(name string) (string, error)

QueryXcodeReleasesAPI queries the xcodereleases.com API for the XCode Name

func ScrapeIPSWs

func ScrapeIPSWs(beta bool) ([]string, error)

func ScrapeKeys

func ScrapeKeys(version string) (map[string]map[string]map[string]string, error)

ScrapeKeys will scrape the iPhone Wiki for firmware keys

func ScrapeOTAs

func ScrapeOTAs(beta bool) ([]string, error)

func ScrapeURLs

func ScrapeURLs(build string) (map[string]BetaIPSW, error)

ScrapeURLs will scrape the iPhone Wiki for beta firmwares

Types

type ADBQuery

type ADBQuery struct {
	OSes      []string
	Version   string
	Build     string
	Device    string
	IsBeta    bool
	Latest    bool
	Proxy     string
	Insecure  bool
	APIToken  string
	ConfigDir string
}

type App

type App struct {
	ID             int     `json:"trackId,omitempty"`
	BundleID       string  `json:"bundleId,omitempty"`
	Name           string  `json:"trackName,omitempty"`
	SellerURL      string  `json:"sellerUrl,omitempty"`
	SellerName     string  `json:"sellerName,omitempty"`
	Version        string  `json:"version,omitempty"`
	ReleaseDate    string  `json:"currentVersionReleaseDate,omitempty"`
	Price          float64 `json:"price,omitempty"`
	FormattedPrice string  `json:"formattedPrice,omitempty"`
	Size           string  `json:"fileSizeBytes,omitempty"`
	Rating         float64 `json:"averageUserRating,omitempty"`
	RatingCount    int     `json:"userRatingCount,omitempty"`
	ArtworkUrl     string  `json:"artworkUrl512,omitempty"`
}

type AppStore

type AppStore struct {
	Client *http.Client

	Vault keyring.Keyring
	// contains filtered or unexported fields
}

func NewAppStore

func NewAppStore(config *AppStoreConfig) *AppStore

NewAppStore returns a AppStore instance

func (*AppStore) Download

func (as *AppStore) Download(bundleID, output string) error

func (*AppStore) Init

func (as *AppStore) Init() (err error)

Init AppStore

func (*AppStore) Login

func (as *AppStore) Login(username, password string) error

func (*AppStore) Lookup

func (as *AppStore) Lookup(bundleID string) (*App, error)

func (*AppStore) Purchase

func (as *AppStore) Purchase(bundleID string) error

func (*AppStore) Search

func (as *AppStore) Search(searchTerm string, limit int) (Apps, error)

type AppStoreConfig

type AppStoreConfig struct {
	// download config
	Proxy    string
	Insecure bool
	// behavior config
	SkipAll      bool
	ResumeAll    bool
	RestartAll   bool
	RemoveCommas bool
	PreferSMS    bool
	PageSize     int
	Verbose      bool
	// extra config
	StoreFront    string
	VaultPassword string
	ConfigDir     string
}

type AppleAccountAuth

type AppleAccountAuth struct {
	Credentials      credentials `json:"credentials,omitempty"`
	DevPortalSession session     `json:"devport_session,omitempty"`
	AppStoreSession  session     `json:"appstore_session,omitempty"`
}

type AppleDbOsFile

type AppleDbOsFile struct {
	OS        string         `json:"osStr"`
	Version   string         `json:"version"`
	Build     string         `json:"build"`
	Released  ReleasedDate   `json:"released"`
	Beta      bool           `json:"beta"`
	DeviceMap []string       `json:"deviceMap"`
	Sources   []OsFileSource `json:"sources"`
}

AppleDbOsFiles is an AppleDB osFiles object

type Apps

type Apps []App

type AssetAudienceID

type AssetAudienceID struct {
	Release  string `json:"release"`
	Generic  string `json:"generic"`
	Versions map[string]struct {
		DeveloperBeta string `json:"developer-beta,omitempty"`
		AppleSeedBeta string `json:"appleseed-beta,omitempty"`
		PublicBeta    string `json:"public-beta,omitempty"`
	}
}

AssetAudienceID is an OTA asset audience ID

type AssetAudienceIDs

type AssetAudienceIDs map[string]AssetAudienceID

AssetAudienceIDs is a collection of OTA asset audience IDs

func GetAssetAudienceIDs

func GetAssetAudienceIDs() (AssetAudienceIDs, error)

func (AssetAudienceIDs) GetVersions

func (a AssetAudienceIDs) GetVersions(platform string) []string

func (AssetAudienceIDs) LatestVersion

func (a AssetAudienceIDs) LatestVersion(platform string) string

type AssetSet

type AssetSet struct {
	ProductVersion   string   `json:"ProductVersion,omitempty"`
	PostingDate      string   `json:"PostingDate,omitempty"`
	ExpirationDate   string   `json:"ExpirationDate,omitempty"`
	SupportedDevices []string `json:"SupportedDevices,omitempty"`
}

type AssetSets

type AssetSets struct {
	PublicAssetSets map[string][]AssetSet `json:"PublicAssetSets,omitempty"`
	AssetSets       map[string][]AssetSet `json:"AssetSets,omitempty"`
}

func GetAssetSets

func GetAssetSets(proxy string, insecure bool) (*AssetSets, error)

GetAssetSets queries and returns the asset sets

func (*AssetSets) ForDevice

func (a *AssetSets) ForDevice(device string) []AssetSet

ForDevice returns the assets for a given device

func (*AssetSets) GetDevicesForVersion

func (a *AssetSets) GetDevicesForVersion(version string, typ string) []string

GetDevicesForVersion returns the supported devices for a given OS version

func (*AssetSets) LatestVersion

func (a *AssetSets) LatestVersion(typ, platform string) string

LatestVersion returns the newest released version

type BetaIPSW

type BetaIPSW struct {
	Devices []string `json:"devices,omitempty"`
	Version string   `json:"version,omitempty"`
	BuildID string   `json:"buildid,omitempty"`
}

BetaIPSW object

type Build

type Build struct {
	Identifier   string `json:"identifier,omitempty"`
	BuildID      string `json:"build_version,omitempty"`
	URL          string `json:"firmware_url,omitempty"`
	FirmwareSHA1 string `json:"firmware_sha1,omitempty"`
	Version      string `json:"product_version,omitempty"`
}

Build object

func UniqueBuilds

func UniqueBuilds(b []Build) []Build

UniqueBuilds returns a slice with Builds with unique FirmwareURLs

type BuildInformation

type BuildInformation struct {
	Restore              *IndividualBuild
	Update               *IndividualBuild
	SameAs               string
	OfferRestoreAsUpdate bool
}

BuildInformation object

type BuildKeys

type BuildKeys map[string]Keys

type BuildNumber

type BuildNumber string

BuildNumber object

type Catalog

type Catalog struct {
	CatalogVersion int
	ApplePostURL   string
	IndexDate      time.Time
	Products       map[string]Product
}

type Commit

type Commit struct {
	OID          githubv4.GitObjectID `json:"oid"`
	URL          githubv4.URI         `graphql:"commitUrl" json:"url"`
	ChangedFiles githubv4.Int         `graphql:"changedFilesIfAvailable" json:"changed_files"`
	Additions    githubv4.Int         `json:"additions"`
	Deletions    githubv4.Int         `json:"deletions"`
	MsgHeadline  githubv4.String      `graphql:"messageHeadline" json:"message_headline"`
	Message      githubv4.String      `graphql:"message" json:"-"`
	MsgBody      githubv4.String      `graphql:"messageBody" json:"message_body"`
	Author       struct {
		Name  githubv4.String       `json:"name,omitempty"`
		Email githubv4.String       `json:"email,omitempty"`
		Date  githubv4.GitTimestamp `json:"date,omitempty"`
	} `json:"author"`
	ZipballURL string `json:"zipballUrl"`
	TarballURL string `json:"tarballUrl"`
}

Commit represents a GitHub GraphQL Commit

func GetGithubCommits

func GetGithubCommits(org, repo, branch, file, pattern string, days int, proxy string, insecure bool, apikey string) ([]Commit, error)

GetGithubCommits returns a list of commits for a given pattern

type Contents

type Contents struct {
	Key            string
	Generation     int64
	MetaGeneration int
	Size           int64
	ETag           string
	LastModified   time.Time
}

type DVTDownloadable

type DVTDownloadable struct {
	Downloadables          []Downloadable `plist:"downloadables,omitempty"`
	SdkToSimulatorMappings []struct {
		SdkBuildUpdate       string `plist:"sdkBuildUpdate,omitempty"`
		SimulatorBuildUpdate string `plist:"simulatorBuildUpdate,omitempty"`
		SdkIdentifier        string `plist:"sdkIdentifier,omitempty"`
	} `plist:"sdkToSimulatorMappings,omitempty"`
	SdkToSeedMappings []struct {
		BuildUpdate string `plist:"buildUpdate,omitempty"`
		Platform    string `plist:"platform,omitempty"`
		SeedNumber  int    `plist:"seedNumber,omitempty"`
	} `plist:"sdkToSeedMappings,omitempty"`
	RefreshInterval int    `plist:"refreshInterval,omitempty"`
	Version         string `plist:"version,omitempty"`
}

DVTDownloadable is the struct for the dvtdownloadableindex plist

func GetDVTDownloadableIndex

func GetDVTDownloadableIndex() (*DVTDownloadable, error)

GetDVTDownloadableIndex returns the DVTDownloadableIndex plist

type DevConfig

type DevConfig struct {
	// Login session
	SessionID string
	SCNT      string
	WidgetKey string
	// hashcash
	HashCash          string
	HashCashBits      string
	HashCashChallenge string
	// download config
	Proxy    string
	Insecure bool
	// download type config
	WatchList []string
	// behavior config
	SkipAll       bool
	ResumeAll     bool
	RestartAll    bool
	RemoveCommas  bool
	PreferSMS     bool
	PageSize      int
	Verbose       bool
	VaultPassword string
	ConfigDir     string
}

type DevDownload

type DevDownload struct {
	Title string `json:"title,omitempty"`
	Build string `json:"build,omitempty"`
	URL   string `json:"url,omitempty"`
	Type  string `json:"type,omitempty"`
}

DevDownload are all the downloads from https://developer.apple.com/download/

type DevPortal

type DevPortal struct {
	Client *http.Client

	Vault keyring.Keyring
	// contains filtered or unexported fields
}

DevPortal is the dev portal object

func NewDevPortal

func NewDevPortal(config *DevConfig) *DevPortal

NewDevPortal returns a new DevPortal instance

func (*DevPortal) Download

func (dp *DevPortal) Download(url, folder string) error

Download downloads a file that requires a valid dev portal session

func (*DevPortal) DownloadADC

func (dp *DevPortal) DownloadADC(adcURL string) error

DownloadADC downloads an ADC file that requires a valid ADCDownloadAuth cookie, but not full dev portal session auth

func (*DevPortal) DownloadKDK

func (dp *DevPortal) DownloadKDK(version, build, folder string) error

func (*DevPortal) DownloadPrompt

func (dp *DevPortal) DownloadPrompt(downloadType, folder string) error

DownloadPrompt prompts the user for which files to download from https://developer.apple.com/download

func (*DevPortal) GetDownloadsAsJSON

func (dp *DevPortal) GetDownloadsAsJSON(downloadType string, pretty bool) ([]byte, error)

func (*DevPortal) GetHashcash

func (dp *DevPortal) GetHashcash() string

func (*DevPortal) GetSCNT

func (dp *DevPortal) GetSCNT() string

func (*DevPortal) GetSessionID

func (dp *DevPortal) GetSessionID() string

func (*DevPortal) GetWidgetKey

func (dp *DevPortal) GetWidgetKey() string

func (*DevPortal) Init

func (dp *DevPortal) Init() (err error)

Init DevPortal sets up the DevPortal vault

func (*DevPortal) Login

func (dp *DevPortal) Login(username, password string) error

Login to Apple

func (*DevPortal) Watch

func (dp *DevPortal) Watch(ctx context.Context, downloadType, folder string, duration time.Duration) error

Watch watches for NEW downloads

type Device

type Device struct {
	Name        string `json:"name,omitempty"`
	Identifier  string `json:"identifier,omitempty"`
	BoardConfig string `json:"boardconfig,omitempty"`
	Platform    string `json:"platform,omitempty"`
	CpID        int    `json:"cpid,omitempty"`
	BdID        int    `json:"bdid,omitempty"`
	Firmwares   []IPSW `json:"firmwares,omitempty"`
}

Device struct

func GetAllDevices

func GetAllDevices() ([]Device, error)

GetAllDevices returns a list of all devices

func GetDevice

func GetDevice(identifier string) (Device, error)

GetDevice returns a device from it's identifier

type DeviceKeys

type DeviceKeys map[string]BuildKeys

type Download

type Download struct {
	URL      string
	Sha1     string
	DestName string
	Headers  map[string]string
	// contains filtered or unexported fields
}

Download is a downloader object

func NewDownload

func NewDownload(proxy string, insecure, skipAll, resumeAll, restartAll, ignoreSha1, verbose bool) *Download

NewDownload creates a new downloader

func (*Download) Do

func (d *Download) Do() error

Do will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory. We pass an io.TeeReader into Copy() to report progress on the download.

type Downloadable

type Downloadable struct {
	Authentication    string `plist:"authentication,omitempty"`
	Category          string `plist:"category,omitempty"`
	ContentType       string `plist:"contentType,omitempty"`
	DictionaryVersion int    `plist:"dictionaryVersion,omitempty"`
	FileSize          int64  `plist:"fileSize,omitempty"`
	HostRequirements  struct {
		ExcludedHostArchitectures []string `plist:"excludedHostArchitectures,omitempty"`
		MaxHostVersion            string   `plist:"maxHostVersion,omitempty"`
		MinHostVersion            string   `plist:"minHostVersion,omitempty"`
		MinXcodeVersion           string   `plist:"minXcodeVersion,omitempty"`
	} `plist:"hostRequirements,omitempty"`
	Identifier       string `plist:"identifier,omitempty"`
	Name             string `plist:"name,omitempty"`
	Platform         string `plist:"platform,omitempty"`
	SimulatorVersion struct {
		BuildUpdate string `plist:"buildUpdate,omitempty"`
		Version     string `plist:"version,omitempty"`
	} `plist:"simulatorVersion,omitempty"`
	Source  string `plist:"source,omitempty"`
	Version string `plist:"version,omitempty"`
}

type Downloads

type Downloads struct {
	CreationTimestamp   time.Time `json:"creationTimestamp,omitempty"`
	ResultCode          int       `json:"resultCode,omitempty"`
	UserLocale          string    `json:"userLocale,omitempty"`
	ProtocolVersion     string    `json:"protocolVersion,omitempty"`
	RequestURL          string    `json:"requestUrl,omitempty"`
	ResponseID          string    `json:"responseId,omitempty"`
	HTTPResponseHeaders struct {
		SetCookie string `json:"Set-Cookie,omitempty"`
	} `json:"httpResponseHeaders,omitempty"`
	Downloads []MoreDownload
}

Downloads listDownloads.action response

type ExtendedMetaInfo

type ExtendedMetaInfo struct {
	InstallAssistantPackageIdentifiers map[string]string
}

type GithubCommit

type GithubCommit struct {
	SHA  string    `json:"sha,omitempty"`
	URL  string    `json:"url,omitempty"`
	Date time.Time `json:"date,omitempty"`
}

type GithubContentsResponse

type GithubContentsResponse struct {
	Type        string `json:"type"`
	Encoding    string `json:"encoding"`
	Size        int    `json:"size"`
	Name        string `json:"name"`
	Path        string `json:"path"`
	Content     string `json:"content"`
	Sha         string `json:"sha"`
	URL         string `json:"url"`
	GitURL      string `json:"git_url"`
	HTMLURL     string `json:"html_url"`
	DownloadURL string `json:"download_url"`
	Links       struct {
		Git  string `json:"git"`
		Self string `json:"self"`
		HTML string `json:"html"`
	} `json:"_links"`
}

GithubContentsResponse is the response from the GET /repos/{owner}/{repo}/contents/{path} github api

type GithubReleaseAsset

type GithubReleaseAsset struct {
	ID            int       `json:"id,omitempty"`
	Name          string    `json:"name,omitempty"`
	URL           string    `json:"url,omitempty"`
	DownloadURL   string    `json:"browser_download_url,omitempty"`
	Size          int       `json:"size,omitempty"`
	DownloadCount int       `json:"download_count,omitempty"`
	CreatedAt     time.Time `json:"created_at,omitempty"`
	UpdatedAt     time.Time `json:"updated_at,omitempty"`
}

func (GithubReleaseAsset) String

func (a GithubReleaseAsset) String() string

type GithubReleases

type GithubReleases []githubRelease

func GetGithubIPSWReleases

func GetGithubIPSWReleases(proxy string, insecure bool, api string) (GithubReleases, error)

GetGithubIPSWReleases returns the list of releases for `ipsw`

type GithubRepos

type GithubRepos []githubRepo

type GithubTag

type GithubTag struct {
	Name   string       `json:"name,omitempty"`
	TarURL string       `json:"tarball_url,omitempty"`
	ZipURL string       `json:"zipball_url,omitempty"`
	Commit GithubCommit `json:"commit,omitempty"`
}

func GetPreprocessedWebKitTags

func GetPreprocessedWebKitTags(proxy string, insecure bool) ([]GithubTag, error)

func WebKitGraphQLTags

func WebKitGraphQLTags(proxy string, insecure bool, apikey string) ([]GithubTag, error)

type GithubTags

type GithubTags []GithubTag

type IPSW

type IPSW struct {
	Identifier  string    `json:"identifier,omitempty"`
	Version     string    `json:"version,omitempty"`
	BuildID     string    `json:"buildid,omitempty"`
	SHA1        string    `json:"sha1sum,omitempty"`
	MD5         string    `json:"md5sum,omitempty"`
	FileSize    int       `json:"filesize,omitempty"`
	URL         string    `json:"url,omitempty"`
	ReleaseDate time.Time `json:"releasedate,omitempty"`
	UploadDate  time.Time `json:"uploaddate,omitempty"`
	Signed      bool      `json:"signed,omitempty"`
}

IPSW struct

func GetAllIPSW

func GetAllIPSW(version string) ([]IPSW, error)

GetAllIPSW finds all IPSW files for a given iOS version

func GetDeviceIPSWs

func GetDeviceIPSWs(identifier string) ([]IPSW, error)

GetDeviceIPSWs returns a device's IPSWs from it's identifier

func GetIPSW

func GetIPSW(identifier, buildID string) (IPSW, error)

GetIPSW will get an IPSW when supplied an identifier and build ID

type ITunesVersionMaster

type ITunesVersionMaster struct {
	MobileDeviceSoftwareVersionsByVersion map[string]*VersionWrapper
}

ITunesVersionMaster object

func NewIBridgeXML

func NewIBridgeXML() (*ITunesVersionMaster, error)

NewIBridgeXML downloads and parses the iBridge IPSW plist

func NewMacOsXML

func NewMacOsXML() (*ITunesVersionMaster, error)

NewMacOsXML downloads and parses the macOS IPSW plist

func NewiTunesVersionMaster

func NewiTunesVersionMaster() (*ITunesVersionMaster, error)

NewiTunesVersionMaster downloads and parses the itumes plist

func (*ITunesVersionMaster) GetBuilds

func (vm *ITunesVersionMaster) GetBuilds() []Build

GetBuilds gets all the IndividualBuilds

func (*ITunesVersionMaster) GetBuildsForBuildID

func (vm *ITunesVersionMaster) GetBuildsForBuildID(buildID string) []Build

GetBuildsForBuildID gets all the IndividualBuilds that match supplied build ID

func (*ITunesVersionMaster) GetBuildsForVersion

func (vm *ITunesVersionMaster) GetBuildsForVersion(version string) []Build

GetBuildsForVersion gets all the IndividualBuilds that match supplied version

func (*ITunesVersionMaster) GetLatestBuild

func (vm *ITunesVersionMaster) GetLatestBuild() (string, error)

GetLatestBuild gets the latest iOS build

func (*ITunesVersionMaster) GetLatestBuilds

func (vm *ITunesVersionMaster) GetLatestBuilds(device string) ([]Build, error)

GetLatestBuilds gets all the latest IndividualBuilds that match supplied build ID

func (*ITunesVersionMaster) GetLatestSoftwareURLs

func (vm *ITunesVersionMaster) GetLatestSoftwareURLs() ([]string, error)

GetLatestSoftwareURLs gets all the latests ipsw URLs

func (*ITunesVersionMaster) GetLatestVersion

func (vm *ITunesVersionMaster) GetLatestVersion() (string, error)

GetLatestVersion gets the latest iOS version

func (*ITunesVersionMaster) GetSoftwareURLFor

func (vm *ITunesVersionMaster) GetSoftwareURLFor(device string) (string, error)

GetSoftwareURLFor gets the latest ipsw download URL for a device. i.e. "iPhone11,2"

func (*ITunesVersionMaster) GetSoftwareURLs

func (vm *ITunesVersionMaster) GetSoftwareURLs() ([]string, error)

GetSoftwareURLs gets all the ipsw URLs

func (*ITunesVersionMaster) GetSoftwareURLsForBuildID

func (vm *ITunesVersionMaster) GetSoftwareURLsForBuildID(buildID string) ([]string, error)

GetSoftwareURLsForBuildID gets all the ipsw URLs for an iOS Build ID

func (*ITunesVersionMaster) GetSoftwareURLsForVersion

func (vm *ITunesVersionMaster) GetSoftwareURLsForVersion(version string) ([]string, error)

GetSoftwareURLsForVersion gets all the ipsw URLs for an iOS version

type Identifier

type Identifier string

Identifier object

type IndividualBuild

type IndividualBuild struct {
	BuildVersion     BuildNumber
	DocumentationURL string
	FirmwareURL      string
	FirmwareSHA1     string
	ProductVersion   string
}

IndividualBuild object

type Jailbreak

type Jailbreak struct {
	Jailbroken bool   `json:"jailbroken"`
	Name       string `json:"name"`
	URL        string `json:"url"`

	Firmwares struct {
		Start string `json:"start"`
		End   string `json:"end"`
	} `json:"ios"`

	Platforms []string `json:"platforms"`
	Caveats   string   `json:"caveats"`
}

Jailbreak object

type Jailbreaks

type Jailbreaks struct {
	Jailbreaks []*Jailbreak `json:"jailbreaks"`
}

Jailbreaks object

func GetJailbreaks

func GetJailbreaks() (Jailbreaks, error)

GetJailbreaks gets canijailbreak.com's JSON

func (*Jailbreaks) CanIBreak

func (j *Jailbreaks) CanIBreak(iOSVersion string) (bool, int, error)

CanIBreak will check if an iOS version is jailbreakable

type KDK

type KDK struct {
	Build     string  `json:"build,omitempty"`
	Date      KDKDate `json:"date,omitempty"`
	FileSize  int     `json:"fileSize,omitempty"`
	Md5Sum    string  `json:"md5sum,omitempty"`
	Name      string  `json:"name,omitempty"`
	Sha256Sum string  `json:"sha256sum,omitempty"`
	URL       string  `json:"url,omitempty"`
	Version   string  `json:"version,omitempty"`
}

KDK is a Kernel Development Kit download object

type KDKDate

type KDKDate time.Time

func (KDKDate) Format

func (r KDKDate) Format(s string) string

func (KDKDate) MarshalJSON

func (r KDKDate) MarshalJSON() ([]byte, error)

func (*KDKDate) UnmarshalJSON

func (r *KDKDate) UnmarshalJSON(b []byte) error

type KDKs

type KDKs []KDK

func ListKDKs

func ListKDKs() (KDKs, error)

ListKDKs returns a list of KDKs

func (KDKs) Len

func (ks KDKs) Len() int

func (KDKs) Less

func (ks KDKs) Less(i, j int) bool

func (KDKs) Swap

func (ks KDKs) Swap(i, j int)

type Keys

type Keys map[string]string

type ListBucketResult

type ListBucketResult struct {
	Name           string
	Contents       contents
	IsTruncated    bool
	Prefix         string
	Marker         string
	MaxKeys        string
	NextMarker     string
	CommonPrefixes []string
}

ListObjectsOutput presents output for ListObjects.

func ListXCodes

func ListXCodes() (*ListBucketResult, error)

type MoreDownload

type MoreDownload struct {
	Name          string     `json:"name,omitempty"`
	Description   string     `json:"description,omitempty"`
	IsReleased    int        `json:"isReleased,omitempty"`
	DatePublished string     `json:"datePublished,omitempty"`
	DateCreated   string     `json:"dateCreated,omitempty"`
	DateModified  string     `json:"dateModified,omitempty"`
	Categories    []category `json:"categories,omitempty"`
	Files         []dfile    `json:"files,omitempty"`
}

type OsFileSource

type OsFileSource struct {
	Type      string   `json:"type"`
	DeviceMap []string `json:"deviceMap"`
	Links     []struct {
		URL       string `json:"url"`
		Preferred bool   `json:"preferred"`
		Active    bool   `json:"active"`
	} `json:"links"`
	Hashes struct {
		Sha2256 string `json:"sha2-256"`
		Sha1    string `json:"sha1"`
	} `json:"hashes"`
	Size int64 `json:"size"`
}

func AppleDBQuery

func AppleDBQuery(q *ADBQuery) ([]OsFileSource, error)

func LocalAppleDBQuery

func LocalAppleDBQuery(q *ADBQuery) ([]OsFileSource, error)

type OsFiles

type OsFiles []AppleDbOsFile

func (OsFiles) Len

func (fs OsFiles) Len() int

func (OsFiles) Less

func (fs OsFiles) Less(i, j int) bool

func (OsFiles) Query

func (fs OsFiles) Query(query *ADBQuery) []OsFileSource

Query returns a list of OsFileSource objects that match the query

func (OsFiles) Swap

func (fs OsFiles) Swap(i, j int)

type Oss

type Oss struct {
	Build    string             `plist:"build,omitempty" json:"build,omitempty"`
	Inherits string             `plist:"inherits,omitempty" json:"inherits,omitempty"`
	Projects map[string]project `plist:"projects,omitempty" json:"projects,omitempty"`
}

Oss opensource.apple.com plist object

func NewOSS

func NewOSS(macOSVersion, proxy string, insecure bool) (*Oss, error)

NewOSS downloads and parses the opensource.apple.com plist

type Ota

type Ota struct {
	Config OtaConf
	// contains filtered or unexported fields
}

Ota is an OTA object

func NewOTA

func NewOTA(as *AssetSets, conf OtaConf) (*Ota, error)

NewOTA downloads and parses the itumes plist for iOS14 release/developer beta OTAs

func (*Ota) GetPallasOTAs

func (o *Ota) GetPallasOTAs() ([]types.Asset, error)

GetPallasOTAs returns an OTA assets for a given config using the newstyle OTA - CREDIT: https://gist.github.com/Siguza/0331c183c8c59e4850cd0b62fd501424

type OtaConf

type OtaConf struct {
	Platform        string
	Beta            bool
	RSR             bool
	Device          string
	Model           string
	Version         *version.Version
	Build           string
	DeviceWhiteList []string
	DeviceBlackList []string
	Proxy           string
	Insecure        bool
	Timeout         time.Duration
}

OtaConf is an OTA download configuration

type Package

type Package struct {
	Digest            string `plist:"Digest,omitempty"`
	Size              int    `plist:"Size,omitempty"`
	IntegrityDataURL  string `plist:"IntegrityDataURL,omitempty"`
	MetadataURL       string `plist:"MetadataURL,omitempty"`
	URL               string `plist:"URL,omitempty"`
	IntegrityDataSize int    `plist:"IntegrityDataSize,omitempty"`
}

type Product

type Product struct {
	ServerMetadataURL string
	Packages          []Package
	PostDate          time.Time
	Distributions     map[string]string
	ExtendedMetaInfo  ExtendedMetaInfo `plist:"ExtendedMetaInfo,omitempty"`
}

type ProductInfo

type ProductInfo struct {
	ProductID string
	Version   string
	Build     string
	PostDate  time.Time
	Title     string
	Product   Product
	// contains filtered or unexported fields
}

func (*ProductInfo) DownloadInstaller

func (i *ProductInfo) DownloadInstaller(workDir, proxy string, insecure, skipAll, resumeAll, restartAll, ignoreSha1, assistantOnly bool) error

func (ProductInfo) String

func (i ProductInfo) String() string

type ProductInfos

type ProductInfos []ProductInfo

func GetProductInfo

func GetProductInfo() (ProductInfos, error)

GetProductInfo downloads and parses the macOS installer product infos

func (ProductInfos) FilterByBuild

func (infos ProductInfos) FilterByBuild(build string) ProductInfos

func (ProductInfos) FilterByVersion

func (infos ProductInfos) FilterByVersion(version string) ProductInfos

FilterByVersion filters out installers that do not match the given version

func (ProductInfos) GetLatest

func (infos ProductInfos) GetLatest() ProductInfos

func (ProductInfos) String

func (infos ProductInfos) String() string

type QueryResults

type QueryResults struct {
	ResultCount int  `json:"resultCount"`
	Results     Apps `json:"results"`
}

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue(len int) *Queue

func (*Queue) IsEmpty

func (q *Queue) IsEmpty() bool

func (*Queue) Len

func (q *Queue) Len() int

func (*Queue) Peek

func (q *Queue) Peek() string

func (*Queue) Pop

func (q *Queue) Pop() string

func (*Queue) Push

func (q *Queue) Push(item string)

type ReleasedDate

type ReleasedDate time.Time

func (ReleasedDate) Format

func (r ReleasedDate) Format(s string) string

func (ReleasedDate) MarshalJSON

func (r ReleasedDate) MarshalJSON() ([]byte, error)

func (*ReleasedDate) UnmarshalJSON

func (r *ReleasedDate) UnmarshalJSON(b []byte) error

type RemoteConfig

type RemoteConfig struct {
	Proxy    string
	Insecure bool
}

RemoteConfig is the remote reader config

type Repo

type Repo struct {
	Name string
	Ref  struct {
		Nodes []struct {
			Name   string
			Target struct {
				Tag struct {
					CommitURL string `json:"commitUrl"`
					Target    struct {
						Commit `graphql:"... on Commit"`
					}
				} `graphql:"... on Tag"`
			}
		}
	} `graphql:"refs(refPrefix: \"refs/tags/\", last: 1)"`
}

type Rss

type Rss struct {
	Channel RssChannel `xml:"channel" json:"channel,omitempty"`
}

func GetRSS

func GetRSS() (*Rss, error)

GetRSS returns the developer.apple.com/news/releases RSS feed as Rss object

type RssChannel

type RssChannel struct {
	Title string    `xml:"title" json:"title,omitempty"`
	Link  string    `xml:"link" json:"link,omitempty"`
	Desc  string    `xml:"description" json:"desc,omitempty"`
	Items []RssItem `xml:"item" json:"items,omitempty"`
}

type RssContent

type RssContent struct {
	Data string `xml:",chardata" json:"data,omitempty"`
}

type RssItem

type RssItem struct {
	Title   string     `xml:"title" json:"title,omitempty"`
	Link    string     `xml:"link" json:"link,omitempty"`
	Desc    string     `xml:"description" json:"desc,omitempty"`
	GUID    string     `xml:"guid" json:"guid,omitempty"`
	PubDate pubDate    `xml:"pubDate" json:"pub_date,omitempty"`
	Content RssContent `xml:"encoded" json:"content,omitempty"`
}

type ServerMetadata

type ServerMetadata struct {
	CFBundleShortVersionString string
	Localization               map[string]localization `plist:"localization,omitempty"`
	Platforms                  map[string][]string     `plist:"platforms,omitempty"`
}

type VersionWrapper

type VersionWrapper struct {
	MobileDeviceSoftwareVersions map[Identifier]map[BuildNumber]*BuildInformation
}

VersionWrapper object

type WikiConfig

type WikiConfig struct {
	Device  string
	Version string
	Build   string
	IPSW    bool
	OTA     bool
	Beta    bool
}

type WikiFirmware

type WikiFirmware struct {
	Version             string    `json:"version,omitempty"`
	VersionExtra        string    `json:"version_extra,omitempty"`
	PrerequisiteVersion string    `json:"prerequisite_version,omitempty"`
	Build               string    `json:"build,omitempty"`
	PrerequisiteBuild   string    `json:"prerequisite_build,omitempty"`
	Product             string    `json:"product,omitempty"`
	BoardID             string    `json:"board_id,omitempty"`
	Devices             []string  `json:"keys,omitempty"`
	Baseband            string    `json:"baseband,omitempty"`
	ReleaseDate         time.Time `json:"release_date,omitempty"`
	URL                 string    `json:"url,omitempty"`
	Sha1Hash            string    `json:"sha1,omitempty"`
	FileSize            int       `json:"file_size,omitempty"`
	Documentation       []string  `json:"doc,omitempty"`
}

func GetWikiFirmwareKeys

func GetWikiFirmwareKeys(proxy string, insecure bool) ([]WikiFirmware, error)

func GetWikiIPSWs

func GetWikiIPSWs(cfg *WikiConfig, proxy string, insecure bool) ([]WikiFirmware, error)

GetWikiIPSWs queries theiphonewiki.com for IPSWs

func GetWikiOTAs

func GetWikiOTAs(cfg *WikiConfig, proxy string, insecure bool) ([]WikiFirmware, error)

GetWikiOTAs queries theiphonewiki.com for OTAs

type XCodeRelease

type XCodeRelease struct {
	Checksums struct {
		Sha1 string `json:"sha1"`
	} `json:"checksums"`
	Compilers struct {
		Clang []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"clang"`
		Gcc []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"gcc"`
		Llvm []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"llvm"`
		LlvmGcc []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"llvm_gcc"`
		Swift []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"swift"`
	} `json:"compilers"`
	Date struct {
		Day   int64 `json:"day"`
		Month int64 `json:"month"`
		Year  int64 `json:"year"`
	} `json:"date"`
	Links struct {
		Download struct {
			URL string `json:"url"`
		} `json:"download"`
		Notes struct {
			URL string `json:"url"`
		} `json:"notes"`
	} `json:"links"`
	Name     string `json:"name"`
	Requires string `json:"requires"`
	Sdks     struct {
		IOS []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"iOS"`
		MacOS []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"macOS"`
		TvOS []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"tvOS"`
		VisionOS []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"visionOS"`
		WatchOS []struct {
			Build   string `json:"build"`
			Number  string `json:"number"`
			Release struct {
				Release bool `json:"release"`
			} `json:"release"`
		} `json:"watchOS"`
	} `json:"sdks"`
	Version struct {
		Build   string `json:"build"`
		Number  string `json:"number"`
		Release struct {
			Beta    int64 `json:"beta"`
			Dp      int64 `json:"dp"`
			Gm      bool  `json:"gm"`
			GmSeed  int64 `json:"gmSeed"`
			Rc      int64 `json:"rc"`
			Release bool  `json:"release"`
		} `json:"release"`
	} `json:"version"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL