Documentation
¶
Index ¶
- func EmptyTree() map[string]*Node
- func PrintFullTree(node *Node, indent string, seen map[string]bool)
- func ResolveLib(name string) (string, error)
- func StaticBinaryCheck(path string) ([]string, error)
- type ApkFinder
- type BinaryMetadata
- type DebianFinder
- type FedoraFinder
- type Forest
- type Metadata
- type Node
- type PackageFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveLib ¶
resolve library names to real file paths using ldconfig -p
func StaticBinaryCheck ¶
look for hardcoded executable paths inside the binary Need to update so that if it sees an exec() , etc
Types ¶
type BinaryMetadata ¶
type BinaryMetadata struct {
Architecture string // e.g., "x86-64", "ARM64"
DynamicLoader string // e.g., "/lib64/ld-linux-x86-64.so.2"
RuntimeBinaries []string // e.g., ["tar", "unzip", "sh"] - TODO maybe put in path instead
AbsPath string // e.g the binary location /usr/bin/ls
Package string // e.g the package where the library can be installed
}
type DebianFinder ¶
type DebianFinder struct{}
func (DebianFinder) FindPackage ¶
func (d DebianFinder) FindPackage(lib string) (string, error)
type FedoraFinder ¶
type FedoraFinder struct{}
func (FedoraFinder) FindPackage ¶
func (r FedoraFinder) FindPackage(lib string) (string, error)
type Node ¶
type Node struct {
Path string `json:"path"`
Deps []*Node `json:"deps,omitempty"`
Metadata *BinaryMetadata
}
Model for Tree Node objects, this is the graph
func (*Node) GetDynamicLoaders ¶
Returns all the DynamicLoaders found in the tree
func (*Node) GetUniqueDependencies ¶
Returns all the shared libraries for a binary (that was passed in as the root)
func (*Node) UpdateMetaWithPackage ¶
func (node *Node) UpdateMetaWithPackage(finder PackageFinder)
Provide the option to update all metadata with the package that the lib is in
type PackageFinder ¶
func DetectFinder ¶
func DetectFinder() PackageFinder
Click to show internal directories.
Click to hide internal directories.