From 28ca00e4803be0773068284d675e66718028976c Mon Sep 17 00:00:00 2001 From: evilsocket Date: Thu, 22 Feb 2018 15:20:29 +0100 Subject: [PATCH] fix: proxy module builtin log function now logs to the global events stream --- modules/http_proxy_script_builtins.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/http_proxy_script_builtins.go b/modules/http_proxy_script_builtins.go index 86b71105..fc77fb10 100644 --- a/modules/http_proxy_script_builtins.go +++ b/modules/http_proxy_script_builtins.go @@ -1,7 +1,6 @@ package modules import ( - "fmt" "io/ioutil" "github.com/evilsocket/bettercap-ng/log" @@ -31,11 +30,8 @@ func (s *ProxyScript) defineBuiltins() error { // log something s.VM.Set("log", func(call otto.FunctionCall) otto.Value { for _, v := range call.ArgumentList { - fmt.Printf("%s", v.String()) + log.Info("%s", v.String()) } - fmt.Println() - s.sess.Refresh() - return otto.Value{} })