Skip to content

Commit

Permalink
Add pprof debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
joshrendek committed Oct 23, 2024
1 parent 67486f6 commit 8d8acd8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ package main
import (
"flag"
"github.com/joshrendek/threat.gg-agent/updater"
"net/http"
"os"
"os/exec"
"time"

"github.com/jellydator/ttlcache/v3"

_ "net/http/pprof"

"github.com/joshrendek/threat.gg-agent/honeypots"

"github.com/joshrendek/threat.gg-agent/persistence"
Expand All @@ -19,7 +22,6 @@ import (
_ "github.com/joshrendek/threat.gg-agent/sshd"
_ "github.com/joshrendek/threat.gg-agent/webserver"

//_ "github.com/joshrendek/threat.gg-agent/webserver"
"github.com/rs/zerolog/log"
)

Expand Down Expand Up @@ -51,6 +53,10 @@ func main() {
}
}()

go func() {
log.Info().Err(http.ListenAndServe("localhost:6060", nil)).Msg("pprof")
}()

// nuke tor client at startup from old procs
exec.Command("killall", "tor").Run()

Expand Down

0 comments on commit 8d8acd8

Please sign in to comment.