Documentation
¶
Index ¶
- Variables
- func AcmeConfigFlagSet(f *pflag.FlagSet)
- func AcmeFlagSet(f *pflag.FlagSet)
- func AddWizardFlag(cmd *cobra.Command)
- func AllPipelineCompleter(con *core.Console) carapace.Action
- func AllSessionIDCompleter(con *core.Console) carapace.Action
- func ArtifactCompleter(con *core.Console) carapace.Action
- func ArtifactFormatCompleter() carapace.Action
- func ArtifactNameCompleter(con *core.Console) carapace.Action
- 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 BindOutputFlags(cmd *cobra.Command)
- func BuildResourceCompleter(con *core.Console) carapace.Action
- func BuildTargetCompleter(con *core.Console) carapace.Action
- func BuildTypeCompleter(con *core.Console) carapace.Action
- func CLRFlagSet(f *pflag.FlagSet)
- func CertNameCompleter(con *core.Console) carapace.Action
- func CertTypeCompleter() carapace.Action
- func Confirm(cmd *cobra.Command, con *core.Console, prompt string) (bool, error)
- func EnableWizard(cmd *cobra.Command)
- func EnableWizardForCommands(cmds ...*cobra.Command)
- func EncryptionFlagSet(f *pflag.FlagSet)
- func ExecuteFlagSet(f *pflag.FlagSet)
- func ExternalMalCompleter(con *core.Console) carapace.Action
- func ExternalMalFileCompleter(con *core.Console) carapace.Action
- func GenerateFlagSet(f *pflag.FlagSet)
- func GithubFlagSet(f *pflag.FlagSet)
- func HandleTaskOutput(cmd *cobra.Command, con *core.Console, task *clientpb.Task) error
- func HttpPipelineCompleter(con *core.Console) carapace.Action
- func ImportSet(f *pflag.FlagSet)
- func ListenerIDCompleter(con *core.Console) carapace.Action
- func ListenerPipelineNameCompleter(con *core.Console, cmd *cobra.Command) carapace.Action
- func MalCompleter(con *core.Console) carapace.Action
- func MalHttpFlagset(f *pflag.FlagSet)
- func ModuleArtifactsCompleter(con *core.Console) carapace.Action
- func ModulesCompleter() carapace.Action
- func NewCompletions(cmd *cobra.Command) *carapace.Carapace
- func NewKVTable(title string, keys []string, values map[string]string) *tui.TableModel
- func OpsecConfirm(cmd *cobra.Command, con *core.Console) error
- func ParseBinaryDataFlags(cmd *cobra.Command) (string, string, bool, uint32)
- func ParseBinaryFlags(cmd *cobra.Command) (string, []string, bool, uint32)
- func ParseCLRFlags(cmd *cobra.Command) map[string]string
- func ParseEncryptionFlags(cmd *cobra.Command) (string, []*clientpb.Encryption)
- func ParseFullBinaryDataFlags(cmd *cobra.Command) (string, string, bool, uint32, string, string)
- func ParseFullBinaryFlags(cmd *cobra.Command) (string, []string, bool, uint32, string, string)
- func ParseGenerateFlags(cmd *cobra.Command) *clientpb.BuildConfig
- func ParseGithubFlags(cmd *cobra.Command) *clientpb.GithubActionBuildConfig
- func ParseImportCertFlags(cmd *cobra.Command) (*clientpb.TLS, error)
- func ParsePipelineFlags(cmd *cobra.Command) (string, string, string, uint32)
- func ParseProfileFlags(cmd *cobra.Command) (string, string)
- func ParseSacrificeFlags(cmd *cobra.Command) *implantpb.SacrificeProcess
- func ParseSecureFlags(cmd *cobra.Command) *clientpb.Secure
- func ParseSelfSignFlags(cmd *cobra.Command) *clientpb.CertificateSubject
- func ParseTLSFlags(cmd *cobra.Command) (*clientpb.TLS, string, error)
- func PipelineCompleter(con *core.Console, use string) carapace.Action
- func PipelineFlagSet(f *pflag.FlagSet)
- func ProfileCompleter(con *core.Console) carapace.Action
- func ProfileSet(f *pflag.FlagSet)
- func ProxyFlagSet(f *pflag.FlagSet)
- func Register(con *core.Console)
- func RemAgentCompleter(con *core.Console) carapace.Action
- func RemPipelineCompleter(con *core.Console) carapace.Action
- func RemoveCommandByName(parent *cobra.Command, name string)
- func RemoveCommandsByGroup(parent *cobra.Command, groupID string)
- func ResourceCompleter(con *core.Console) carapace.Action
- func RestrictTargets(filters ...string) map[string]string
- func RunTable(con *core.Console, tableModel *tui.TableModel) (bool, error)
- func SacrificeFlagSet(f *pflag.FlagSet)
- func SecureFlagSet(f *pflag.FlagSet)
- func SelfSignedFlagSet(f *pflag.FlagSet)
- func ServiceErrorControlCompleter() carapace.Action
- func ServiceStartTypeCompleter() carapace.Action
- func SessionAddonCompleter(con *core.Console) carapace.Action
- func SessionBundleCompleter(con *core.Console) carapace.Action
- func SessionIDCompleter(con *core.Console) carapace.Action
- func SessionModuleCompleter(con *core.Console) carapace.Action
- func SessionTaskCompleter(con *core.Console) carapace.Action
- func SetFlagSetGroup(flagSet *pflag.FlagSet, name string)
- func ShouldStartConsole(cmd *cobra.Command) bool
- func ShouldStartDaemon(cmd *cobra.Command) bool
- func ShouldStartRuntime(cmd *cobra.Command) bool
- func ShouldSuppressStartupOutput(cmd *cobra.Command) bool
- func ShouldUseStaticOutput(con *core.Console) bool
- func SyncCompleter(con *core.Console) carapace.Action
- func TaskTriggerTypeCompleter() carapace.Action
- func TlsCertFlagSet(f *pflag.FlagSet)
- func ValidateExecutionModeFlags(cmd *cobra.Command) error
- func WebContentCompleter(con *core.Console) carapace.Action
- func WebsiteCompleter(con *core.Console) carapace.Action
- func WrapPreRunEWithWizard(originalPreRunE func(cmd *cobra.Command, args []string) error, ...) func(cmd *cobra.Command, args []string) error
- func WrapRunEWithWizard(originalRunE func(cmd *cobra.Command, args []string) error) func(cmd *cobra.Command, args []string) error
Constants ¶
This section is empty.
Variables ¶
var StdinIsTerminal = func() bool { return term.IsTerminal(int(os.Stdin.Fd())) }
Functions ¶
func AcmeConfigFlagSet ¶ added in v0.3.0
func AcmeFlagSet ¶ added in v0.3.0
func AddWizardFlag ¶ added in v0.3.0
AddWizardFlag adds the --wizard flag to a command Deprecated: Use wizard.AddWizardFlag instead
func AllPipelineCompleter ¶ added in v0.0.3
func AllSessionIDCompleter ¶ added in v0.1.2
func ArtifactFormatCompleter ¶ added in v0.1.1
func ArtifactNameCompleter ¶ added in v0.0.3
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 BindOutputFlags ¶ added in v0.3.0
BindOutputFlags adds -f/--file flag to a command for saving output to a file.
func BuildResourceCompleter ¶ added in v0.1.1
func BuildTargetCompleter ¶ added in v0.0.3
func BuildTypeCompleter ¶ added in v0.1.0
func CLRFlagSet ¶ added in v0.0.3
func CertTypeCompleter ¶ added in v0.1.1
func EnableWizard ¶ added in v0.3.0
EnableWizard adds --wizard flag and wraps PreRunE for a command Deprecated: Use wizard.EnableWizard instead
func EnableWizardForCommands ¶ added in v0.3.0
EnableWizardForCommands enables wizard for multiple commands Deprecated: Use wizard.EnableWizardForCommands instead
func EncryptionFlagSet ¶ added in v0.0.3
func ExecuteFlagSet ¶
func ExternalMalCompleter ¶ added in v0.1.1
func ExternalMalFileCompleter ¶ added in v0.1.2
func GenerateFlagSet ¶ added in v0.0.3
func GithubFlagSet ¶ added in v0.1.0
func HandleTaskOutput ¶ added in v0.3.0
HandleTaskOutput optionally saves task output to file based on -f flag, then always displays output to console.
func HttpPipelineCompleter ¶ added in v0.1.1
func ListenerPipelineNameCompleter ¶ added in v0.0.3
func MalHttpFlagset ¶ added in v0.0.3
func ModuleArtifactsCompleter ¶ added in v0.1.1
func ModulesCompleter ¶ added in v0.1.0
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 NewKVTable ¶ added in v0.3.0
NewKVTable creates a two-column table using the standard border style, consistent with all other tables in the client. The header row displays the section title in the "Key" column.
func ParseBinaryDataFlags ¶ added in v0.1.0
func ParseBinaryFlags ¶ added in v0.0.3
func ParseEncryptionFlags ¶ added in v0.0.3
func ParseEncryptionFlags(cmd *cobra.Command) (string, []*clientpb.Encryption)
func ParseFullBinaryDataFlags ¶ added in v0.1.0
func ParseFullBinaryFlags ¶ added in v0.0.3
func ParseGenerateFlags ¶ added in v0.0.3
func ParseGenerateFlags(cmd *cobra.Command) *clientpb.BuildConfig
func ParseGithubFlags ¶ added in v0.1.0
func ParseGithubFlags(cmd *cobra.Command) *clientpb.GithubActionBuildConfig
func ParseImportCertFlags ¶ added in v0.1.1
func ParsePipelineFlags ¶ added in v0.0.3
func ParseProfileFlags ¶ added in v0.0.3
func ParseSacrificeFlags ¶ added in v0.0.3
func ParseSacrificeFlags(cmd *cobra.Command) *implantpb.SacrificeProcess
func ParseSelfSignFlags ¶ added in v0.1.1
func ParseSelfSignFlags(cmd *cobra.Command) *clientpb.CertificateSubject
ParseSelfSignFlags parses the self-signed certificate related flags from the command and returns a CertificateSubject proto message.
func ParseTLSFlags ¶ added in v0.0.3
func PipelineCompleter ¶ added in v0.1.1
func PipelineFlagSet ¶
func ProfileSet ¶ added in v0.0.3
func ProxyFlagSet ¶ added in v0.1.0
func RemPipelineCompleter ¶ added in v0.1.0
func RemoveCommandByName ¶ added in v0.3.0
RemoveCommandByName removes all commands with the given name from parent. Collects targets first to avoid slice mutation during iteration.
func RemoveCommandsByGroup ¶ added in v0.3.0
RemoveCommandsByGroup removes all commands belonging to the given group from parent. Collects targets first to avoid slice mutation during iteration.
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 SecureFlagSet ¶ added in v0.1.2
func SelfSignedFlagSet ¶ added in v0.1.1
func ServiceErrorControlCompleter ¶ added in v0.1.0
func ServiceStartTypeCompleter ¶ added in v0.1.0
func SessionAddonCompleter ¶ added in v0.0.3
func SessionBundleCompleter ¶ added in v0.3.0
func SessionModuleCompleter ¶ added in v0.0.3
func SessionTaskCompleter ¶ added in v0.0.3
func SetFlagSetGroup ¶ added in v0.1.0
func ShouldStartConsole ¶ added in v0.3.0
ShouldStartConsole reports whether the current command invocation should enter the interactive console/REPL after login.
func ShouldStartDaemon ¶ added in v0.3.0
func ShouldStartRuntime ¶ added in v0.3.0
func ShouldSuppressStartupOutput ¶ added in v0.3.0
func ShouldUseStaticOutput ¶ added in v0.3.0
func TaskTriggerTypeCompleter ¶ added in v0.1.0
func TlsCertFlagSet ¶
func ValidateExecutionModeFlags ¶ added in v0.3.0
func WebContentCompleter ¶ added in v0.1.0
func WrapPreRunEWithWizard ¶ added in v0.3.0
func WrapPreRunEWithWizard( originalPreRunE func(cmd *cobra.Command, args []string) error, originalPreRun func(cmd *cobra.Command, args []string), ) func(cmd *cobra.Command, args []string) error
WrapPreRunEWithWizard wraps a command's PreRunE to support wizard mode. Deprecated: Use wizard.WrapPreRunEWithWizard instead
Types ¶
This section is empty.