scangroup

package
v0.0.0-...-21df278 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSubDomain

func ValidateSubDomain(fl validator.FieldLevel) bool

TODO: should probably make this better/find a good example.

func VerifyWebScanPorts

func VerifyWebScanPorts(webPorts, tcpPorts []int32) ([]int32, []int32, bool)

VerifyWebScanPorts a terribly inefficient method of validating webports are a subset of tcpports and removes duplicates

Types

type ScanGroupDetails

type ScanGroupDetails struct {
	GroupName          string   `json:"group_name" validate:"required,gte=1,lte=128,excludesall=/"`
	PortScanEnabled    bool     `json:"port_scan_enabled"`
	CustomSubNames     []string `json:"custom_sub_names" validate:"omitempty,max=100,dive,gte=1,lte=128,subdomain"`
	CustomWebPorts     []int32  `json:"custom_web_ports" validate:"omitempty,max=10,dive,gte=1,lte=65535"`
	TCPPorts           []int32  `json:"tcp_ports" validate:"omitempty,max=50,dive,gte=1,lte=65535"`
	AllowedTLDs        []string `json:"allowed_tlds" validate:"omitempty,max=100"`
	AllowedHosts       []string `json:"allowed_hosts" validate:"omitempty,max=5000"`
	DisallowedTLDs     []string `json:"disallowed_tlds" validate:"omitempty,max=100"`
	DisallowedHosts    []string `json:"disallowed_hosts" validate:"omitempty,max=5000"`
	PortsPerSecond     int32    `json:"ports_per_second" validate:"omitempty,gte=1,lte=50"`
	ConcurrentRequests int32    `json:"concurrent_requests" validate:"required,gte=1,lte=20"` // lte 25, beta is limited to 10
	ArchiveAfterDays   int32    `json:"archive_after_days" validate:"required,gte=2,lte=14"`
}

type ScanGroupEnv

type ScanGroupEnv struct {
	Env    string
	Region string
}

type ScanGroupHandlers

type ScanGroupHandlers struct {
	ContextExtractor middleware.UserContextExtractor
	// contains filtered or unexported fields
}

func New

func New(scanGroupClient am.ScanGroupService, userClient am.UserService, orgClient am.OrganizationService, env *ScanGroupEnv) *ScanGroupHandlers

func (*ScanGroupHandlers) CreateScanGroup

func (h *ScanGroupHandlers) CreateScanGroup(w http.ResponseWriter, req *http.Request)

func (*ScanGroupHandlers) DeleteScanGroup

func (h *ScanGroupHandlers) DeleteScanGroup(w http.ResponseWriter, req *http.Request)

func (*ScanGroupHandlers) GetGroupStats

func (h *ScanGroupHandlers) GetGroupStats(w http.ResponseWriter, req *http.Request)

func (*ScanGroupHandlers) GetScanGroupByID

func (h *ScanGroupHandlers) GetScanGroupByID(w http.ResponseWriter, req *http.Request)

func (*ScanGroupHandlers) GetScanGroupByName

func (h *ScanGroupHandlers) GetScanGroupByName(w http.ResponseWriter, req *http.Request)

func (*ScanGroupHandlers) GetScanGroups

func (h *ScanGroupHandlers) GetScanGroups(w http.ResponseWriter, req *http.Request)

func (*ScanGroupHandlers) UpdateScanGroup

func (h *ScanGroupHandlers) UpdateScanGroup(w http.ResponseWriter, req *http.Request)

func (*ScanGroupHandlers) UpdateScanGroupStatus

func (h *ScanGroupHandlers) UpdateScanGroupStatus(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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