remote

package
v0.0.0-...-56df863 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AESKeyLength AES密钥所需字节长度(16字节 = 128位)
	AESKeyLength = 16
	// DESKeyLength DES密钥所需字节长度(8字节 = 64位)
	DESKeyLength = 8
	// SHA256HexLength SHA-256哈希值的16进制表示长度
	SHA256HexLength = 64
)
View Source
const (
	BaiduIcoUrl      = "https://www.baidu.com/favicon.ico"
	ThreatbookIcoUrl = "https://x.threatbook.com/public/asset/img/favicon.ico"
	QianxinIcoUrl    = "https://www.qianxin.com/favicon.ico"
	AhIcoUrl         = "https://www.dbappsecurity.com.cn/images/favicon.ico"
	QhIcoUrl         = "https://www.360.cn/favicon.ico"
	QmIcoUrl         = "https://www.venustech.com.cn/r/cms/www/default/images/favicon.ico"
	CtIcoUrl         = "https://www.chaitin.cn/favicon.ico"
)

Variables

Functions

func CreateHttpClient

func CreateHttpClient() *http.Client

CreateHttpClient 创建标准库HTTP客户端(优化配置顺序)

func CreateReqClient

func CreateReqClient() *req.Client

CreateReqClient 创建Req客户端 采用链式调用优化,集成高级特性如TLS指纹模拟

func CreateRestyClient

func CreateRestyClient() *resty.Client

CreateRestyClient 创建预配置的Resty客户端(逻辑压缩版)

func ExtractAESKey

func ExtractAESKey(hash []byte, start, end int) ([]byte, error)

ExtractAESKey 从SHA-256哈希值中提取128位(16字节)AES密钥 参数:

hash: SHA-256哈希值(16进制格式)
start: 密钥起始索引(包含)
end: 密钥结束索引(不包含)

返回值:

[]byte: 提取的AES密钥
error: 如果范围无效返回错误

func ExtractDESKey

func ExtractDESKey(hash []byte, start, end int) ([]byte, error)

ExtractDESKey 从SHA-256哈希值中提取64位(8字节)DES密钥 参数:

hash: SHA-256哈希值(16进制格式)
start: 密钥起始索引(包含)
end: 密钥结束索引(不包含)

返回值:

[]byte: 提取的DES密钥
error: 如果范围无效返回错误

func HttpGet

func HttpGet(target string, proxyURL string) ([]byte, error)

HttpGet 远程读取,返回 []byte 类型

func HttpGetString

func HttpGetString(target string, proxy string) string

HttpGetString 远程读取,返回 string 类型

func RandomICONUrl

func RandomICONUrl() string

RandomICONUrl 随机选择一个图标URL 返回: 随机选择的图标URL字符串

func RandomUserAgent

func RandomUserAgent() string

RandomUserAgent 生成随机User-Agent字符串

func Req

func Req(url string, proxy string) ([]byte, error)

Req 远程读取,返回 []byte 类型

func ReqIOReader

func ReqIOReader(url string, proxy string) io.Reader

ReqIOReader 远程读取,返回 string 类型

func ReqStrings

func ReqStrings(url string, proxy string) string

ReqStrings 远程读取,返回 string 类型

func RestyGet

func RestyGet(target string, proxyURL string) ([]byte, error)

RestyGet Get 请求远程读取,返回 []byte 类型

func RestyGetString

func RestyGetString(target string, proxyURL string) string

RestyGetString 远程读取,返回 string 类型

func SHA256Hash

func SHA256Hash(url string, proxy string) []byte

SHA256Hash 计算从指定URL获取内容的SHA-256哈希值 参数:

url: 要获取内容的URL地址
proxy: 可选的代理服务器地址

返回值:

[]byte: 内容的SHA-256哈希值(16进制格式)

func UserAgentHeader

func UserAgentHeader() map[string]string

UserAgentHeader 返回包含User-Agent的HTTP头

Types

This section is empty.

Jump to

Keyboard shortcuts

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