| 1 | package net_sniffscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src go1.16 fmt/" |
| 5 | "timescip-go gomod github.com/golang/go/src go1.16 time/" |
| 6 | |
| 7 | "github.com/bettercap/bettercap/sessionscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/" |
| 8 | ) |
| 9 | |
| 10 | type SniffDatascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SniffData# map[string]interface{} |
| 11 | |
| 12 | type SnifferEventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent# struct { |
| 13 | PacketTimescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#PacketTime. timescip-go gomod github.com/golang/go/src go1.16 time/.Timescip-go gomod github.com/golang/go/src go1.16 time/Time# `json:"time"` |
| 14 | Protocolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Protocol. string `json:"protocol"` |
| 15 | Sourcescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Source. string `json:"from"` |
| 16 | Destinationscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Destination. string `json:"to"` |
| 17 | Messagescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Message. string `json:"message"` |
| 18 | Datascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Data. interface{} `json:"data"` |
| 19 | } |
| 20 | |
| 21 | func NewSnifferEventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/NewSnifferEvent().(t timescip-go gomod github.com/golang/go/src go1.16 time/.Timescip-go gomod github.com/golang/go/src go1.16 time/Time#, proto string, src string, dst string, data interface{}, format string, args ...interface{}) SnifferEventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent# { |
| 22 | return SnifferEventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#{ |
| 23 | PacketTimescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#PacketTime.: t, |
| 24 | Protocolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Protocol.: proto, |
| 25 | Sourcescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Source.: src, |
| 26 | Destinationscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Destination.: dst, |
| 27 | Messagescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Message.: fmtscip-go gomod github.com/golang/go/src go1.16 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.16 fmt/Sprintf().(format, args...), |
| 28 | Datascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Data.: data, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func (e SnifferEventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#) Pushscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Push().() { |
| 33 | sessionscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/.Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Events..Addscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Add().("net.sniff."+e.Protocolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/net_sniff`/SnifferEvent#Protocol., e) |
| 34 | sessionscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/.Iscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/I..Refreshscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Session#Refresh().() |
| 35 | } |