From 9883cd346f694ad09aac839f9ddc4a25df0e0b0a Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Fri, 3 Apr 2020 12:47:23 +0200 Subject: Add connection_handler and stream_handler --- caronte.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'caronte.go') diff --git a/caronte.go b/caronte.go index 96bb281..6b33318 100644 --- a/caronte.go +++ b/caronte.go @@ -2,17 +2,19 @@ package main import ( "fmt" + "net" ) func main() { - // testStorage() - storage := NewStorage("localhost", 27017, "testing") + // pattern.Flags |= hyperscan.SomLeftMost + + storage := NewMongoStorage("localhost", 27017, "testing") err := storage.Connect(nil) if err != nil { panic(err) } - importer := NewPcapImporter(&storage, "10.10.10.10") + importer := NewPcapImporter(storage, net.ParseIP("10.10.10.10")) sessionId, err := importer.ImportPcap("capture_00459_20190627165500.pcap") if err != nil { -- cgit v1.2.3-70-g09d2