Documentation
¶
Index ¶
- Constants
- Variables
- func CheckFile(data []byte) bool
- func GetOnline() ([]byte, error)
- type CDNCheck
- func (c *CDNCheck) Check(domain string) (isCDN bool, CDNName string, CName string)
- func (c *CDNCheck) CheckASN(ip string) (isCDN bool)
- func (c *CDNCheck) CheckCName(domain string) (isCDN bool, CDNName string, CName string)
- func (c *CDNCheck) CheckIP(ip string) (isCDN bool)
- func (c *CDNCheck) CloseGeoASNDb()
- func (c *CDNCheck) LoadGeoASNDb() error
- type Ipv4Location
- type Ipv6Location
- type QQwry
- type Response
- type ResultQQwry
- type Service
Constants ¶
View Source
const ( // IndexLen 索引长度 IndexLen = 7 // RedirectMode1 国家的类型, 指向另一个指向 RedirectMode1 = 0x01 // RedirectMode2 国家的类型, 指向一个指向 RedirectMode2 = 0x02 )
View Source
const UnknownService = "unknown"
Variables ¶
View Source
var IPData fileData
IPData IP库的数据
Functions ¶
Types ¶
type CDNCheck ¶
type CDNCheck struct {
// contains filtered or unexported fields
}
func (*CDNCheck) CheckCName ¶
CheckCName 检查域名的CNAME,判断是否是CDN
func (*CDNCheck) CloseGeoASNDb ¶
func (c *CDNCheck) CloseGeoASNDb()
func (*CDNCheck) LoadGeoASNDb ¶
type Ipv4Location ¶
type Ipv4Location struct {
// 用于自定义IP归属地库
WorkspaceId string
// contains filtered or unexported fields
}
func NewIPv4Location ¶
func NewIPv4Location(workspaceId string) *Ipv4Location
NewIPv4Location 创建iplocation对象
func (*Ipv4Location) Find ¶
func (ipl *Ipv4Location) Find(ip string) string
Find 查询IP归属地,先查询自定义IP归属地库,再查询公网的纯真IP数据库
func (*Ipv4Location) FindCustomIP ¶
func (ipl *Ipv4Location) FindCustomIP(ip string) string
FindCustomIP 查询自定义IP归属地
func (*Ipv4Location) FindPublicIP ¶
func (ipl *Ipv4Location) FindPublicIP(ip string) string
FindPublicIP 查询纯真数据库获取公网IP归属地
type Ipv6Location ¶
func NewIPv6Location ¶
func NewIPv6Location() (*Ipv6Location, error)
func (*Ipv6Location) Find ¶
func (db *Ipv6Location) Find(query string) string
type QQwry ¶
type QQwry struct {
Data *fileData
Offset int64
}
QQwry 纯真ip库
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response 向客户端返回数据的
type ResultQQwry ¶
type ResultQQwry struct {
IP string `json:"ip"`
Country string `json:"country"`
Area string `json:"area"`
}
ResultQQwry 归属地信息
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) FindService ¶
FindService 查找端口服务 否则从nmap定义的服务类型中进行查找
Click to show internal directories.
Click to hide internal directories.