parser

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2019 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore interface {
	Store(*ImportedData)
	Flush()
	Index()
}

Datastore allows RITA to store bro data in a database

type FSImporter

type FSImporter struct {
	// contains filtered or unexported fields
}

FSImporter provides the ability to import bro files from the file system

func NewFSImporter

func NewFSImporter(res *resources.Resources,
	indexingThreads int, parseThreads int) *FSImporter

NewFSImporter creates a new file system importer

func (*FSImporter) GetInternalSubnets

func (fs *FSImporter) GetInternalSubnets() []*net.IPNet

GetInternalSubnets returns the internal subnets from the config file

func (*FSImporter) Run

func (fs *FSImporter) Run(datastore Datastore)

Run starts importing a given path into a datastore

type ImportedData

type ImportedData struct {
	BroData          parsetypes.BroData
	TargetDatabase   string
	TargetCollection string
}

ImportedData directs BroData to a specific database and collection

type MongoDatastore

type MongoDatastore struct {
	// contains filtered or unexported fields
}

MongoDatastore provides a backend for storing bro data in MongoDB

func NewMongoDatastore

func NewMongoDatastore(session *mgo.Session, metaDB *database.MetaDB,
	bufferSize int, logger *log.Logger) *MongoDatastore

NewMongoDatastore returns a new MongoDatastore and caches the existing db names

func (*MongoDatastore) Flush

func (mongo *MongoDatastore) Flush()

Flush waits for all writing to finish

func (*MongoDatastore) Index

func (mongo *MongoDatastore) Index()

Index ensures that the data is searchable

func (*MongoDatastore) Store

func (mongo *MongoDatastore) Store(data *ImportedData)

Store saves parsed Bro data to MongoDB. Additionally, it caches some information to create indices later on

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL