utils

package
v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDirAndCreate

func CheckDirAndCreate(paths string) (bool, error)

func Stamp

func Stamp(mode string, cfg UserConfig, host string, vuln string) error

func WalkMatch

func WalkMatch(root, pattern string) ([]string, error)

Types

type App

type App struct {
	Version string
}

type Bounty

type Bounty struct {
	BugLink       string `yaml:"bug-link"`
	WriteUp       string `yaml:"writeup"`
	ApprovedScore string `yaml:"approved-score"`
	Reward        string `yaml:"reward"`
	Desc          string `yaml:"desc"`
}

type DirConfig

type DirConfig struct {
	HostsIdentityDir   string `yaml:"hosts-identity-dir"`
	VulnDir            string `yaml:"vuln-dir"`
	ToolsReports       string `yaml:"tools-reports"`
	PocDir             string `yaml:"poc-dir"`
	OutputReportsDir   string `yaml:"output-reports"`
	TemplatesReportDir string `yaml:"template-report-dir"`
}

type Exploratory

type Exploratory struct {
	Behaviour string  `yaml:"behaviour"`
	Type      string  `yaml:"type"`
	Desc      string  `yaml:"desc"`
	Images    []Image `yaml:"images"`
}

type Finding

type Finding struct {
	ID             string           `yaml:"id"`
	VulnInfo       VulnInfo         `yaml:"info"`
	ProofOfConcept []ProofOfConcept `yaml:"poc"`
	HowToFix       []HowToFix       `yaml:"how-to-fix"`
	Bounty         Bounty           `yaml:"bounty"`
	Status         Status           `yaml:"status"`
}

func (*Finding) Load

func (h *Finding) Load(filename string) *Finding

type HostIdentity

type HostIdentity struct {
	ID          string        `yaml:"id"`
	Info        HostInfo      `yaml:"info"`
	Recons      []Recon       `yaml:"recons"`
	VulnScans   []VulnScan    `yaml:"vuln-scans"`
	Exploratory []Exploratory `yaml:"exploratory"`
}

func (*HostIdentity) Load

func (h *HostIdentity) Load(filename string) *HostIdentity

type HostInfo

type HostInfo struct {
	URL          string  `yaml:"url"`
	TechStacks   string  `yaml:"tech-stacks"`
	Tag          string  `yaml:"tag"`
	OpenPorts    string  `yaml:"open-ports"`
	FilteredPort string  `yaml:"filtered-port"`
	HostIP       string  `yaml:"host-ip"`
	Country      string  `yaml:"country"`
	City         string  `yaml:"city"`
	Organization string  `yaml:"organization"`
	Others       []Other `yaml:"others"`
	Desc         string  `yaml:"desc"`
}

type HowToFix

type HowToFix struct {
	Information string `yaml:"info"`
	Desc        string `yaml:"desc"`
	URL         string `yaml:"url"`
	StepsToFix  []Step `yaml:"steps-to-fix"`
}

type Image

type Image struct {
	Path    string `json:"path"`
	Caption string `json:"caption"`
}

type Member

type Member struct {
	MemberName string `yaml:"name"`
	Role       string `yaml:"role"`
	Email      string `yaml:"email"`
}

type Other

type Other struct {
	Source string `yaml:"source"`
	Desc   string `yaml:"desc"`
	URL    string `yaml:"url"`
}

type Pandoc

type Pandoc []string

type ProofOfConcept

type ProofOfConcept struct {
	Path             string  `yaml:"path"`
	StepsToReproduce []Step  `yaml:"steps-to-reproduce"`
	Images           []Image `yaml:"images"`
	NucleiTemplate   string  `yaml:"nuclei-template"`
	Payload          string  `yaml:"payload"`
	Desc             string  `yaml:"desc"`
}

type Recon

type Recon struct {
	Tools    string  `yaml:"tools"`
	Type     string  `yaml:"type"`
	Report   string  `yaml:"report"`
	FileType string  `yaml:"file-type"` // STDOUT, YAML, XML, JSON
	Desc     string  `yaml:"desc"`
	Images   []Image `yaml:"images"`
}

type ReportVar

type ReportVar struct {
	Host  HostIdentity
	Vulns []Finding
	User  UserConfig
}

type RiskRating

type RiskRating struct {
	Severity string `yaml:"severity"`
	CVSS     string `yaml:"cvss-vector"`
	OWASP    string `yaml:"owasp-vector"`
}

type Stats

type Stats struct {
	VulnType []VulnType
}

type Status

type Status struct {
	Created    StatusFields `yaml:"created"`
	Reviewed   StatusFields `yaml:"reviewed"`
	Reported   StatusFields `yaml:"reported"`
	Approved   StatusFields `yaml:"approved"`
	Fixed      StatusFields `yaml:"fixed"`
	Validated  StatusFields `yaml:"validated"`
	Duplicated StatusFields `yaml:"duplicated"`
	Hold       StatusFields `yaml:"hold"`
	Rejected   StatusFields `yaml:"rejected"`
	Closed     StatusFields `yaml:"closed"`
	Completed  StatusFields `yaml:"completed"`
}

type StatusFields

type StatusFields struct {
	By   string `yaml:"by"`
	Time string `yaml:"time"`
	Desc string `yaml:"desc"`
}

type Step

type Step struct {
	Desc   string  `yaml:"desc"`
	Images []Image `yaml:"images"`
}

type Team

type Team struct {
	TeamName string   `yaml:"team-name"`
	Members  []Member `yaml:"members"`
	Desc     string   `yaml:"desc"`
}

type UserConfig

type UserConfig struct {
	ProjectOwner string    `yaml:"project-owner"`
	Group        string    `yaml:"group"`
	Teams        []Team    `yaml:"teams"`
	Email        string    `yaml:"email"`
	DirConfig    DirConfig `yaml:"dir-config"`
}

func (*UserConfig) GenerateConfig

func (cfg *UserConfig) GenerateConfig(name string) error

func (*UserConfig) GenerateHost

func (cfg *UserConfig) GenerateHost(host string) error

func (*UserConfig) GenerateUserConfig

func (cfg *UserConfig) GenerateUserConfig() []byte

func (*UserConfig) GenerateVuln

func (cfg *UserConfig) GenerateVuln(host string, nameVuln string) error

func (*UserConfig) Load

func (h *UserConfig) Load(filename string) *UserConfig

type VulnInfo

type VulnInfo struct {
	FindingName     string     `yaml:"finding-name"`
	URL             string     `yaml:"url"`
	Domain          string     `yaml:"domain"`
	Author          string     `yaml:"author"`
	Team            string     `yaml:"team"`
	Email           string     `yaml:"email"`
	Tags            string     `yaml:"tags"`
	VulnType        string     `yaml:"vuln-type"`
	ReportTemplate  string     `yaml:"report-template"`
	EksternalReport string     `yaml:"external-report"`
	RiskRatings     RiskRating `yaml:"risk-ratings"`
	Desc            string     `yaml:"desc"`
}

type VulnScan

type VulnScan struct {
	Tools    string  `yaml:"tools"`
	Type     string  `yaml:"type"`
	Report   string  `yaml:"report"`
	FileType string  `yaml:"file-type"` // STDOUT, YAML, XML, JSON
	Desc     string  `yaml:"desc"`
	Images   []Image `yaml:"images"`
}

type VulnType

type VulnType struct {
	Type       string
	ListOfVuln []string
}

Jump to

Keyboard shortcuts

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