Documentation ¶
Overview ¶
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ScanCmd = &cobra.Command{ Use: "scan", Short: "Command to start the scan", Long: `Command to start the scan, takes target ids from stdin and id of scan profile in flag, example: cat target_ids.txt | acucli scan --scanProfileID=47973ea9-018b-4294-9903-bb1cf3b1e886`, Run: func(cmd *cobra.Command, args []string) { targets := filehelper.ReadStdin() scanProfileID, _ := cmd.Flags().GetString("scanProfileID") var responseCode int for _, target := range targets { responseCode = startScan(target, scanProfileID) if responseCode == 200 { fmt.Printf("%sScan started: %s%s\n", chalk.Green, target, chalk.Reset) } else { fmt.Printf("%sError occured while starting scan%s\n", chalk.Red, chalk.Reset) } } }, }
scanCmd represents the scan command
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.