utils

package
v1.8.17 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) bool

func GetAllFile

func GetAllFile(dirPath string) (results []string, err error)

func GetCert

func GetCert(resp *req.Response) (cert string)

func GetHeaderMap

func GetHeaderMap(resp *req.Response) (headerMap map[string]string)

func GetHeaderString

func GetHeaderString(resp *req.Response) (headerString string)

func HasInt

func HasInt(datas []int, to int) bool

func HasStr

func HasStr(datas []string, to string) bool

func Md5

func Md5(s string) string

func NewReqClient

func NewReqClient(proxy string, timeout int, headers []string) *req.Client

func RandFromChoices

func RandFromChoices(n int, choices string) string

RandFromChoices 从choices里面随机获取

func RandLetterNumbers

func RandLetterNumbers(n int) string

RandLetterNumbers 随机大小写字母和数字

func RandLetters

func RandLetters(n int) string

RandLetters 随机小写字母

func RandLowLetterNumber

func RandLowLetterNumber(n int) string

RandLowLetterNumber 随机小写字母和数字

func ReadFile

func ReadFile(filename string) (bytes []byte, err error)

func ReadLines

func ReadLines(filename string) (lines []string, err error)

func RemoveDuplicate

func RemoveDuplicate(list []string) []string

func SaveMarshal

func SaveMarshal(filename string, results interface{}) (err error)

func SuffixStr added in v1.7.5

func SuffixStr(datas []string, to string) (string, bool)

func WriteFile

func WriteFile(filename string, data string) (err error)

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

func NewCLI

func NewCLI(outputFile string) *CLI

func (*CLI) Write

func (w *CLI) Write(data []byte, level levels.Level)

Jump to

Keyboard shortcuts

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