diff

package
v0.0.0-prerelease Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 40 Imported by: 0

Documentation

Overview

Package diff provides a way to diff two ipsws

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Title        string
	IpswOld      string
	IpswNew      string
	KDKs         []string
	LaunchD      bool
	Firmware     bool
	Features     bool
	Files        bool
	CStrings     bool
	FuncStarts   bool
	Entitlements bool
	AllowList    []string
	BlockList    []string
	PemDB        string
	Signatures   string
	Output       string
	Verbose      bool
}

type Context

type Context struct {
	IPSWPath        string
	Info            *info.Info
	Version         string
	Build           string
	Folder          string
	Mount           map[string]mount
	SystemOsDmgPath string
	MountPath       string
	IsMounted       bool
	IsMacOS         bool
	Kernel          kernel
	DSC             string
	Webkit          string
	KDK             string
	PemDB           string
	// contains filtered or unexported fields
}

Context is the context for the diff

type Diff

type Diff struct {
	Title string `json:"title,omitempty"`

	Old Context `json:"-"`
	New Context `json:"-"`

	Kexts     *mcmd.MachoDiff `json:"kexts,omitempty"`
	KDKs      string          `json:"kdks,omitempty"`
	Ents      string          `json:"ents,omitempty"`
	Dylibs    *mcmd.MachoDiff `json:"dylibs,omitempty"`
	Machos    *mcmd.MachoDiff `json:"machos,omitempty"`
	Firmwares *mcmd.MachoDiff `json:"firmwares,omitempty"`
	IBoot     *IBootDiff      `json:"iboot,omitempty"`
	Launchd   string          `json:"launchd,omitempty"`
	Features  *PlistDiff      `json:"features,omitempty"`
	Files     *FileDiff       `json:"files,omitempty"`
	// contains filtered or unexported fields
}

Diff is the diff

func New

func New(conf *Config) *Diff

New news the diff

func (*Diff) Diff

func (d *Diff) Diff() (err error)

Diff diffs the diff

func (*Diff) HTML

func (d *Diff) HTML() error

func (*Diff) Markdown

func (d *Diff) Markdown() error

Markdown saves the diff as Markdown files.

func (*Diff) Save

func (d *Diff) Save() error

Save saves the diff

func (*Diff) SetOutput

func (d *Diff) SetOutput(output string)

func (*Diff) String

func (d *Diff) String() string

func (*Diff) TitleToFilename

func (d *Diff) TitleToFilename() string

func (*Diff) ToHTML

func (d *Diff) ToHTML() error

func (*Diff) ToJSON

func (d *Diff) ToJSON() error

ToJSON saves the diff as a JSON file

type FileDiff

type FileDiff struct {
	New     map[string][]string `json:"new,omitempty"`
	Removed map[string][]string `json:"removed,omitempty"`
}

type IBootDiff

type IBootDiff struct {
	Versions []string            `json:"versions,omitempty"`
	New      map[string][]string `json:"new,omitempty"`
	Removed  map[string][]string `json:"removed,omitempty"`
}

type PlistDiff

type PlistDiff struct {
	New     map[string]string `json:"new,omitempty"`
	Removed []string          `json:"removed,omitempty"`
	Updated map[string]string `json:"changed,omitempty"`
}

Jump to

Keyboard shortcuts

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