Documentation ¶
Index ¶
- func DeleteRules(c *gin.Context)
- func ListRules(c *gin.Context)
- func Records(c *gin.Context)
- func UpsertRules(c *gin.Context)
- type Config
- type Record
- type Rule
- type Server
- func (s *Server) ComQuery(c *vmysql.Conn, query string, callback func(*sqltypes.Result) error) error
- func (s *Server) ConnectionClosed(c *vmysql.Conn)
- func (s *Server) NewConnection(c *vmysql.Conn)
- func (s *Server) Restart()
- func (s *Server) Run()
- func (s *Server) Stop()
- func (s *Server) UpdateRules() error
- func (s *Server) WarningCount(c *vmysql.Conn) uint16
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpsertRules ¶
UpsertRules create or update mysql rule from user submit
Types ¶
type Record ¶
type Record struct { record.BaseRecord Username string `gorm:"index" form:"username" json:"username" notice:"username"` ClientName string `gorm:"index" form:"client_name" json:"client_name" notice:"client_name"` Schema string `gorm:"index" form:"schema" json:"schema" notice:"schema"` ClientOS string `gorm:"index" form:"client_os" json:"client_os" notice:"client_os"` LoadLocalData bool `gorm:"index" form:"load_local_data" json:"load_local_data" notice:"load_local_data"` Files []file.MySQLFile `gorm:"foreignKey:RecordID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" form:"-" json:"files" notice:"-" ` Rule Rule `gorm:"foreignKey:RuleName;references:Name;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" form:"-" json:"-" notice:"-"` }
type Rule ¶
type Rule struct { rule.BaseRule `yaml:",inline"` Files string `form:"files" json:"files"` ExploitJdbcClient bool `gorm:"exploit_jdbc_client" form:"exploit_jdbc_client" json:"exploit_jdbc_client" yaml:"exploit_jdbc_client"` Payloads database.MapField `json:"payloads" form:"payloads"` }
func (*Rule) CreateOrUpdate ¶
CreateOrUpdate creates or updates the mysql rule in database and ruleSet
type Server ¶
func (*Server) ComQuery ¶
func (s *Server) ComQuery(c *vmysql.Conn, query string, callback func(*sqltypes.Result) error) error
ComQuery is part of the mysql.Handler interface.
func (*Server) ConnectionClosed ¶
ConnectionClosed is part of the mysql.Handler interface.
func (*Server) NewConnection ¶
NewConnection is part of the mysql.Handler interface.
func (*Server) UpdateRules ¶
Click to show internal directories.
Click to hide internal directories.