Documentation ¶
Index ¶
- Constants
- Variables
- func WithAPIKey(apiKey string) func(*CrowdsecCTIClient)
- func WithHTTPClient(httpClient *http.Client) func(*CrowdsecCTIClient)
- func WithLogger(logger *log.Entry) func(*CrowdsecCTIClient)
- type CTIAttackDetails
- type CTIBehavior
- type CTIClassification
- type CTIClassifications
- type CTIHistory
- type CTILocationInfo
- type CTIReferences
- type CTIScore
- type CTIScores
- type CrowdsecCTIClient
- type CustomTime
- type FireItem
- func (c *FireItem) GetAttackDetails() []string
- func (c *FireItem) GetBackgroundNoiseScore() int
- func (c *FireItem) GetBehaviors() []string
- func (c *FireItem) GetFalsePositives() []string
- func (c *FireItem) GetMaliciousnessScore() float32
- func (c *FireItem) IsFalsePositive() bool
- func (c *FireItem) IsPartOfCommunityBlocklist() bool
- type FirePaginator
- type FireParams
- type FireResponse
- type Href
- type Links
- type SearchIPResponse
- type SmokeItem
- func (c *SmokeItem) GetAttackDetails() []string
- func (c *SmokeItem) GetBackgroundNoiseScore() int
- func (c *SmokeItem) GetBehaviors() []string
- func (c *SmokeItem) GetFalsePositives() []string
- func (c *SmokeItem) GetMaliciousnessScore() float32
- func (c *SmokeItem) IsFalsePositive() bool
- func (c *SmokeItem) IsPartOfCommunityBlocklist() bool
Constants ¶
View Source
const (
CTIBaseUrl = "https://cti.api.crowdsec.net/v2"
)
Variables ¶
Functions ¶
func WithAPIKey ¶
func WithAPIKey(apiKey string) func(*CrowdsecCTIClient)
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) func(*CrowdsecCTIClient)
func WithLogger ¶
func WithLogger(logger *log.Entry) func(*CrowdsecCTIClient)
Types ¶
type CTIAttackDetails ¶
type CTIBehavior ¶
type CTIClassification ¶
type CTIClassifications ¶
type CTIClassifications struct { FalsePositives []CTIClassification `json:"false_positives"` Classifications []CTIClassification `json:"classifications"` }
type CTIHistory ¶
type CTILocationInfo ¶
type CTIReferences ¶
type CrowdsecCTIClient ¶
func NewCrowdsecCTIClient ¶
func NewCrowdsecCTIClient(options ...func(*CrowdsecCTIClient)) *CrowdsecCTIClient
func (*CrowdsecCTIClient) Fire ¶
func (c *CrowdsecCTIClient) Fire(params FireParams) (*FireResponse, error)
func (*CrowdsecCTIClient) GetIPInfo ¶
func (c *CrowdsecCTIClient) GetIPInfo(ip string) (*SmokeItem, error)
func (*CrowdsecCTIClient) SearchIPs ¶
func (c *CrowdsecCTIClient) SearchIPs(ips []string) (*SearchIPResponse, error)
type CustomTime ¶
func (*CustomTime) UnmarshalJSON ¶
func (ct *CustomTime) UnmarshalJSON(b []byte) error
type FireItem ¶
type FireItem struct { IpRangeScore int `json:"ip_range_score"` Ip string `json:"ip"` IpRange *string `json:"ip_range"` AsName *string `json:"as_name"` AsNum *int `json:"as_num"` Location CTILocationInfo `json:"location"` ReverseDNS *string `json:"reverse_dns"` Behaviors []*CTIBehavior `json:"behaviors"` History CTIHistory `json:"history"` Classifications CTIClassifications `json:"classifications"` AttackDetails []*CTIAttackDetails `json:"attack_details"` TargetCountries map[string]int `json:"target_countries"` BackgroundNoiseScore *int `json:"background_noise_score"` Scores CTIScores `json:"scores"` References []CTIReferences `json:"references"` Status string `json:"status"` Expiration CustomTime `json:"expiration"` }
func (*FireItem) GetAttackDetails ¶
func (*FireItem) GetBackgroundNoiseScore ¶
func (*FireItem) GetBehaviors ¶
func (*FireItem) GetFalsePositives ¶
func (*FireItem) GetMaliciousnessScore ¶
Provide the likelihood of the IP being bad
func (*FireItem) IsFalsePositive ¶
func (*FireItem) IsPartOfCommunityBlocklist ¶
type FirePaginator ¶
type FirePaginator struct {
// contains filtered or unexported fields
}
func NewFirePaginator ¶
func NewFirePaginator(client *CrowdsecCTIClient, params FireParams) *FirePaginator
func (*FirePaginator) Next ¶
func (p *FirePaginator) Next() ([]FireItem, error)
type FireParams ¶
type FireResponse ¶
type SearchIPResponse ¶
type SmokeItem ¶
type SmokeItem struct { IpRangeScore int `json:"ip_range_score"` Ip string `json:"ip"` IpRange *string `json:"ip_range"` AsName *string `json:"as_name"` AsNum *int `json:"as_num"` Location CTILocationInfo `json:"location"` ReverseDNS *string `json:"reverse_dns"` Behaviors []*CTIBehavior `json:"behaviors"` History CTIHistory `json:"history"` Classifications CTIClassifications `json:"classifications"` AttackDetails []*CTIAttackDetails `json:"attack_details"` TargetCountries map[string]int `json:"target_countries"` BackgroundNoiseScore *int `json:"background_noise_score"` Scores CTIScores `json:"scores"` References []CTIReferences `json:"references"` IsOk bool `json:"-"` }
func (*SmokeItem) GetAttackDetails ¶
func (*SmokeItem) GetBackgroundNoiseScore ¶
func (*SmokeItem) GetBehaviors ¶
func (*SmokeItem) GetFalsePositives ¶
func (*SmokeItem) GetMaliciousnessScore ¶
Provide the likelihood of the IP being bad
func (*SmokeItem) IsFalsePositive ¶
func (*SmokeItem) IsPartOfCommunityBlocklist ¶
Click to show internal directories.
Click to hide internal directories.