Engine

package
v0.0.0-...-372dd14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Acceptlanguage_counter []Counter
View Source
var Contenttype_counter []Counter
View Source
var Host_counter []Counter
View Source
var IP_counter []Counter

var traffic_counter []Counter

View Source
var Referer_counter []Counter
View Source
var Requests []Req
View Source
var Useragent_counter []Counter

Functions

func Run

func Run(data string)

Types

type Baseline

type Baseline struct {
	gorm.Model
	Traffic             int
	UserAgent           string
	UserAgentCount      uint
	IPCount             uint
	ContentType         string
	ContentTypeCount    uint
	Traffic_Date        string
	Host                string
	HostCount           uint
	Referer             string
	RefererCount        uint
	AcceptLanguage      string
	AcceptLanguageCount uint
}

func GetBaseline

func GetBaseline() (bsl Baseline)

type Condition

type Condition struct {
	Name        string
	NameString  string
	History     bool
	Dir         string
	Headers     []Header
	Normal      string
	Anomaly     string
	Description string
	RiskLevel   int
}

type Counter

type Counter struct {
	Key   string
	Count int
}
type Header struct {
	Key   string
	Value string
}

type PostData

type PostData struct {
	Name            string    `json:"Name"`
	IncidentTime    time.Time `json:"IncidentTime"`
	ImportanceLevel int       `json:"ImportanceLevel"`
	Description     string    `json:"Description"`
	Repetition      int       `json:"Repetition"`
	Prevention      string    `json:"Prevention"`
	Processed       int       `json:"Processed"`
	CauseType       string    `json:"CauseType"`
	SrcIP           string    `json:"SrcIP"`
	SrcMac          string    `json:"SrcMac"`
}

type Req

type Req struct {
	Method      string `json:"Method"`
	Dir         string `json:"Dir"`
	HTTPVersion string `json:"HTTPVersion"`
	Headers     []struct {
		Key   string `json:"Key"`
		Value string `json:"Value"`
	} `json:"Headers"`
	Content string `json:"Content"`
	SrcIP   string `json:"SrcIP"`
	DstIP   string `json:"DstIP"`
	SrcMac  string `json:"SrcMac"`
	DstMac  string `json:"DstMac"`
}

type Rule

type Rule struct {
	RuleName string
	Content  string
}

func ReadRules

func ReadRules() []Rule

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL