Documentation
¶
Index ¶
- Constants
- Variables
- func CreateHttpClient() *http.Client
- func CreateReqClient() *req.Client
- func CreateRestyClient() *resty.Client
- func ExtractAESKey(hash []byte, start, end int) ([]byte, error)
- func ExtractDESKey(hash []byte, start, end int) ([]byte, error)
- func HttpGet(target string, proxyURL string) ([]byte, error)
- func HttpGetString(target string, proxy string) string
- func RandomICONUrl() string
- func RandomUserAgent() string
- func Req(url string, proxy string) ([]byte, error)
- func ReqIOReader(url string, proxy string) io.Reader
- func ReqStrings(url string, proxy string) string
- func RestyGet(target string, proxyURL string) ([]byte, error)
- func RestyGetString(target string, proxyURL string) string
- func SHA256Hash(url string, proxy string) []byte
- func UserAgentHeader() map[string]string
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 ¶
View Source
var ICONUrl = []string{ BaiduIcoUrl, ThreatbookIcoUrl, QianxinIcoUrl, AhIcoUrl, QhIcoUrl, QmIcoUrl, CtIcoUrl, }
Functions ¶
func CreateReqClient ¶
CreateReqClient 创建Req客户端 采用链式调用优化,集成高级特性如TLS指纹模拟
func CreateRestyClient ¶
CreateRestyClient 创建预配置的Resty客户端(逻辑压缩版)
func ExtractAESKey ¶
ExtractAESKey 从SHA-256哈希值中提取128位(16字节)AES密钥 参数:
hash: SHA-256哈希值(16进制格式) start: 密钥起始索引(包含) end: 密钥结束索引(不包含)
返回值:
[]byte: 提取的AES密钥 error: 如果范围无效返回错误
func ExtractDESKey ¶
ExtractDESKey 从SHA-256哈希值中提取64位(8字节)DES密钥 参数:
hash: SHA-256哈希值(16进制格式) start: 密钥起始索引(包含) end: 密钥结束索引(不包含)
返回值:
[]byte: 提取的DES密钥 error: 如果范围无效返回错误
func HttpGetString ¶
HttpGetString 远程读取,返回 string 类型
func ReqIOReader ¶
ReqIOReader 远程读取,返回 string 类型
func RestyGetString ¶
RestyGetString 远程读取,返回 string 类型
func SHA256Hash ¶
SHA256Hash 计算从指定URL获取内容的SHA-256哈希值 参数:
url: 要获取内容的URL地址 proxy: 可选的代理服务器地址
返回值:
[]byte: 内容的SHA-256哈希值(16进制格式)
func UserAgentHeader ¶
UserAgentHeader 返回包含User-Agent的HTTP头
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.