Documentation
¶
Index ¶
- func DecorateRules(t string, concurrent int, proxy string)
- func DeleteSuricataRuleByID(db *gorm.DB, id int64) error
- func ExportRulesToFile(db *gorm.DB, fileName string) error
- func ImportRulesFromFile(db *gorm.DB, fileName string) error
- func SaveHTTPRequest(db *gorm.DB, name string, raw []byte) error
- func SaveICMPTraffic(db *gorm.DB, name string, raw []byte) error
- func SaveSuricata(db *gorm.DB, s *rule.Rule) error
- func SaveTCPTraffic(db *gorm.DB, name string, raw []byte) error
- func SaveToDB(rule *Storage) error
- func UpsertRule(db *gorm.DB, hash string, i interface{}) error
- func YieldRules(db *gorm.DB, ctx context.Context) chan *Storage
- type Storage
- func GetSuricataChaosMakerRule(db *gorm.DB, id int64) (*Storage, error)
- func GetSuricataChaosMakerRuleByHash(db *gorm.DB, hash string) (*Storage, error)
- func NewHTTPRequestRule(name string, raw []byte) *Storage
- func NewRuleFromSuricata(s *rule.Rule) *Storage
- func QueryRule(db *gorm.DB, req *ypb.QueryChaosMakerRuleRequest) (*bizhelper.Paginator, []*Storage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecorateRules ¶
Types ¶
type Storage ¶
type Storage struct { gorm.Model RawTrafficBeyondIPPacketBase64 string `json:"raw_traffic_beyond_ip_packet_base64"` RawTrafficBeyondLinkLayerBase64 string `json:"raw_traffic_beyond_link_layer_base64"` RawTrafficBeyondHTTPBase64 string `json:"raw_traffic_beyond_http_base64"` // suricata / http-request RuleType string `json:"rule_type"` SuricataRaw string `json:"raw"` Protocol string `json:"protocol"` Action string `json:"action"` Name string `json:"name"` NameZh string `json:"name_zh"` ClassType string `json:"class_type"` ClassTypeZh string `json:"class_type_zh"` Group string `json:"group"` Hash string `json:"hash" gorm:"unique_index"` Keywords string `json:"keywords"` KeywordsZh string `json:"keywords_zh"` Description string `json:"description"` DescriptionZh string `json:"description_zh"` RuleUpdatedAt string `json:"origin_updated_at"` RuleCreatedAt string `json:"origin_created_at"` Deployment string `json:"deployment"` SignatureSeverity string `json:"signature_severity"` AttackTarget string `json:"attack_target"` FormerCategory string `json:"former_category"` AffectedProduct string `json:"affected_product"` Tag string `json:"tag"` PerformanceImpact string `json:"performance_impact"` MalwareFamily string `json:"malware_family"` MitreTechniqueID string `json:"mitre_technique_id"` MitreTacticID string `json:"mitre_tactic_id"` MitreTechniqueName string `json:"mitre_technique_name"` MitreTacticName string `json:"mitre_tactic_name"` Confidence string `json:"confidence"` ReviewedAt string `json:"reviewed_at"` CVE string `json:"cve"` }
func GetSuricataChaosMakerRuleByHash ¶ added in v1.3.2
func NewHTTPRequestRule ¶
func NewRuleFromSuricata ¶
func (*Storage) BeforeSave ¶
func (*Storage) DecoratedByOpenAI ¶
func (origin *Storage) DecoratedByOpenAI(t string, opts ...aispec.AIConfigOption)
func (*Storage) ToGPRCModel ¶
func (c *Storage) ToGPRCModel() *ypb.ChaosMakerRule
Click to show internal directories.
Click to hide internal directories.