fix: proxy module builtin log function now logs to the global events stream

This commit is contained in:
evilsocket 2018-02-22 15:20:29 +01:00
parent abca005651
commit 28ca00e480

View file

@ -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{}
})