vm

package
v0.0.0-...-fed3a35 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

type Process struct {
	ID          int
	Executable  string
	Args        []string
	Environment []string
	// contains filtered or unexported fields
}

Process represents a process within a virtual machine

type VM

type VM struct {
	Fs *ramfs.Filesystem
	// contains filtered or unexported fields
}

VM is the environment the binary should be emulated in.

func NewVM

func NewVM() *VM

NewVM creates a new virtual environment to run binaries in.

func (*VM) LoadFiles

func (v *VM) LoadFiles(c *pb.Config) error

LoadFiles loads the files from the config into the filesytem of the environment.

func (*VM) Process

func (v *VM) Process(c *pb.Config, exec string, args, envornment []string) (*Process, error)

Process creates a new process for the provided executable. - create unicorn instance - prepare memory and kernel for the process - load loader into virtual machine (if required) If a loader is required, the binary is written to the filesystem and the entry point it set to the loader.

Jump to

Keyboard shortcuts

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