Documentation ¶
Index ¶
- Constants
- Variables
- func AesDecryptCBC(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptCFB(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)
- func AesEncryptCBC(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptCFB(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptECB(origData []byte, key []byte) (encrypted []byte)
- func BigIntToIPV6(i *big.Int) string
- func CheckDomain(domain string) bool
- func CheckFileExist(filepath string) bool
- func CheckIP(ip string) bool
- func CheckIPLocationInChinaMainLand(ipLocation string) bool
- func CheckIPOrSubnet(ip string) bool
- func CheckIPV4(ip string) bool
- func CheckIPV4Subnet(ip string) bool
- func CheckIPV6(ip string) bool
- func CheckIPV6Subnet(ip string) bool
- func DownloadFile(url, dstPathFile string) (bool, error)
- func FindDomain(content string) []string
- func FindIPV4(content string) []string
- func FormatHostUrl(protocol, host string, port int) string
- func GenerateRSAKey(bits int) (err error, publicKeyText []byte, privateKeyText []byte)
- func GenerateRSAKeyFile(bits int, savedKeyFilePath string) (err error)
- func GetClientIp() (ip string, err error)
- func GetFaviconSuffixUrl(u string) string
- func GetIPV6CIDRParsedFormat(ip string) string
- func GetIPV6FullFormat(ip string) string
- func GetIPV6ParsedFormat(ip string) string
- func GetIPV6SubnetC(ip string) string
- func GetOutBoundIP() (ip string, err error)
- func GetProtocol(host string, Timeout int64) (protocol string)
- func GetProxyHttpClient(isProxy bool) *http.Client
- func GetRandomString2(n int) string
- func GetTempPNGPathFileName() (pathFileName string)
- func GetTempPathDirName() (pathDirName string)
- func GetTempPathFileName() (pathFileName string)
- func GetThirdpartyBinNameByPlatform(binShortName BinShortName) (binPlatformName string)
- func IPV4ToUInt32(ip string) uint32
- func IPV6Prefix64ToUInt64(ip string) uint64
- func IPV6ToBigInt(ipString string) *big.Int
- func MD5(s string) string
- func MD5V3(str string) string
- func MakePath(filepath string) bool
- func MergeMapStringInt(dstMap map[string]int, srcMap map[string]int)
- func ParseHost(u string) string
- func ParseHostPort(u string) (string, int)
- func ParseHostUrl(u string) (isIpv6 bool, ip string, port int)
- func ParseIP(ip string) (ipResults []string)
- func RSADecrypt(cipherText []byte, keyFilePathName string) (plainText []byte, err error)
- func RSADecryptFromPemText(cipherText []byte, pemFileText []byte) (plainText []byte, err error)
- func RSAEncrypt(plainText []byte, keyFilePathName string) (cipherText []byte, err error)
- func RSAEncryptFromPemText(plainText []byte, pemFileText []byte) (cipherText []byte, err error)
- func ReSizeAndCropPicture(srcFile, dstFile string, width, height int) bool
- func ReSizePicture(srcFile, dstFile string, width, height int) bool
- func RemoveDuplicationElement(arr []string) []string
- func SetToSlice(setMap map[string]struct{}) (list []string)
- func SetToSliceBigInt(setMap map[*big.Int]struct{}) (list []*big.Int)
- func SetToSliceInt(setMap map[int]struct{}) (list []int)
- func SetToSliceStringInt(setMap map[string]int) (list []string)
- func SetToSliceUInt(setMap map[uint32]struct{}) (list []uint32)
- func SetToString(setMap map[string]struct{}) string
- func UInt32ToIPV4(ip uint32) string
- func Unzip(archiveFile, dstPath string) error
- func WrapperTCP(network, address string, timeout time.Duration) (net.Conn, error)
- func WrapperTCPWithSocks5(network, address string, forward *net.Dialer) (net.Conn, error)
- type BinShortName
- type Pair
- type PairList
- type TaskSlice
Constants ¶
const ( DefaultMode int = 0 SliceByLine int = 1 SliceByIP int = 2 SliceByPort int = 3 SliceByIPAndPort int = 4 DefaultIpSliceNumber int = 64 DefaultPortSliceNumber int = 1000 TopPorts1000 = "" /* 3813-byte string literal not displayed */ TopPorts100 = "" /* 393-byte string literal not displayed */ TopPorts10 = "21-23,80,139,443,445,3306,3389,8080" )
Variables ¶
var Socks5Proxy string
Functions ¶
func AesDecryptCBC ¶
func AesDecryptCFB ¶
func AesDecryptECB ¶
func AesEncryptCBC ¶
func AesEncryptCFB ¶
func AesEncryptECB ¶
func CheckDomain ¶
func CheckIPLocationInChinaMainLand ¶
CheckIPLocationInChinaMainLand 根据IP归属地判断是否是属于中国大陆的IP地区
func CheckIPOrSubnet ¶
CheckIPOrSubnet 通过正则检查是否是ipv4、ipv6地址或CIDR
func CheckIPV6Subnet ¶
func FormatHostUrl ¶
FormatHostUrl 将ipv4/v6生成url格式,ipv6生成url时,必须增加[]
func GenerateRSAKey ¶
GenerateRSAKey 生成RSA私钥和公钥,保存到文件中
func GenerateRSAKeyFile ¶
GenerateRSAKeyFile 生成RSA私钥和公钥,保存到文件中
func GetFaviconSuffixUrl ¶
GetFaviconSuffixUrl 获取favicon文件的后缀名称
func GetIPV6CIDRParsedFormat ¶
GetIPV6CIDRParsedFormat 将IPv6地址段进行格式化(缩写)
func GetIPV6FullFormat ¶
GetIPV6FullFormat 将IPv6地址进行格式化(完全展开格式)
func GetIPV6ParsedFormat ¶
GetIPV4ParsedFormat 将IPv6地址进行格式化(缩写)
func GetProtocol ¶
GetProtocol 检测URL协议
func GetProxyHttpClient ¶
GetProxyHttpClient 获取代理的http client
func GetTempPNGPathFileName ¶
func GetTempPNGPathFileName() (pathFileName string)
GetTempPNGPathFileName 获取一个临时文件名,后缀为PNG
func GetTempPathDirName ¶
func GetTempPathDirName() (pathDirName string)
GetTempPathDirName 获取一个临时目录
func GetTempPathFileName ¶
func GetTempPathFileName() (pathFileName string)
GetTempPathFileName 获取一个临时文件名
func GetThirdpartyBinNameByPlatform ¶
func GetThirdpartyBinNameByPlatform(binShortName BinShortName) (binPlatformName string)
GetThirdpartyBinNameByPlatform 根据当前运行平台及架构,生成指定的文件名称
func IPV6Prefix64ToUInt64 ¶
IPV6Prefix64ToUInt64 将IPv6地址段的Prefix段(前64位)转换为uint64
func ParseHostPort ¶
ParseHostPort 将http://a.b.c:80/这种url去除不相关的字符,返回主机名,端口号
func ParseHostUrl ¶
ParseHostUrl ipv4/v6地址格式识别的通用函数,用于识别ipv4,ipv4:port,ipv6,[ipv6],[ipv6]:port的形式
func RSADecrypt ¶
RSADecrypt RSA解密
func RSADecryptFromPemText ¶
RSADecryptFromPemText RSA解密
func RSAEncrypt ¶
RSAEncrypt RSA加密
func RSAEncryptFromPemText ¶
RSAEncryptFromPemText RSA加密
func ReSizeAndCropPicture ¶
ReSizeAndCropPicture 对图片文件尺寸缩放、剪裁
func ReSizePicture ¶
ReSizePicture 对图片文件尺寸缩放
func RemoveDuplicationElement ¶
RemoveDuplicationElement 去除重复切片元素
func SetToSlice ¶
SetToSlice 将Set(由map模拟实现)结果转化为列表结果
func SetToSliceBigInt ¶
SetToSliceBigInt 将Set(由map模拟实现)结果转化为列表结果
func SetToSliceInt ¶
SetToSliceInt 将Set(由map模拟实现)结果转化为列表结果
func SetToSliceStringInt ¶
SetToSliceStringInt 将Set(由map模拟实现)结果转化为列表结果
func SetToSliceUInt ¶
SetToSliceUInt 将Set(由map模拟实现)结果转化为列表结果
func SetToString ¶
SetToString 将Set(由map模拟实现)结果转化为拼结的字符
Types ¶
type BinShortName ¶
type BinShortName string
const ( ObserverWard BinShortName = "observer_ward" MassDns BinShortName = "massdns" Xray BinShortName = "xray" Nuclei BinShortName = "nuclei" Worker BinShortName = "worker" Httpx BinShortName = "httpx" Subfinder BinShortName = "subfinder" Fingerprintx BinShortName = "fingerprintx" Gogo BinShortName = "gogo" )
type PairList ¶
type PairList []Pair
func SortMapByValue ¶
SortMapByValue 对map[string]int按value排序,返回k,v的列表