Documentation ¶
Index ¶
- Constants
- func CmdExists(name string, cmd *cobra.Command) bool
- func Commands(con *console.SliverClient) []*cobra.Command
- func ExtensionLoadCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
- func ExtensionRegisterCommand(extCmd *ExtCommand, cmd *cobra.Command, con *console.SliverClient)
- func ExtensionsCmd(cmd *cobra.Command, con *console.SliverClient)
- func ExtensionsCommandNameCompleter(con *console.SliverClient) carapace.Action
- func ExtensionsInstallCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
- func ExtensionsListCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
- func ExtensionsRemoveCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
- func InstallFromDir(extLocalPath string, promptToOverwrite bool, con *console.SliverClient, ...)
- func ManifestCompleter() carapace.Action
- func PrintExtOutput(extName string, commandName string, outputSchema *packages.OutputSchema, ...)
- func PrintExtensions(con *console.SliverClient)
- func RemoveExtensionByCommandName(commandName string, con *console.SliverClient) error
- func RemoveExtensionByManifestName(manifestName string, con *console.SliverClient) (bool, error)
- type ExtCommand
- type ExtensionManifest
- type ExtensionManifest_
Constants ¶
const (
// ManifestFileName - Extension manifest file name.
ManifestFileName = "extension.json"
)
Variables ¶
This section is empty.
Functions ¶
func Commands ¶
func Commands(con *console.SliverClient) []*cobra.Command
Commands returns the “ command and its subcommands.
func ExtensionLoadCmd ¶
func ExtensionLoadCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
ExtensionLoadCmd - Load extension command.
func ExtensionRegisterCommand ¶
func ExtensionRegisterCommand(extCmd *ExtCommand, cmd *cobra.Command, con *console.SliverClient)
ExtensionRegisterCommand - Register a new extension command
func ExtensionsCmd ¶
func ExtensionsCmd(cmd *cobra.Command, con *console.SliverClient)
ExtensionsCmd - List information about installed extensions.
func ExtensionsCommandNameCompleter ¶
func ExtensionsCommandNameCompleter(con *console.SliverClient) carapace.Action
ExtensionsCommandNameCompleter - Completer for installed extensions command names.
func ExtensionsInstallCmd ¶
func ExtensionsInstallCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
ExtensionsInstallCmd - Install an extension.
func ExtensionsListCmd ¶
func ExtensionsListCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
ExtensionsListCmd - List all extension loaded on the active session/beacon.
func ExtensionsRemoveCmd ¶
func ExtensionsRemoveCmd(cmd *cobra.Command, con *console.SliverClient, args []string)
ExtensionsRemoveCmd - Remove an extension.
func InstallFromDir ¶
func InstallFromDir(extLocalPath string, promptToOverwrite bool, con *console.SliverClient, isGz bool)
Install an extension from a directory
func ManifestCompleter ¶
func PrintExtOutput ¶
func PrintExtOutput(extName string, commandName string, outputSchema *packages.OutputSchema, callExtension *sliverpb.CallExtension, con *console.SliverClient)
PrintExtOutput - Print the ext execution output.
func PrintExtensions ¶
func PrintExtensions(con *console.SliverClient)
PrintExtensions - Print a list of loaded extensions.
func RemoveExtensionByCommandName ¶
func RemoveExtensionByCommandName(commandName string, con *console.SliverClient) error
RemoveExtensionByCommandName - Remove an extension by command name.
func RemoveExtensionByManifestName ¶
func RemoveExtensionByManifestName(manifestName string, con *console.SliverClient) (bool, error)
RemoveExtensionByManifestName - remove by the named manifest, returns true if manifest was removed, false if no manifest with that name was found
Types ¶
type ExtCommand ¶
type ExtCommand struct { CommandName string `json:"command_name"` Help string `json:"help"` LongHelp string `json:"long_help"` Files []*extensionFile `json:"files"` Arguments []*extensionArgument `json:"arguments"` Entrypoint string `json:"entrypoint"` DependsOn string `json:"depends_on"` Init string `json:"init"` Schema *packages.OutputSchema `json:"schema"` Manifest *ExtensionManifest }
type ExtensionManifest ¶
type ExtensionManifest struct { Name string `json:"name"` Version string `json:"version"` ExtensionAuthor string `json:"extension_author"` OriginalAuthor string `json:"original_author"` RepoURL string `json:"repo_url"` ExtCommand []*ExtCommand `json:"commands"` RootPath string `json:"-"` ArmoryName string `json:"-"` ArmoryPK string `json:"-"` }
func LoadExtensionManifest ¶
func LoadExtensionManifest(manifestPath string) (*ExtensionManifest, error)
LoadExtensionManifest - Parse extension files.
func ParseExtensionManifest ¶
func ParseExtensionManifest(data []byte) (*ExtensionManifest, error)
parseExtensionManifest - Parse extension manifest from buffer (legacy, only parses one)
type ExtensionManifest_ ¶
type ExtensionManifest_ struct { Name string `json:"name"` CommandName string `json:"command_name"` Version string `json:"version"` ExtensionAuthor string `json:"extension_author"` OriginalAuthor string `json:"original_author"` RepoURL string `json:"repo_url"` Help string `json:"help"` LongHelp string `json:"long_help"` Files []*extensionFile `json:"files"` Arguments []*extensionArgument `json:"arguments"` Entrypoint string `json:"entrypoint"` DependsOn string `json:"depends_on"` Init string `json:"init"` RootPath string `json:"-"` }