dsc

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: 11 Imported by: 0

Documentation

Overview

Package dsc implements the `dsc` commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserAgent

func GetUserAgent(f *dyld.File, sysVer *extract.SystemVersionPlist) (string, error)

func GetWebkitVersion

func GetWebkitVersion(f *dyld.File) (string, error)

GetWebkitVersion returns the WebKit version from a dyld_shared_cache file

Types

type Address

type Address struct {
	// the virtual addresses
	// swagger:allOf
	Files []*address `json:"files,omitempty"`
	// the vmcache address
	// swagger:allOf
	Cache *address `json:"cache,omitempty"`
}

Address is a struct that contains information about a dyld_shared_cache address swagger:model

func ConvertOffsetToAddress

func ConvertOffsetToAddress(f *dyld.File, offset uint64) (*Address, error)

ConvertOffsetToAddress converts a dyld_shared_cache offset to an address

type Dylib

type Dylib struct {
	Index       int    `json:"index,omitempty"`
	Name        string `json:"name,omitempty"`
	Version     string `json:"version,omitempty"`
	UUID        string `json:"uuid,omitempty"`
	LoadAddress uint64 `json:"load_address,omitempty"`
}

Dylib is a struct that contains information about a dyld_shared_cache dylib swagger:model

type ImportedBy

type ImportedBy struct {
	DSC  []string `json:"dsc,omitempty"`
	Apps []string `json:"apps,omitempty"`
}

ImportedBy is a struct that contains information about which dyld_shared_cache dylibs import a given dylib swagger:model

func GetDylibsThatImport

func GetDylibsThatImport(f *dyld.File, name string) (*ImportedBy, error)

GetDylibsThatImport returns a list of dylibs that import the given dylib

type Info

type Info struct {
	Magic              string                                      `json:"magic,omitempty"`
	UUID               string                                      `json:"uuid,omitempty"`
	Platform           string                                      `json:"platform,omitempty"`
	MaxSlide           int                                         `json:"max_slide,omitempty"`
	SubCacheArrayCount int                                         `json:"num_sub_caches,omitempty"`
	SubCacheGroupID    int                                         `json:"sub_cache_group_id,omitempty"`
	SymSubCacheUUID    string                                      `json:"sym_sub_cache_uuid,omitempty"`
	Mappings           map[string][]dyld.CacheMappingWithSlideInfo `json:"mappings,omitempty"`
	CodeSignature      map[string]codesign.CodeSignature           `json:"code_signature,omitempty"`
	Dylibs             []Dylib                                     `json:"dylibs,omitempty"`
}

Info is a struct that contains information about a dyld_shared_cache file swagger:model

func GetInfo

func GetInfo(f *dyld.File) (*Info, error)

GetInfo returns a Info struct for a given dyld_shared_cache file

type Offset

type Offset struct {
	// the file offset
	File *offset `json:"file,omitempty"`
	// the vmcache offset
	Cache *offset `json:"cache,omitempty"`
}

Offset is a struct that contains information about a dyld_shared_cache offset swagger:model

func ConvertAddressToOffset

func ConvertAddressToOffset(f *dyld.File, addr uint64) (*Offset, error)

ConvertAddressToOffset converts a dyld_shared_cache address to an offset

type String

type String struct {
	Address uint64 `json:"address,omitempty"`
	Image   string `json:"image,omitempty"`
	String  string `json:"string,omitempty"`
}

String is a struct that contains information about a dyld_shared_cache string swagger:model

func GetStrings

func GetStrings(f *dyld.File, pattern string) ([]String, error)

GetStrings returns a list of strings from a dyld_shared_cache file for a given regex pattern

type Symbol

type Symbol struct {
	// The address of the symbol
	Address uint64 `json:"address,omitempty"`
	// The name of the symbol
	Name string `json:"name,omitempty"`
	// The type of the symbol
	Type string `json:"type,omitempty"`
	// The image that contains the symbol
	Image string `json:"image,omitempty"`
	// The lookup pattern used to find the symbol
	//
	// required: true
	Pattern string `json:"pattern,omitempty"`
}

Symbol is a struct that contains information about a dyld_shared_cache symbol swagger:model

func GetSymbols

func GetSymbols(f *dyld.File, lookups []Symbol) ([]Symbol, error)

GetSymbols returns a list of symbols from a dyld_shared_cache file for a given list of lookup symbol structs

type SymbolLookup

type SymbolLookup struct {
	// The address of the symbol
	Address uint64 `json:"address,omitempty"`
	// The symbol name
	Symbol string `json:"symbol,omitempty"`
	// The demangled symbol name
	Demanged string `json:"demanged,omitempty"`
	// The DSC mapping name
	Mapping string `json:"mapping,omitempty"`
	// The DSC sub-cache UUID
	UUID string `json:"uuid,omitempty"`
	// Is the symbol in a DSC stub island
	StubIsland bool `json:"stub_island,omitempty"`
	// The DSC sub-cache file extension
	Extension string `json:"ext,omitempty"`
	// The containing image name
	Image string `json:"image,omitempty"`
	// The containing image section
	Section string `json:"section,omitempty"`
	// The containing image segment
	Segment string `json:"segment,omitempty"`
}

SymbolLookup is a struct that contains information about a dyld_shared_cache symbol lookup

func LookupSymbol

func LookupSymbol(f *dyld.File, addr uint64) (*SymbolLookup, error)

LookupSymbol returns a dyld_shared_cache symbol for an address

Jump to

Keyboard shortcuts

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