util

package
v0.0.0-...-47e6808 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandomBytes

func GetRandomBytes(l int) []byte

GetRandomBytes 获取包含随机字母的 byte 数组

func GetRandomString

func GetRandomString(l int) string

GetRandomString 获取随机字符串

func Struct2Map

func Struct2Map(obj interface{}) map[string]interface{}

Struct2Map 结构转map

func TCPSend

func TCPSend(netloc string, data []byte, timeout int) ([]byte, error)

TCPSend 指定目标发送tcp报文,返回结果(仅适用于一次交互即可判断漏洞的场景)

Types

type Resp

type Resp struct {
	Body        []byte
	Other       *http.Response
	RequestRaw  string
	ResponseRaw string
}

Resp 封装的http返回包

func RequestDo

func RequestDo(request *http.Request, hasRaw bool, timeout int) (Resp, error)

RequestDo 发送指定的request,返回结果结构,hasRaw参数决定是否返回原始请求包和返回包内容

Jump to

Keyboard shortcuts

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