@@ -379,7 +379,7 @@ func main() {
379379 }
380380 assembler .AssembleWithContext (packet .NetworkLayer ().NetworkFlow (), tcp , & c )
381381 }
382- if count % * flushEvery == 0 {
382+ if count % * flushEvery == 0 {
383383 ref := packet .Metadata ().CaptureInfo .Timestamp
384384 flushed , closed := assembler .FlushWithOptions (reassembly.FlushOptions {T : ref .Add (- * flushTf ), TC : ref .Add (- * flushTc )})
385385 Debug ("Forced flush: %d flushed, %d closed (%s)" , flushed , closed , ref )
@@ -445,7 +445,7 @@ func processCompletedSession(cancelC <-chan string, jobQ <-chan d4tls.TLSSession
445445}
446446
447447func output (t d4tls.TLSSession ) {
448- jsonRecord , _ := json .MarshalIndent (t .Record , "" , " " )
448+ jsonRecord , _ := json .Marshal (t .Record )
449449
450450 // If an output folder was specified for certificates
451451 if * outCerts != "" {
@@ -464,7 +464,7 @@ func output(t d4tls.TLSSession) {
464464 // If an output folder was specified for json files
465465 if * outJSON != "" {
466466 if _ , err := os .Stat (fmt .Sprintf ("./%s" , * outJSON )); ! os .IsNotExist (err ) {
467- err := ioutil .WriteFile (fmt .Sprintf ("./%s/%s.json" , * outJSON , t .Record .Timestamp .Format (time .RFC3339 )), jsonRecord , 0644 )
467+ err := ioutil .WriteFile (fmt .Sprintf ("./%s/%s.json" , * outJSON , t .Record .Timestamp .Format (time .RFC3339Nano )), jsonRecord , 0644 )
468468 if err != nil {
469469 panic ("Could not write to file." )
470470 }
0 commit comments