mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: fixed a json encoding issue that caused the api.rest controller to return an empty list of events when a net.sniff http event is triggered
This commit is contained in:
parent
7b7739358d
commit
0ada0fdf7b
4 changed files with 46 additions and 16 deletions
|
@ -10,12 +10,12 @@ import (
|
|||
type SniffData map[string]interface{}
|
||||
|
||||
type SnifferEvent struct {
|
||||
PacketTime time.Time
|
||||
Protocol string
|
||||
Source string
|
||||
Destination string
|
||||
Message string
|
||||
Data interface{}
|
||||
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(t time.Time, proto string, src string, dst string, data interface{}, format string, args ...interface{}) SnifferEvent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue