Add colorful headlines

This commit is contained in:
maride 2019-11-27 16:49:07 +01:00
parent 62c11bd3ac
commit b13350eac7

View File

@ -2,6 +2,7 @@ package ethernet
import ( import (
"fmt" "fmt"
"github.com/fatih/color"
"github.com/google/gopacket" "github.com/google/gopacket"
"github.com/google/gopacket/layers" "github.com/google/gopacket/layers"
publicsuffix2 "golang.org/x/net/publicsuffix" publicsuffix2 "golang.org/x/net/publicsuffix"
@ -166,7 +167,10 @@ func ipIsPrivate(ip net.IP) bool {
// Print a summary after all DNS packets were processed // Print a summary after all DNS packets were processed
func printDNSSummary() { func printDNSSummary() {
headline := color.New(color.FgRed, color.Bold)
headline.Println("DNS Request Summary")
printDNSQuestionSummary() printDNSQuestionSummary()
headline.Println("DNS Response Summary")
printDNSAnswerSummary() printDNSAnswerSummary()
} }