http

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2015 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START = iota
	FLINE
	HEADERS
	BODY
	BODY_CHUNKED_START
	BODY_CHUNKED
	BODY_CHUNKED_WAIT_FINAL_CRLF
)
View Source
const (
	TransactionsHashSize = 2 ^ 16
	TransactionTimeout   = 10 * 1e9
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Http

type Http struct {
	// config
	Send_request        bool
	Send_response       bool
	Send_headers        bool
	Send_all_headers    bool
	Headers_whitelist   map[string]bool
	Split_cookie        bool
	Real_ip_header      string
	Hide_keywords       []string
	Strip_authorization bool
	// contains filtered or unexported fields
}

func (*Http) GapInStream

func (http *Http) GapInStream(tcptuple *common.TcpTuple, dir uint8,
	private protos.ProtocolData) protos.ProtocolData

func (*Http) Init

func (http *Http) Init(test_mode bool, results chan common.MapStr) error

func (*Http) InitDefaults

func (http *Http) InitDefaults()

func (*Http) Parse

func (http *Http) Parse(pkt *protos.Packet, tcptuple *common.TcpTuple,
	dir uint8, private protos.ProtocolData) protos.ProtocolData

func (*Http) PublishTransaction

func (http *Http) PublishTransaction(t *HttpTransaction)

func (*Http) ReceivedFin

func (http *Http) ReceivedFin(tcptuple *common.TcpTuple, dir uint8,
	private protos.ProtocolData) protos.ProtocolData

func (*Http) SetFromConfig

func (http *Http) SetFromConfig(config *config.Config, meta *toml.MetaData) (err error)

type HttpMessage

type HttpMessage struct {
	Ts time.Time

	IsRequest    bool
	TcpTuple     common.TcpTuple
	CmdlineTuple *common.CmdlineTuple
	Direction    uint8
	//Request Info
	FirstLine    string
	RequestUri   string
	Method       string
	StatusCode   uint16
	StatusPhrase string
	Real_ip      string
	// Http Headers
	ContentLength    int
	ContentType      string
	TransferEncoding string
	Headers          map[string]string
	Body             string
	//Raw Data
	Raw []byte
	// contains filtered or unexported fields
}

Http Message

type HttpStream

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

func (*HttpStream) PrepareForNewMessage

func (stream *HttpStream) PrepareForNewMessage()

type HttpTransaction

type HttpTransaction struct {
	Type string

	Src          common.Endpoint
	Dst          common.Endpoint
	Real_ip      string
	ResponseTime int32
	Ts           int64
	JsTs         time.Time

	Method     string
	RequestUri string
	Params     string

	Http common.MapStr

	Request_raw  string
	Response_raw string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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