Skip to content

Commit 864fc59

Browse files
committed
removes indent, nano 3339 time for files...
1 parent c533aa7 commit 864fc59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

d4-tlsf.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

447447
func 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

Comments
 (0)