Documentation
¶
Index ¶
- Variables
- 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 CheckIPLocationInChinaOther(ipLocation string) bool
- func CheckIPLocationOutsideChina(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 CompareStringSlices(s1, s2 []string, isSort bool) bool
- func DownloadFile(url, dstPathFile string) (bool, error)
- func FormatPorts(ports []int) string
- func FormatTargetByPortList(target string, portList []int) string
- func GetClientIp() (ip string, err error)
- func GetDomainName(domain string) string
- func GetDomainPort(domain string) int
- func GetFaviconSuffixUrl(u string) string
- func GetFaviconSuffixUrlFile(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 IPV6DoubleInt64ToString(highSum, lowSum uint64) string
- func IPV6Prefix64ToUInt64(ip string) uint64
- func IPV6ToBigInt(ipString string) *big.Int
- func IPV6ToDoubleInt64(ipString string) (uint64, uint64)
- func MD5(s string) string
- func MD5Bytes(b []byte) string
- func MakePath(filepath string) bool
- func MarshalTargetMap(targetMap map[string]string) string
- func MergeMapStringInt(dstMap map[string]int, srcMap map[string]int)
- func MergeTarget(targets ...string) string
- 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 ParsePortList(portList string) []int
- func ReSizeAndCropPicture(srcFile, dstFile string, width, height int) bool
- func ReSizePicture(srcFile, dstFile string, width, height int) bool
- func RemoveDuplicatesAndSort(arr []string) []string
- func RemoveDuplicationElement(arr []string) []string
- func ReturnListTypedTargetMap(typeKey string, targets []string) (targetMap map[string]string)
- func ReturnTypedTargetMap(typeKey string, target string) (targetMap map[string]string)
- func SHA512(s 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 SortTimeMap(m map[time.Time]string, isDesc bool) []string
- func SplitPort(portList string, sliceNumber int) []string
- func UInt32ToIPV4(ip uint32) string
- func UnmarshalTargetMap(content string) (targetMap map[string]string)
- 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 TldExtract
Constants ¶
This section is empty.
Variables ¶
var ( TopPorts1000 = "" /* 3813-byte string literal not displayed */ TopPorts100 = "" /* 393-byte string literal not displayed */ TopPorts10 = "21-23,80,139,443,445,3306,3389,8080" )
var Socks5Proxy string
Functions ¶
func CheckDomain ¶
func CheckIPLocationInChinaMainLand ¶
CheckIPLocationInChinaMainLand 根据IP归属地判断是否是属于中国大陆的IP地区
func CheckIPLocationInChinaOther ¶
CheckIPLocationInChinaOther 根据IP归属地判断是否是属于中国非大陆地区
func CheckIPLocationOutsideChina ¶
CheckIPLocationOutsideChina 根据IP归属地判断是否是属于非中国区域
func CheckIPOrSubnet ¶
CheckIPOrSubnet 通过正则检查是否是ipv4、ipv6地址或CIDR
func CheckIPV6Subnet ¶
func CompareStringSlices ¶
func FormatPorts ¶ added in v3.2.0
FormatPorts 将端口号切片格式化为端口列表字符串
func FormatTargetByPortList ¶ added in v3.2.0
func GetDomainName ¶
func GetDomainPort ¶
func GetFaviconSuffixUrl ¶
GetFaviconSuffixUrl 获取favicon文件的后缀名称
func GetFaviconSuffixUrlFile ¶
GetFaviconSuffixUrlFile 获取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 IPV6DoubleInt64ToString ¶
func IPV6Prefix64ToUInt64 ¶
IPV6Prefix64ToUInt64 将IPv6地址段的Prefix段(前64位)转换为uint64
func IPV6ToDoubleInt64 ¶
IPV6ToDoubleInt64 ipv6转换为两个int64
func MarshalTargetMap ¶ added in v3.2.0
func MergeTarget ¶ added in v3.2.0
func ParseHostPort ¶
ParseHostPort 将http://a.b.c:80/这种url去除不相关的字符,返回主机名,端口号
func ParseHostUrl ¶
ParseHostUrl ipv4/v6地址格式识别的通用函数,用于识别ipv4,ipv4:port,ipv6,[ipv6],[ipv6]:port的形式
func ParsePortList ¶ added in v3.2.0
ParsePortList 解析端口列表字符串为单个端口号
func ReSizeAndCropPicture ¶
ReSizeAndCropPicture 对图片文件尺寸缩放、剪裁
func ReSizePicture ¶
ReSizePicture 对图片文件尺寸缩放
func RemoveDuplicatesAndSort ¶ added in v3.1.0
RemoveDuplicatesAndSort 将字符串数组转换为小写,去除重复元素并排序
func RemoveDuplicationElement ¶
RemoveDuplicationElement 去除重复切片元素
func ReturnListTypedTargetMap ¶ added in v3.2.0
func ReturnTypedTargetMap ¶ added in v3.2.0
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模拟实现)结果转化为拼结的字符
func UnmarshalTargetMap ¶ added in v3.2.0
Types ¶
type BinShortName ¶
type BinShortName string
const ( MassDns BinShortName = "massdns" Nuclei BinShortName = "nuclei" Worker BinShortName = "worker" Server BinShortName = "server" Httpx BinShortName = "httpx" Subfinder BinShortName = "subfinder" Fingerprintx BinShortName = "fingerprintx" Gogo BinShortName = "gogo" Zombie BinShortName = "zombie" )
type PairList ¶
type PairList []Pair
func SortMapByValue ¶
SortMapByValue 对map[string]int按value排序,返回k,v的列表
type TldExtract ¶ added in v3.2.0
type TldExtract struct {
// contains filtered or unexported fields
}
func (*TldExtract) ExtractFLD ¶ added in v3.2.0
func (t *TldExtract) ExtractFLD(url string) (fldDomain string)
ExtractFLD 从url或domain中提取FLD