modsecurity

package
v0.0.0-...-c9b4a5a Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

README

This directory must eventually be migrated to a separate module

LD_FLAGS:
$ sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/modsecurity/lib/ ./bin/diato daemon start --config ./diato.conf


// Getting Started:
// sudo apt-get install libxml2-dev
// git clone --recursive -b "v3/master" https://github.com/SpiderLabs/ModSecurity.git
// cd ModSecurity
// make
// sudo make install

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Modsecurity

type Modsecurity struct {
	// contains filtered or unexported fields
}

func NewModsecurity

func NewModsecurity() (*Modsecurity, error)

func (*Modsecurity) NewRuleSet

func (m *Modsecurity) NewRuleSet() *RuleSet

func (*Modsecurity) SetServerLogCallback

func (m *Modsecurity) SetServerLogCallback(callback func(string))

func (*Modsecurity) WhoAmI

func (m *Modsecurity) WhoAmI() string

Return information about this ModSecurity version and platform.

Platform and version are two questions that community will ask prior to provide support. Making it available internally and to the connector as well.

TODO: This always appear to return an empty string. I'm probably missing Something as msc->whoAmi().c_str() does actually contain a string, but it appears to not to be able to cgo barrier?

type RuleSet

type RuleSet struct {
	// contains filtered or unexported fields
}

func (*RuleSet) AddFile

func (r *RuleSet) AddFile(path string) error

func (*RuleSet) AddRules

func (r *RuleSet) AddRules(rules string) error

func (*RuleSet) NewTransaction

func (r *RuleSet) NewTransaction(remoteAddr, localAddr string) (*transaction, error)

Create a new transaction for a given configuration and ModSecurity core.

The transaction is the unit that will be used the inspect every request. It holds all the information for a given request.

Remember to cleanup the transaction when the transaction is complete using Cleanup()

Jump to

Keyboard shortcuts

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