diff --git a/core/device/device.go b/core/device/device.go index b1bc3e6..a9c6134 100644 --- a/core/device/device.go +++ b/core/device/device.go @@ -66,7 +66,7 @@ func AutoGetDevices() *EtherTable { continue } if dnsLayer := packet.Layer(layers.LayerTypeDNS); dnsLayer != nil { - //gologger.Printf(".") + gologger.Printf(".") dns, _ := dnsLayer.(*layers.DNS) if !dns.QR { continue diff --git a/main.go b/main.go index 24b53df..47acabf 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "log" _ "net/http/pprof" "os" + "strings" "sync" ) @@ -18,9 +19,11 @@ var config embed.FS // go tool pprof -seconds=60 -http=:9999 http://127.0.0.1:6060/debug/pprof/heap // go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=60 func main() { - os.Setenv("devDebug", "false") - os.Setenv("ProductMod", "release") - log.SetOutput(io.Discard) + if strings.Contains(strings.Join(os.Args[1:], " "), "--json") { + os.Setenv("devDebug", "false") + os.Setenv("ProductMod", "release") + log.SetOutput(io.Discard) + } os.RemoveAll(".DbCache") defer os.RemoveAll("ksubdomain.yaml") util.Wg = &sync.WaitGroup{}