scan

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

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

type Schedule

type Schedule struct {
	Disable       bool    `json:"disable"`
	TimeSensitive bool    `json:"time_sensitive"`
	StartDate     *string `json:"start_date"`
}

Jump to

Keyboard shortcuts

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