cmd

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:     "arsenic",
	Version: "v0.2.0",
	Short:   "Pentesting conventions",
	Long: `Arsenic - Pentest Conventions


`,
	Args: cobra.ArbitraryArgs,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if debug {
			log.LogLevel(slog.LevelDebug)
		}
		logger.Debug("debug mode", "debug", debug)
		return setOrRefreshConfig()
	},
	Run: func(cmd *cobra.Command, args []string) {
		if len(args) == 0 {
			cmd.Help()
			return
		}

		script, err := engine.NewScript(args[0])
		cobra.CheckErr(err)

		err = script.Run(args[1:])
		if err != nil && err != context.Canceled {
			fmt.Println(err)
			os.Exit(255)
		}
	},
}

Functions

func ExecScript

func ExecScript(script config.Script, args []string) error

func Execute

func Execute()

func ExecutePhaseScripts

func ExecutePhaseScripts(phase string, args []string, dryRun bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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