bettercap: github.com/bettercap/bettercap/modules/net_sniff Index | Files

package net_sniff

import "github.com/bettercap/bettercap/modules/net_sniff"

Index

Package Files

net_sniff.go net_sniff_context.go net_sniff_dns.go net_sniff_dot11.go net_sniff_event.go net_sniff_ftp.go net_sniff_fuzz.go net_sniff_http.go net_sniff_krb5.go net_sniff_mdns.go net_sniff_ntlm.go net_sniff_parsers.go net_sniff_sni.go net_sniff_stats.go net_sniff_tcp.go net_sniff_teamviewer.go net_sniff_udp.go net_sniff_upnp.go net_sniff_views.go

type HTTPRequest Uses

type HTTPRequest struct {
    Method      string      `json:"method"`
    Proto       string      `json:"proto"`
    Host        string      `json:"host"`
    URL         string      `json:"url:"`
    Headers     http.Header `json:"headers"`
    ContentType string      `json:"content_type"`
    Body        []byte      `json:"body"`
}

func (HTTPRequest) IsType Uses

func (r HTTPRequest) IsType(ctype string) bool

type HTTPResponse Uses

type HTTPResponse struct {
    Protocol         string      `json:"protocol"`
    Status           string      `json:"status"`
    StatusCode       int         `json:"status_code"`
    Headers          http.Header `json:"headers"`
    Body             []byte      `json:"body"`
    ContentLength    int64       `json:"content_length"`
    ContentType      string      `json:"content_type"`
    TransferEncoding []string    `json:"transfer_encoding"`
}

func (HTTPResponse) IsType Uses

func (r HTTPResponse) IsType(ctype string) bool

type SniffData Uses

type SniffData map[string]interface{}

type Sniffer Uses

type Sniffer struct {
    session.SessionModule
    Stats *SnifferStats
    Ctx   *SnifferContext
    // contains filtered or unexported fields
}

func NewSniffer Uses

func NewSniffer(s *session.Session) *Sniffer

func (Sniffer) Author Uses

func (mod Sniffer) Author() string

func (*Sniffer) Configure Uses

func (mod *Sniffer) Configure() error

func (Sniffer) Description Uses

func (mod Sniffer) Description() string

func (*Sniffer) GetContext Uses

func (mod *Sniffer) GetContext() (error, *SnifferContext)

func (Sniffer) Name Uses

func (mod Sniffer) Name() string

func (*Sniffer) Start Uses

func (mod *Sniffer) Start() error

func (*Sniffer) StartFuzzing Uses

func (mod *Sniffer) StartFuzzing() error

func (*Sniffer) Stop Uses

func (mod *Sniffer) Stop() error

func (*Sniffer) StopFuzzing Uses

func (mod *Sniffer) StopFuzzing() error

type SnifferContext Uses

type SnifferContext struct {
    Handle       *pcap.Handle
    Source       string
    DumpLocal    bool
    Verbose      bool
    Filter       string
    Expression   string
    Compiled     *regexp.Regexp
    Output       string
    OutputFile   *os.File
    OutputWriter *pcapgo.Writer
}

func NewSnifferContext Uses

func NewSnifferContext() *SnifferContext

func (*SnifferContext) Close Uses

func (c *SnifferContext) Close()

func (*SnifferContext) Log Uses

func (c *SnifferContext) Log(sess *session.Session)

type SnifferEvent Uses

type SnifferEvent struct {
    PacketTime  time.Time   `json:"time"`
    Protocol    string      `json:"protocol"`
    Source      string      `json:"from"`
    Destination string      `json:"to"`
    Message     string      `json:"message"`
    Data        interface{} `json:"data"`
}

func NewSnifferEvent Uses

func NewSnifferEvent(t time.Time, proto string, src string, dst string, data interface{}, format string, args ...interface{}) SnifferEvent

func (SnifferEvent) Push Uses

func (e SnifferEvent) Push()

type SnifferStats Uses

type SnifferStats struct {
    NumLocal    uint64
    NumMatched  uint64
    NumDumped   uint64
    NumWrote    uint64
    Started     time.Time
    FirstPacket time.Time
    LastPacket  time.Time
}

func NewSnifferStats Uses

func NewSnifferStats() *SnifferStats

func (*SnifferStats) Print Uses

func (s *SnifferStats) Print() error

Package net_sniff imports 23 packages (graph) and is imported by 5 packages. Updated 2019-11-07. Refresh now. Tools for package owners.