httap

package
v0.0.0-...-e049ec8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: BSD-2-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindInterfaces

func FindInterfaces() (intfsWithAddress []string)

func PcapVersion

func PcapVersion() string

Types

type AddrError

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

func (*AddrError) Error

func (e *AddrError) Error() string

type AddrList

type AddrList []*net.TCPAddr

func ResolveAddrList

func ResolveAddrList(strs []string) (AddrList, error)

func ResolveAddrPatterns

func ResolveAddrPatterns(strs []string) (AddrList, error)

func (AddrList) AddResolved

func (addrs AddrList) AddResolved(host, port string) AddrList

func (AddrList) Filter

func (addrs AddrList) Filter() string

func (AddrList) RequiresPromisc

func (addrs AddrList) RequiresPromisc() bool

func (AddrList) String

func (addrs AddrList) String() string

type Options

type Options struct {
	Sources      []string `` /* 150-byte string literal not displayed */
	Destinations []string `` /* 131-byte string literal not displayed */
	Headers      []string `short:"H" long:"header"   description:"Set or replace request header in duplicated traffic." value-name:"LINE"`
	Methods      []string `short:"m" long:"method"   description:"Only forward requests with specific HTTP methods." value-name:"VERB"`
	Multiply     float32  `short:"n" long:"multiply" description:"Increase or reduce the number of requests by a factor." value-name:"N"`
	Verbose      bool     `short:"v" long:"verbose"  description:"Show extra information, including all request headers."`
}

type Stream

type Stream struct {
	tcpreader.ReaderStream
	// contains filtered or unexported fields
}

func NewStream

func NewStream(tap *Wiretap, netFlow, tcpFlow gopacket.Flow) *Stream

func (*Stream) Consume

func (st *Stream) Consume()

type Wiretap

type Wiretap struct {
	Sources      AddrList
	Destinations AddrList
	Interfaces   []string
	Headers      map[string]string
	Methods      map[string]bool
	Multiply     float32
	RepeatDelay  time.Duration
	Logger       *log.Logger
	Verbose      bool
	BufSize      int32
	Timeout      time.Duration
	Transport    http.Transport
}

func NewWiretap

func NewWiretap(opts Options) *Wiretap

func (*Wiretap) Log

func (tap *Wiretap) Log(fmt string, args ...interface{})

func (*Wiretap) New

func (tap *Wiretap) New(netFlow, tcpFlow gopacket.Flow) tcpassembly.Stream

func (*Wiretap) Start

func (tap *Wiretap) Start()

Jump to

Keyboard shortcuts

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