utils

package
v0.0.0-...-3e1336a Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CNNVDListDir

func CNNVDListDir() string

CNNVDListDir 获取cnnvd-list目录

func DefaultCacheDir

func DefaultCacheDir() string

DefaultCacheDir 设置缓存目录(cnnvd-list-update的目录)

func Fetch

func Fetch(method, url string, reqBody any, retry int) (res []byte, err error)

func FormatMonth

func FormatMonth(month int) string

func FormatURL

func FormatURL(domain, path string) string

func GenWorkers

func GenWorkers(num, wait int) chan<- func()

GenWorkers 将一个函数传入通道中,开个goroutine来执行

func GetFile

func GetFile(path string) ([]string, error)

func IsDir

func IsDir(path string) bool

IsDir 判断所给路径是否为文件夹

func PathExists

func PathExists(path string) (bool, error)

PathExists 判断所给路径是否存在

func RandInt

func RandInt() int

RandInt 返回一个[0,MaxInt64)的一个随机整数

func Read

func Read(filePath string) (any, error)

func Write

func Write(filePath string, data interface{}) error

Write 写入漏洞数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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