output

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OutToFile 输出到文件
	OutToFile = 1
	// OutToScreen 输出到屏幕(termui)
	OutToScreen = 2
	// OutToNativeStdout 直接输出到stdout
	OutToNativeStdout = 4

	// CntTask 获取task个数
	CntTask = 0
	// TotalTask 获取task总数
	TotalTask = 1
	// CntJob 获取job个数
	CntJob = 2
	// TotalJob 获取job总数
	TotalJob = 3
)

Variables

This section is empty.

Functions

func AddJobCounter

func AddJobCounter()

AddJobCounter job数加1

func AddTaskCounter

func AddTaskCounter()

AddTaskCounter task数加1

func ClearTaskCounter

func ClearTaskCounter()

ClearTaskCounter task数清0(不是总数)

func FinishOutput

func FinishOutput(toWhere int32)

FinishOutput 在写完文件(当前任务写完之后下一个任务不使用和当前一样的文件)之后调用

func GetCounterSingle

func GetCounterSingle(which int8) int64

func InitOutput

func InitOutput(globInfo *fuzzTypes.Fuzz, toWhere int32)

InitOutput 初始化输出。此函数不能在多协程调用

func Log

func Log(toWhere int32, log string)

Log 记录日志,支持标准输出或termui,暂不支持文件

func LogOnce

func LogOnce(log string, toWhere int32)

LogOnce 只记录一次相同的日志

func Logf added in v0.1.1

func Logf(toWhere int32, fmtLog string, a ...any)

Logf 格式化输出日志

func ObjOutput

func ObjOutput(obj *ObjectOutput, toWhere int32)

ObjOutput 输出单个OutObj

func PendLog added in v0.1.1

func PendLog(log string)

PendLog 在init函数调用前记录日志,在init完成后一次性推送,若已经调用了init函数,则不能再使用此函数输出日志

func ScreenClose

func ScreenClose()

func SetJobCounter

func SetJobCounter(total int64)

SetJobCounter 设置job总数

func SetTaskCounter

func SetTaskCounter(total int64)

SetTaskCounter 设置task总数

func UpdateScreenInfoPage added in v0.1.1

func UpdateScreenInfoPage(newInfo *fuzzTypes.Fuzz)

func WaitForScreenQuit

func WaitForScreenQuit()

Types

type ObjectOutput

type ObjectOutput struct {
	XMLName  xml.Name        `json:"-" xml:"output"`
	Keywords []string        `json:"keywords" xml:"keywords>keyword"`
	Payloads []string        `json:"payloads" xml:"payloads>payload"`
	Request  *fuzzTypes.Req  `json:"request"  xml:"request"`
	Response *fuzzTypes.Resp `json:"response" xml:"response"`
	Msg      string          `json:"msg,omitempty" xml:"msg,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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