alias

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

README

Alias

Wraps external DLLs/tool in Sliver console commands.

Format
  • alias-dir/
    • manifest.json -

Documentation

Index

Constants

View Source
const (
	ManifestFileName = "alias.json"
)

Variables

This section is empty.

Functions

func AliasCompleter added in v0.0.2

func AliasCompleter() carapace.Action

AliasCommandNameCompleter - Completer for installed extensions command names.

func AliasesCmd

func AliasesCmd(cmd *cobra.Command, con *repl.Console)

AliasesCmd - The alias command

func AliasesInstallCmd

func AliasesInstallCmd(cmd *cobra.Command, con *repl.Console)

AliasesInstallCmd - Install an alias

func AliasesLoadCmd

func AliasesLoadCmd(cmd *cobra.Command, con *repl.Console)

AliasesLoadCmd - Locally load a alias into the Sliver shell.

func AliasesRemoveCmd

func AliasesRemoveCmd(cmd *cobra.Command, con *repl.Console)

AliasesRemoveCmd - Locally load a alias into the Sliver shell.

func Commands

func Commands(con *repl.Console) []*cobra.Command

func ExecuteAlias added in v0.0.2

func ExecuteAlias(rpc clientrpc.MaliceRPCClient, sess *core.Session, aliasName string, args string, param map[string]string,
	sac *implantpb.SacrificeProcess) (*clientpb.Task, error)

func InstallAlias added in v0.1.0

func InstallAlias(aliasGzFilePath string, installPath, artifactPath string) error

func InstallFromFile

func InstallFromFile(aliasGzFilePath string, aliasName string, promptToOverwrite bool, con *repl.Console) *string

Install an extension from a .tar.gz file

func PrintAliases

func PrintAliases(con *repl.Console, isStatic bool)

PrintAliases - Print a list of loaded aliases

func Register added in v0.0.2

func Register(con *repl.Console)

func RegisterAlias added in v0.0.2

func RegisterAlias(aliasManifest *AliasManifest, cmd *cobra.Command, con *repl.Console) error

func RemoveAliasByCommandName

func RemoveAliasByCommandName(commandName string, con *repl.Console) error

RemoveAliasByCommandName - Remove an alias by command name

Types

type AliasFile

type AliasFile struct {
	OS   string `json:"os"`
	Arch string `json:"arch"`
	Path string `json:"path"`
}

AliasFile - An OS/Arch specific file

type AliasManifest

type AliasManifest struct {
	Name           string `json:"name"`
	Version        string `json:"version"`
	CommandName    string `json:"command_name"`
	OriginalAuthor string `json:"original_author"`
	RepoURL        string `json:"repo_url"`
	Help           string `json:"help"`
	LongHelp       string `json:"long_help"`

	Entrypoint   string       `json:"entrypoint"`
	AllowArgs    bool         `json:"allow_args"`
	DefaultArgs  string       `json:"default_args"`
	Files        []*AliasFile `json:"files"`
	IsReflective bool         `json:"is_reflective"`
	IsAssembly   bool         `json:"is_assembly"`

	RootPath   string `json:"-"`
	ArmoryName string `json:"-"`
	ArmoryPK   string `json:"-"`
}

AliasManifest - The manifest for an alias, contains metadata

func LoadAlias

func LoadAlias(manifestPath string, con *repl.Console) (*AliasManifest, error)

LoadAlias - Load an alias into the Malice-Network shell from a given directory

func ParseAliasManifest

func ParseAliasManifest(data []byte) (*AliasManifest, error)

ParseAliasManifest - Parse an alias manifest

Jump to

Keyboard shortcuts

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