Documentation ¶
Index ¶
- func Bind(desc string, persistent bool, cmd *cobra.Command, flags func(f *pflag.FlagSet))
- func BindArgCompletions(cmd *cobra.Command, anyAction *carapace.Action, actions ...carapace.Action)
- func BindFlag(cmd *cobra.Command, customSet ...func(f *pflag.FlagSet))
- func BindFlagCompletions(cmd *cobra.Command, bind func(comp carapace.ActionMap))
- func ExecuteFlagSet(f *pflag.FlagSet)
- func ListenerIDCompleter(con *repl.Console) carapace.Action
- func LocalPathCompleter(prefix string, args []string, con *repl.Console) []string
- func NewBinary(module string, path string, args []string, output bool, timeout uint32, ...) (*implantpb.ExecuteBinary, error)
- func NewCompletions(cmd *cobra.Command) *carapace.Carapace
- func NewExecutable(module string, path string, args []string, arch string, output bool, ...) (*implantpb.ExecuteBinary, error)
- func ParseAssembly(ctx *clientpb.TaskContext) (interface{}, error)
- func ParseBinaryParams(cmd *cobra.Command) (string, []string, bool, uint32)
- func ParseFullBinaryParams(cmd *cobra.Command) (string, []string, bool, uint32, string, string)
- func ParseResponse(ctx *clientpb.TaskContext) (interface{}, error)
- func ParseSacrifice(cmd *cobra.Command) (*implantpb.SacrificeProcess, error)
- func ParseStatus(ctx *clientpb.TaskContext) (interface{}, error)
- func PipelineFlagSet(f *pflag.FlagSet)
- func ResourceCompelete(con *repl.Console) carapace.Action
- func RestrictTargets(filters ...string) map[string]string
- func SacrificeFlagSet(f *pflag.FlagSet)
- func SessionAddonComplete(con *repl.Console) carapace.Action
- func SessionIDCompleter(con *repl.Console) carapace.Action
- func SessionModuleComplete(con *repl.Console) carapace.Action
- func SessionTaskComplete(con *repl.Console) carapace.Action
- func TlsCertFlagSet(f *pflag.FlagSet)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
Bind is a convenience function to bind flags to a command, through newly created pflag.Flagset type. This function can be called any number of times for any command. desc - An optional name for the flag set (can be empty, but might end up useful). persistent - If true, the flags bound will apply to all subcommands of this command. cmd - The pointer to the command the flags should be bound to. flags - A function using this flag set as parameter, for you to register flags.
func BindArgCompletions ¶
func BindFlagCompletions ¶
BindFlagCompletions is a convenience function for binding completers to flags requiring arguments. (It wraps a few steps to be used through the *carapace.Carapace type so you don't have to bother). cmd - The target command/subcommand which flags to be completed. bind - A function using a map "flag-name":carapace.Action for you to bind completions to the flag.
See https://rsteube.github.io/carapace/ for a complete documentation of carapace completions.
func ExecuteFlagSet ¶
func LocalPathCompleter ¶
func NewCompletions ¶
NewCompletions registers the command to the application completion engine and returns you a type through which you can register all sorts of completions for this command, from flag arguments, positional ones, per index or remaining, etc.
See https://rsteube.github.io/carapace/ for a complete documentation of carapace completions.
func NewExecutable ¶
func NewExecutable(module string, path string, args []string, arch string, output bool, sac *implantpb.SacrificeProcess) (*implantpb.ExecuteBinary, error)
func ParseAssembly ¶
func ParseAssembly(ctx *clientpb.TaskContext) (interface{}, error)
func ParseBinaryParams ¶
func ParseFullBinaryParams ¶
func ParseResponse ¶
func ParseResponse(ctx *clientpb.TaskContext) (interface{}, error)
func ParseSacrifice ¶
func ParseSacrifice(cmd *cobra.Command) (*implantpb.SacrificeProcess, error)
func ParseStatus ¶
func ParseStatus(ctx *clientpb.TaskContext) (interface{}, error)
func PipelineFlagSet ¶
func RestrictTargets ¶
RestrictTargets generates a cobra annotation map with a single console.CommandHiddenFilter key to a comma-separated list of filters to use in order to expose/hide commands based on requirements. Ex: cmd.Annotations = RestrictTargets("windows") will only show the command if the target is Windows. Ex: cmd.Annotations = RestrictTargets("windows", "beacon") show the command if target is a beacon on Windows.
func SacrificeFlagSet ¶
func TlsCertFlagSet ¶
Types ¶
This section is empty.