http

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2015 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	START = iota
	FLINE
	HEADERS
	BODY
	BODY_CHUNKED_START
	BODY_CHUNKED
	BODY_CHUNKED_WAIT_FINAL_CRLF
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Http

type Http struct {
	// config
	Ports                []int
	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
	Redact_authorization bool
	// contains filtered or unexported fields
}

func (*Http) ConnectionTimeout added in v1.0.0

func (http *Http) ConnectionTimeout() time.Duration

func (*Http) GapInStream

func (http *Http) GapInStream(tcptuple *common.TcpTuple, dir uint8,
	nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool)

Called when a gap of nbytes bytes is found in the stream (due to packet loss).

func (*Http) GetPorts added in v1.0.0

func (http *Http) GetPorts() []int

func (*Http) Init

func (http *Http) Init(test_mode bool, results publisher.Client) 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) ReceivedFin

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

func (*Http) SetFromConfig

func (http *Http) SetFromConfig(config config.Http) (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
	Size             uint64
	//Raw Data
	Raw []byte

	Notes []string
	// 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
	Path       string
	BytesOut   uint64
	BytesIn    uint64
	Notes      []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