Documentation ¶
Index ¶
- Constants
- func NewClient(c session.Session) (providers.ProviderClient, error)
- type Client
- func (c *Client) CreateTable(data []byte) (*table.Writer, error)
- func (c *Client) Enabled() bool
- func (c *Client) ExtractThreatIndicators(findRes []byte) (*providers.ThreatIndicators, error)
- func (c *Client) FindHost() ([]byte, error)
- func (c *Client) GetConfig() *session.Session
- func (c *Client) Initialise() error
- func (c *Client) Priority() *int32
- func (c *Client) RateHostData(findRes []byte, ratingConfigJSON []byte) (providers.RateResult, error)
- type Config
- type HostSearchResult
- type Provider
Constants ¶
View Source
const ( ProviderName = "abuseipdb" APIURL = "https://api.abuseipdb.com" HostIPPath = "/api/v2/check" IndentPipeHyphens = " |-----" ResultTTL = 12 * time.Hour OutputPriority = 40 APITimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
func (*Client) ExtractThreatIndicators ¶
func (c *Client) ExtractThreatIndicators(findRes []byte) (*providers.ThreatIndicators, error)
func (*Client) Initialise ¶
func (*Client) RateHostData ¶
type HostSearchResult ¶
type HostSearchResult struct { Raw json.RawMessage `json:"raw"` Data struct { IPAddress string `json:"ipAddress,omitempty"` IsPublic bool `json:"isPublic,omitempty"` IPVersion int `json:"ipVersion,omitempty"` IsWhitelisted bool `json:"isWhitelisted,omitempty"` AbuseConfidenceScore float64 `json:"abuseConfidenceScore,omitempty"` CountryCode string `json:"countryCode,omitempty"` CountryName string `json:"countryName,omitempty"` UsageType string `json:"usageType,omitempty"` Isp string `json:"isp,omitempty"` Domain string `json:"domain,omitempty"` Hostnames []string `json:"hostnames,omitempty"` IsTor bool `json:"isTor,omitempty"` TotalReports int `json:"totalReports,omitempty"` NumDistinctUsers int `json:"numDistinctUsers,omitempty"` LastReportedAt time.Time `json:"lastReportedAt,omitempty"` Reports []struct { ReportedAt time.Time `json:"reportedAt,omitempty"` Comment string `json:"comment,omitempty"` Categories []int `json:"categories,omitempty"` ReporterID int `json:"reporterId,omitempty"` ReporterCountryCode string `json:"reporterCountryCode,omitempty"` ReporterCountryName string `json:"reporterCountryName,omitempty"` } `json:"reports,omitempty"` } `json:"data,omitempty"` }
func (*HostSearchResult) CreateTable ¶
func (ssr *HostSearchResult) CreateTable() *table.Writer
Click to show internal directories.
Click to hide internal directories.