api

package
v0.0.0-...-91a3ab6 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const CanIJailbreakURL = "https://canijailbreak.com/"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDevice

type BaseDevice struct {
	Identifier string `json:"identifier"`
	Name       string `json:"name"`

	Boards []Board `json:"boards"`

	// Deprecated: Use Boards instead.
	BoardConfig string `json:"boardconfig"`
	// Deprecated: Use Boards instead.
	Platform string `json:"platform"`
	// Deprecated: Use Boards instead.
	CPID int `json:"cpid"`
	// Deprecated: Use Boards instead.
	BDID int `json:"bdid"`
}

type Board

type Board struct {
	BoardConfig string `json:"boardconfig"`
	Platform    string `json:"platform"`
	CPID        int    `json:"cpid"`
	BDID        int    `json:"bdid"`
}

type CanIJailbreakClient

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

func NewCanIJailbreakClient

func NewCanIJailbreakClient(apiBase string, httpClient HTTPClient) *CanIJailbreakClient

NewCanIJailbreakClient creates a CanIJailbreakClient. If client == nil, http.DefaultClient is used.

func (*CanIJailbreakClient) GetJailbreaks

func (c *CanIJailbreakClient) GetJailbreaks() (*model.Jailbreaks, error)

type Device

type Device struct {
	BaseDevice
	Firmwares []Firmware `json:"firmwares"`
}

Device is an iOS device released by Apple, and all available IPSW files for it.

type Firmware

type Firmware struct {
	Identifier  string    `json:"identifier"`
	Version     string    `json:"version"`
	Device      string    `json:"device"`
	BuildID     string    `json:"buildid"`
	SHA1Sum     string    `json:"sha1sum"`
	MD5Sum      string    `json:"md5sum"`
	Filesize    uint64    `json:"filesize"`
	UploadDate  null.Time `json:"uploaddate"`
	ReleaseDate null.Time `json:"releasedate"`
	URL         string    `json:"url"`
	Signed      bool      `json:"signed"`
	SHA256Sum   string    `json:"sha256sum"`
}

Firmware represents everything known by IPSW Downloads about an IPSW file

type FirmwareInfo

type FirmwareInfo struct {
	Identifier           string `json:"identifier"`
	BuildID              string `json:"buildid"`
	CodeName             string `json:"codename"`
	Baseband             string `json:"baseband,omitempty"`
	UpdateRamdiskExists  bool   `json:"updateramdiskexists"`
	RestoreRamdiskExists bool   `json:"restoreramdiskexists"`

	Keys []FirmwareKey `json:"keys,omitempty"`
}

FirmwareInfo is a representation of keys information known by IPSW Downloads

type FirmwareKey

type FirmwareKey struct {
	Image    string    `json:"image"`
	Filename string    `json:"filename"`
	KBag     string    `json:"kbag"`
	Key      string    `json:"key"`
	IV       string    `json:"iv"`
	Date     time.Time `json:"date"`
}

FirmwareKey is a key/iv combo for an individual firmware file

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
	Get(string) (*http.Response, error)
	Head(string) (*http.Response, error)
	Post(string, string, io.Reader) (*http.Response, error)
	PostForm(string, url.Values) (*http.Response, error)
}

type IPSWClient

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

func NewIPSWClient

func NewIPSWClient(apiBase string, httpClient HTTPClient) *IPSWClient

NewIPSWClient creates an IPSWClient. If client == nil, http.DefaultClient is used.

func (*IPSWClient) DeviceInformation

func (c *IPSWClient) DeviceInformation(identifier string) (*Device, error)

func (*IPSWClient) Devices

func (c *IPSWClient) Devices(onlyShowDevicesWithKeys bool) ([]BaseDevice, error)

func (*IPSWClient) IPSWInformation

func (c *IPSWClient) IPSWInformation(identifier, buildid string) (*Firmware, error)

func (*IPSWClient) IPSWsForVersion

func (c *IPSWClient) IPSWsForVersion(version string) ([]Firmware, error)

func (*IPSWClient) ITunes

func (c *IPSWClient) ITunes(platform string) ([]ITunes, error)

func (*IPSWClient) IdentifyModel

func (c *IPSWClient) IdentifyModel(model string) (string, error)

func (*IPSWClient) KeysForIPSW

func (c *IPSWClient) KeysForIPSW(identifier, buildid string) (*FirmwareInfo, error)

func (*IPSWClient) KeysList

func (c *IPSWClient) KeysList(identifier string) ([]FirmwareInfo, error)

func (*IPSWClient) OTADeviceInformation

func (c *IPSWClient) OTADeviceInformation(identifier string) (*OTADevice, error)

func (*IPSWClient) OTADocumentation

func (c *IPSWClient) OTADocumentation(device, version string) ([]byte, error)

func (*IPSWClient) OTAInformation

func (c *IPSWClient) OTAInformation(identifier, buildid, prerequisite string) (*OTAFirmware, error)

func (*IPSWClient) OTAsForVersion

func (c *IPSWClient) OTAsForVersion(version string) ([]OTAFirmware, error)

func (*IPSWClient) ReleaseInformation

func (c *IPSWClient) ReleaseInformation() ([]ReleasesByDate, error)

func (*IPSWClient) URL

func (c *IPSWClient) URL(identifier, buildid string) (string, error)

type ITunes

type ITunes struct {
	Version         string    `json:"version"`
	UploadDate      null.Time `json:"uploaddate"`
	ReleaseDate     null.Time `json:"releasedate"`
	URL             string    `json:"url"`
	SixtyFourBitURL string    `json:"64biturl"`
}

ITunes represents an iTunes download.

type OTADevice

type OTADevice struct {
	BaseDevice
	Firmwares []OTAFirmware `json:"firmwares"`
}

OTADevice is an iOS device released by Apple, and all available OTA files for it.

type OTAFirmware

type OTAFirmware struct {
	Firmware
	PrerequisiteVersion string `json:"prerequisiteversion"`
	PrerequisiteBuildID string `json:"prerequisitebuildid"`
	ReleaseType         string `json:"releasetype"`
}

OTAFirmware represents an "over-the-air" firmware file

type Release

type Release struct {
	Name  string      `json:"name"`
	Date  time.Time   `json:"date"`
	Count int         `json:"count"`
	Type  ReleaseType `json:"type"`
}

Release is an iOS/iTunes/... release detected by IPSW Downloads

type ReleaseType

type ReleaseType string

ReleaseType represents a release type

const (
	// ReleaseTypeiOS is an iOS release
	ReleaseTypeiOS ReleaseType = "iOS"

	// ReleaseTypeDevice is a device release
	ReleaseTypeDevice ReleaseType = "Device"

	// Deprecated: ReleaseTypeRedsn0w is a redsn0w release
	ReleaseTypeRedsn0w ReleaseType = "redsn0w"

	// Deprecated: ReleaseTypePwnageTool is a PwnageTool release
	ReleaseTypePwnageTool ReleaseType = "PwnageTool"

	// Deprecated: ReleaseTypeiTunes is an iTunes release
	ReleaseTypeiTunes ReleaseType = "iTunes"

	// ReleaseTypeiOSOTA is an OTA release
	ReleaseTypeiOSOTA ReleaseType = "iOS OTA"

	// ReleaseTypewatchOS is a watchOS release
	ReleaseTypewatchOS ReleaseType = "watchOS"

	// ReleaseTypeSigning is a signing change to an iOS firmware
	ReleaseTypeSigning ReleaseType = "shsh"

	// ReleaseTypeTvOS is a tvOS release
	ReleaseTypeTvOS ReleaseType = "tvOS"
)

type ReleasesByDate

type ReleasesByDate struct {
	Date     string
	Releases []Release
}

Jump to

Keyboard shortcuts

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