Documentation
¶
Overview ¶
This file was generated. Do not edit.
Index ¶
- Variables
- func CloseFile(outDir string, file *os.File, typ string) (name string, size int64)
- func CloseGzipWriters(writers ...*gzip.Writer)
- func Count(filename string) (count int64)
- func CreateFile(name, ext string) *os.File
- func Dump(path string, separator string, tsv bool, structured bool, table bool, ...)
- func FlushWriters(writers ...flushableWriter)
- func InitRecord(typ types.Type) (record proto.Message)
- func NewHeader(t types.Type, source, version string, includesPayloads bool) *types.Header
- func PrintLogo()
- func RemoveAuditRecordFileIfEmpty(name string) (size int64)
- type Reader
- type Writer
- func (w *Writer) Close() (name string, size int64)
- func (w *Writer) GetChan() <-chan []byte
- func (w *Writer) Write(msg proto.Message) error
- func (w *Writer) WriteCSV(msg proto.Message) (int, error)
- func (w *Writer) WriteCSVHeader(msg proto.Message) (int, error)
- func (w *Writer) WriteHeader(t types.Type, source string, version string, includesPayloads bool) error
- func (w *Writer) WriteProto(msg proto.Message) error
Constants ¶
This section is empty.
Variables ¶
var ( // BlockSize is the file system block size BlockSize int )
var Version = "v0.4.0"
Netcap version.
Functions ¶
func CloseFile ¶ added in v0.4.0
CloseFile closes the netcap file handle and removes files that do only contain a header but no audit records
func CloseGzipWriters ¶ added in v0.4.0
func CreateFile ¶ added in v0.4.0
CreateFile is a wrapper to create new audit record file
func Dump ¶
func Dump(path string, separator string, tsv bool, structured bool, table bool, selection string, utc bool, fields bool)
Dump reads the specified netcap file and dumps the output according to the configuration to stdout
func FlushWriters ¶ added in v0.4.0
func FlushWriters(writers ...flushableWriter)
func InitRecord ¶
InitRecord initializes a new record of the given type that conforms to the proto.Message interface if netcap is extended with new audit records they need to be added here as well
func RemoveAuditRecordFileIfEmpty ¶ added in v0.4.0
RemoveAuditRecordFileIfEmpty removes the audit record file if it does not contain audit records
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements reading netcap files
func (*Reader) ReadHeader ¶
ReadHeader reads the file header
type Writer ¶ added in v0.4.0
type Writer struct {
// Name of the associated audit record type
Name string
IsChanWriter bool
// contains filtered or unexported fields
}
Writer supports writing audit records to disk
func (*Writer) WriteCSVHeader ¶ added in v0.4.0
WriteCSVHeader writes a CSV record
func (*Writer) WriteHeader ¶ added in v0.4.0
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
agent
command
|
|
|
capture
command
|
|
|
collect
command
|
|
|
dump
command
|
|
|
export
command
|
|
|
label
command
|
|
|
proxy
command
|
|
|
util
command
|
|
|
* NETCAP - Traffic Analysis Framework * Copyright (c) 2017 Philipp Mieden <dreadl0ck [at] protonmail [dot] ch> * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS.
|
* NETCAP - Traffic Analysis Framework * Copyright (c) 2017 Philipp Mieden <dreadl0ck [at] protonmail [dot] ch> * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. |
|
helpers
module
|
|