cmd

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CarbonCmd = &cobra.Command{
	Use:   "carbon",
	Short: "Carbon - Infrastructure automation for offensive operations.",
	Long: `Infrastructure automation for offensive operations.
- ℹ️ Checkout the latest docs [here](https://analog-substance.github.io/carbon/)
- 😢 Have a problem? [Create an Issue](https://github.com/analog-substance/carbon/issues/new?title=Something%20is%20broken)
- ❤️ Enjoying Carbon? [Star the Repo](https://github.com/analog-substance/carbon)


## Purpose

Carbon's primary purpose is to provide a consistent execution environment to
facilitate offensive security assessments.

## Dependencies

- Packer to build images.
- Terraform to provision infrastructure.
- Golang project structure.

## Supported Providers

- AWS
- QEMU (Local)
- VirtualBox (Local)
- vSphere (in progress)
- Multipass (Local)

There are plans to bring support to the following:

- GCP
- Azure
- VMware (Local)
- QEMU (Remote)
`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {

		if debug {
			common.LogLevel(slog.LevelDebug)
		}
		log.Debug("debug mode", "debug", debug)

		carbonConfigFile := &common.CarbonConfigFile{}
		err := viper.Unmarshal(carbonConfigFile)
		if err != nil {
			log.Debug("failed to unmarshal viper config to carbon config struct")
		}

		carbonObj = carbon.New(carbonConfigFile.Carbon)
		updateConfigHelp()

		return nil
	},
}

CarbonCmd represents the base command when called without any subcommands

Functions

func AskIfSure added in v0.3.5

func AskIfSure(msg string) bool

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ListingDir added in v0.2.0

func ListingDir(dir string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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