unlock

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UA             = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
	Host           = "iforgot.apple.com"
	BaseURL        = "https://iforgot.apple.com"
	Referer        = BaseURL + "/password/verify/appleid"
	AcceptEncoding = ""
	AcceptLanguage = "zh-CN,zh;q=0.9,en;q=0.8"
	AcceptJSON     = "application/json, text/javascript, */*; q=0.01"
	AcceptHTML     = "text/html;format=fragmented"
	ContentType    = "application/json"
)
View Source
const (
	JSON = "json"
	HTML = "HTML"
)
View Source
const SystemdConfig = `` /* 332-byte string literal not displayed */

Variables

This section is empty.

Functions

func Boot

func Boot()

func CheckAndExit

func CheckAndExit(err error)

func CheckErr

func CheckErr(err error) bool

func CheckRoot

func CheckRoot()

func Install

func Install()

func RandStr

func RandStr(n int) string

func Reinstall

func Reinstall()

func Uninstall

func Uninstall()

Types

type AppleID

type AppleID struct {
	ID        string            `yml:"id"`
	Birthday  string            `yml:"birthday"`
	Password  string            `yml:"password"`
	Questions map[string]string `yml:"questions"`
	Client    *http.Client      `yml:"client,omitempty"`
	Cron      string            `yml:"cron"`
}

func ExampleConfig

func ExampleConfig() []*AppleID

func (AppleID) AnswerQuestion

func (appID AppleID) AnswerQuestion(sstt, location string) (string, string, error)

func (AppleID) Check

func (appID AppleID) Check() bool

func (AppleID) RestPassword

func (appID AppleID) RestPassword(sstt, location string) error

func (AppleID) SelectAuthenticationMethod

func (appID AppleID) SelectAuthenticationMethod(sstt string) (string, string, error)

func (AppleID) Unlock

func (appID AppleID) Unlock() error

func (AppleID) UnlockAppleID

func (appID AppleID) UnlockAppleID(sstt, location string) (string, string, error)

func (AppleID) ValidateAppleID

func (appID AppleID) ValidateAppleID() (string, error)

func (AppleID) ValidateBirthday

func (appID AppleID) ValidateBirthday(sstt, location string) (string, string, error)

func (AppleID) ValidatePassword

func (appID AppleID) ValidatePassword(sstt, location string) error

type Question

type Question struct {
	ID       int    `json:"id"`
	Number   int    `json:"number"`
	Question string `json:"question"`
	Answer   string `json:"answer"`
}

type Questions

type Questions struct {
	Questions []Question `json:"questions"`
}

type SMTPConfig

type SMTPConfig struct {
	UserName string   `yml:"username"`
	Password string   `yml:"password"`
	From     string   `yml:"from"`
	To       []string `yml:"to"`
	Server   string   `yml:"Server"`
}

func SMTPExampleConfig

func SMTPExampleConfig() *SMTPConfig

func (*SMTPConfig) Send

func (cfg *SMTPConfig) Send(message string)

Jump to

Keyboard shortcuts

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