Skip to content

Commit

Permalink
fixed --json 2024-01-01
Browse files Browse the repository at this point in the history
  • Loading branch information
hktalent committed Jan 1, 2024
1 parent 0023e5a commit 60009db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"log"
_ "net/http/pprof"
"os"
"strings"
"sync"
)

Expand All @@ -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{}
Expand Down

0 comments on commit 60009db

Please sign in to comment.