Help us shape the future of Go! Take the 2026 Go Developer Survey

repl

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFoundSession = errors.New("session not found")
	Prompt             = "IoM"
)

Functions

func AdaptSessionColor added in v0.0.3

func AdaptSessionColor(prePrompt, sId string) string

func CmdExist added in v0.0.3

func CmdExist(cmd *cobra.Command, name string) bool

func Connect added in v0.0.3

func Connect(con *Console, config *mtls.ClientConfig) (*grpc.ClientConn, error)

func GetCmd added in v0.0.3

func GetCmd(cmd *cobra.Command, name string) *cobra.Command

func Keys added in v0.0.3

func Keys[M ~map[K]V, K comparable, V any](m M) []K

From the x/exp source code - gets a slice of keys for a map

func Login

func Login(con *Console, config *mtls.ClientConfig) error

func NewConfigLogin

func NewConfigLogin(con *Console, yamlFile string) error

func NewSessionColor added in v0.0.3

func NewSessionColor(prePrompt, sId string) string

func RunCommand added in v0.1.0

func RunCommand(con *Console, cmdline interface{}) (string, error)

func WrapClientCallback added in v0.0.3

func WrapClientCallback(callback ImplantFuncCallback) intermediate.ImplantCallback

func WrapImplantFunc

func WrapImplantFunc(con *Console, fun interface{}, callback ImplantFuncCallback) *mals.MalFunction

func WrapServerFunc

func WrapServerFunc(con *Console, fun interface{}) *mals.MalFunction

Types

type BindCmds

type BindCmds func(console *Console) console.Commands

BindCmds - Bind extra commands to the app object

type Console

type Console struct {
	//*core.ActiveTarget
	*core.ServerStatus
	Log        *core.Logger
	App        *console.Console
	Profile    *assets.Profile
	CMDs       map[string]*cobra.Command
	Helpers    map[string]*cobra.Command
	MalManager *plugin.MalManager
}

func NewConsole

func NewConsole() (*Console, error)

Start - Console entrypoint

func (*Console) AddCommandFuncHelper added in v0.1.0

func (c *Console) AddCommandFuncHelper(cmdName string, funcName string, example string, input, output []string) error

func (*Console) Context

func (c *Console) Context() context.Context

func (*Console) GetPrompt

func (c *Console) GetPrompt() string

func (*Console) ImplantMenu

func (c *Console) ImplantMenu() *cobra.Command

func (*Console) NewConsole

func (c *Console) NewConsole()

func (*Console) RefreshActiveSession

func (c *Console) RefreshActiveSession()

func (*Console) RefreshCmd added in v0.1.1

func (c *Console) RefreshCmd(sess *core.Session) int

func (*Console) RegisterAggressiveFunc added in v0.1.1

func (c *Console) RegisterAggressiveFunc(name string, fn interface{}, internalCallback ImplantFuncCallback, callback intermediate.ImplantCallback)

func (*Console) RegisterBuiltinFunc added in v0.0.3

func (c *Console) RegisterBuiltinFunc(pkg, name string, fn interface{}, callback ImplantFuncCallback) error

func (*Console) RegisterImplantFunc

func (c *Console) RegisterImplantFunc(name string, fn interface{},
	bname string, bfn interface{},
	internalCallback ImplantFuncCallback, callback intermediate.ImplantCallback)

func (*Console) RegisterServerFunc

func (c *Console) RegisterServerFunc(name string, fn interface{}, helper *mals.Helper) error

func (*Console) Start

func (c *Console) Start(bindCmds ...BindCmds) error

func (*Console) SwitchImplant

func (c *Console) SwitchImplant(sess *core.Session)

type ImplantFuncCallback added in v0.0.3

type ImplantFuncCallback func(content *clientpb.TaskContext) (interface{}, error)

ImplantFuncCallback, function internal callback func, retrun golang struct

Jump to

Keyboard shortcuts

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