Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttackJsonLogger ¶
type AttackJsonLogger struct { LogDir string // contains filtered or unexported fields }
AttackJsonLogger is responsible for recording all attack reports as JSON objects in a file.
func NewAttackJsonLogger ¶
func NewAttackJsonLogger(logDir string) *AttackJsonLogger
NewAttackJsonLogger returns a pointer to a AttackJsonLogger struct
func (*AttackJsonLogger) Log ¶
func (a *AttackJsonLogger) Log(event *types.Event)
func (*AttackJsonLogger) Publish ¶
func (a *AttackJsonLogger) Publish(event *serializedEvent)
Publish writes a JSON report to the attack-report file for that flow.
func (*AttackJsonLogger) SerializeAndWrite ¶
func (a *AttackJsonLogger) SerializeAndWrite(event *types.Event)
func (*AttackJsonLogger) Start ¶
func (a *AttackJsonLogger) Start()
func (*AttackJsonLogger) Stop ¶
func (a *AttackJsonLogger) Stop()
type AttackMetadataJsonLogger ¶
type AttackMetadataJsonLogger struct { LogDir string // contains filtered or unexported fields }
AttackMetadataJsonLogger is responsible for recording all attack reports as JSON objects in a file. This attack logger only logs metadata... but ouch code duplication.
func NewAttackMetadataJsonLogger ¶
func NewAttackMetadataJsonLogger(logDir string) *AttackMetadataJsonLogger
NewAttackMetadataJsonLogger returns a pointer to a AttackMetadataJsonLogger struct
func (*AttackMetadataJsonLogger) Log ¶
func (a *AttackMetadataJsonLogger) Log(event *types.Event)
func (*AttackMetadataJsonLogger) Publish ¶
func (a *AttackMetadataJsonLogger) Publish(event *serializedEvent)
Publish writes a JSON report to the attack-report file for that flow.
func (*AttackMetadataJsonLogger) SerializeAndWrite ¶
func (a *AttackMetadataJsonLogger) SerializeAndWrite(event *types.Event)
func (*AttackMetadataJsonLogger) Start ¶
func (a *AttackMetadataJsonLogger) Start()
func (*AttackMetadataJsonLogger) Stop ¶
func (a *AttackMetadataJsonLogger) Stop()
type PacketLogger ¶
type PcapLogger ¶
type PcapLogger struct { Dir string Flow *types.TcpIpFlow // contains filtered or unexported fields }
PcapLogger struct is used to log packets to a pcap file
func NewPcapLogger ¶
func NewPcapLogger(dir string, flow *types.TcpIpFlow) *PcapLogger
NewPcapLogger returns a PcapLogger struct... and in doing so writes a pcap header to the beginning of the file.
func (*PcapLogger) Start ¶
func (p *PcapLogger) Start()
func (*PcapLogger) WritePacket ¶
func (p *PcapLogger) WritePacket(rawPacket []byte, timestamp time.Time)
func (*PcapLogger) WritePacketToFile ¶
func (p *PcapLogger) WritePacketToFile(rawPacket []byte, timestamp time.Time)
WritePacket receives a raw packet and a timestamp. It writes this info to the pcap log file.