mirror of https://github.com/mpolden/echoip
better empty threatthypes handling
This commit is contained in:
parent
35187e67e5
commit
9217488362
|
@ -62,7 +62,7 @@ func (ips *IPStack) ParseSecurityResponse(parserResponse *parser.Response) {
|
||||||
CrawlerName: ips.response.Security.CrawlerName,
|
CrawlerName: ips.response.Security.CrawlerName,
|
||||||
CrawlerType: ips.response.Security.CrawlerType,
|
CrawlerType: ips.response.Security.CrawlerType,
|
||||||
ThreatLevel: ips.response.Security.ThreatLevel,
|
ThreatLevel: ips.response.Security.ThreatLevel,
|
||||||
ThreatTypes: ips.response.Security.ThreatTypes,
|
ThreatTypes: ips.response.Security.ThreatTypes.([]string),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,13 @@ type Currency struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Security struct {
|
type Security struct {
|
||||||
IsProxy bool `json:"is_proxy"`
|
IsProxy bool `json:"is_proxy"`
|
||||||
IsCrawler bool `json:"is_crawler"`
|
IsCrawler bool `json:"is_crawler"`
|
||||||
CrawlerName string `json:"crawler_name,omitempty"`
|
CrawlerName string `json:"crawler_name,omitempty"`
|
||||||
CrawlerType string `json:"crawler_type,omitempty"`
|
CrawlerType string `json:"crawler_type,omitempty"`
|
||||||
IsTor bool `json:"is_tor"`
|
IsTor bool `json:"is_tor"`
|
||||||
ThreatLevel string `json:"threat_level,omitempty"`
|
ThreatLevel string `json:"threat_level,omitempty"`
|
||||||
ThreatTypes interface{} `json:"threat_types,omitempty"`
|
ThreatTypes []string `json:"threat_types,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Timezone struct {
|
type Timezone struct {
|
||||||
|
|
Loading…
Reference in New Issue