report

package
v0.0.0-...-ff8f6dd Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OutputDirectory = "./reports"

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonPocInfo

type JsonPocInfo struct {
	Id              string   `json:"id,omitempty"`
	InfoName        string   `json:"infoname,omitempty"`
	InfoAuthor      string   `json:"infoauthor,omitempty"`
	InfoSeverity    string   `json:"infoseg,omitempty"`
	InfoDescription string   `json:"infodescription,omitempty"`
	InfoReference   []string `json:"inforeference,omitempty"`
}

type JsonReport

type JsonReport struct {
	sync.RWMutex
	Result *result.Result

	ReportFile string
	JsonAll    bool
	// contains filtered or unexported fields
}

func NewJsonReport

func NewJsonReport(json, JsonAll string) (*JsonReport, error)

func (*JsonReport) Append

func (jr *JsonReport) Append() error

func (*JsonReport) AppendEndOfFile

func (jr *JsonReport) AppendEndOfFile() error

func (*JsonReport) JsonContent

func (jr *JsonReport) JsonContent() *JsonResult

func (*JsonReport) SetResult

func (jr *JsonReport) SetResult(result *result.Result)

type JsonReqResp

type JsonReqResp struct {
	Request  string `json:"request,omitempty"`
	Response string `json:"response,omitempty"`
}

type JsonResult

type JsonResult struct {
	IsVul      bool          `json:"isvul,omitempty"`
	Target     string        `json:"target`
	FullTarget string        `json:"fulltarget,omitempty"`
	PocInfo    JsonPocInfo   `json:"pocinfo,omitempty"`
	PocResult  []JsonReqResp `json:"pocresult,omitempty"`
}

type Report

type Report struct {
	sync.RWMutex
	Result *result.Result

	ReportFile string
	Template   TemplateStyle
	// contains filtered or unexported fields
}

func NewReport

func NewReport(fileName string, template TemplateStyle) (*Report, error)

fileName: the name of the report file template: the name of the template

func (*Report) Append

func (report *Report) Append(number string) error

func (*Report) SetResult

func (report *Report) SetResult(result *result.Result)

func (*Report) Write

func (report *Report) Write(data string) error

type TemplateStyle

type TemplateStyle int
const (
	DefaultTemplate TemplateStyle = iota
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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