Documentation
¶
Overview ¶
nolint
nolint
nolint
nolint
nolint
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PrinterWaitGroup sync.WaitGroup
View Source
var WaitGroup sync.WaitGroup
Functions ¶
This section is empty.
Types ¶
type ConnectionHandler ¶
type ConnectionHandler interface {
// contains filtered or unexported methods
}
ConnectionHandler is interface for handle tcp connection
type ConnectionID ¶
type ConnectionID struct {
// contains filtered or unexported fields
}
ConnectionID identify a tcp connection
type ConnectionKey ¶
type ConnectionKey struct {
// contains filtered or unexported fields
}
ConnectionKey contains src and dst endpoint identify a connection
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is one endpoint of a tcp connection
type HTTPConnectionHandler ¶
HTTPConnectionHandler impl ConnectionHandler
type HTTPTrafficHandler ¶
type HTTPTrafficHandler struct {
// contains filtered or unexported fields
}
HTTPTrafficHandler parse a http connection traffic and send to Printer
type NetworkStream ¶
type NetworkStream struct {
// contains filtered or unexported fields
}
NetworkStream tread one-direction tcp data as stream. impl reader closer
type Option ¶
type Option struct { Level string `` /* 133-byte string literal not displayed */ File string `description:"Read from pcap file. If not set, will capture data from network device by default"` Device string `default:"any" description:"Capture packet from network device. If is any, capture all interface traffics"` Ip string `description:"Filter by ip, if either source or target ip is matched, the packet will be processed"` Port uint `description:"Filter by port, if either source or target port is matched, the packet will be processed."` Host string `description:"Filter by request host, using wildcard match(*, ?)"` Uri string `description:"Filter by request url path, using wildcard match(*, ?)"` Status string `description:"Filter by response status code. Can use range. eg: 200, 200-300 or 200:300-400"` StatusSet *IntSet `ignore:"true"` Force bool `description:"Force print unknown content-type http body even if it seems not to be text content"` Pretty bool `description:"Try to format and prettify json content"` Curl bool `description:"Output an equivalent curl command for each http request"` DumpBody bool `description:"dump http request/response body to file"` Output string `description:"Write result to file [output] instead of stdout"` Idle time.Duration `default:"4m" description:"Idle time to remove connection if no package received"` }
command line options
type Printer ¶
type Printer struct { OutputQueue chan *netevent.HTTPNetData // contains filtered or unexported fields }
Printer output parsed http messages
func NewPrinter ¶
func NewPrinter(matchChan chan *netevent.HTTPNetData) *Printer
func (*Printer) Send ¶
func (p *Printer) Send(data *netevent.HTTPNetData)
type ReceiveWindow ¶
type ReceiveWindow struct {
// contains filtered or unexported fields
}
ReceiveWindow simulate tcp receivec window
type TCPAssembler ¶
type TCPAssembler struct { FilterIP string FilterPort uint16 // contains filtered or unexported fields }
TCPAssembler do tcp package Assemble
func NewTCPAssembler ¶
func NewTCPAssembler(connectionHandler ConnectionHandler) *TCPAssembler
func (*TCPAssembler) FinishAll ¶
func (assembler *TCPAssembler) FinishAll()
func (*TCPAssembler) FlushOlderThan ¶
func (assembler *TCPAssembler) FlushOlderThan(time time.Time)
flush timeout connections
type TCPConnection ¶
type TCPConnection struct {
// contains filtered or unexported fields
}
TCPConnection hold info for one tcp connection
Source Files
¶
Click to show internal directories.
Click to hide internal directories.