mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 19:50:06 -07:00
fix: added hostname in http.server logs
This commit is contained in:
parent
758adaf3d5
commit
b5e7b254e4
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/evilsocket/bettercap-ng/core"
|
||||
|
@ -65,7 +66,7 @@ func (httpd *HttpServer) Author() string {
|
|||
|
||||
func wrapHandler(h http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
log.Info("(%s) %s %s %s", core.Green("httpd"), core.Bold(r.RemoteAddr), r.Method, r.URL.Path)
|
||||
log.Info("(%s) %s %s %s%s", core.Green("httpd"), core.Bold(strings.Split(r.RemoteAddr, ":")[0]), r.Method, r.Host, r.URL.Path)
|
||||
h.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue