Bettercap: Fresh install via go get doesn't work.

Created on 3 May 2018  路  6Comments  路  Source: bettercap/bettercap

Description of the bug

Environment

Please provide:

  • Bettercap version you are using: go get github.com/bettercap/bettercap
  • OS version and architecture you are using: Arch Linux x86_64
  • Go version if building from sources: go version go1.10.1 linux/amd64
  • Command line arguments you are using: go get github.com/bettercap/bettercap

Steps to Reproduce

  1. Fresh install of bettercap

Actual behavior: I have got an error

# github.com/bettercap/bettercap/core
/user/go/src/github.com/bettercap/bettercap/core/core.go:96:38: undefined: usr

In that line there is a code:

path = strings.Replace(path, "~", usr.HomeDir, 1)

All 6 comments

Same here, but on Kali Linux

@s3gm3nt4ti0nf4ult @madScript01 -- I Verified the issue was also present on macOS and submitted a fix to this issue: https://github.com/bettercap/bettercap/pull/264

Thanks 馃檱

This is also _probably_ _totally_ because of me https://github.com/bettercap/bettercap/pull/259/files#diff-fe35ea64d478c4f3fb767a3f618e5d01L95

oops

$ git checkout d91f8e0a75766dd6cdf50a8a06d8a40740d9f9c5
$ make test
ok      github.com/bettercap/bettercap/core 1.054s  coverage: 79.1% of statements
firewall/firewall_darwin.go:53:2: this value of out is never used (SA4006)
?       github.com/bettercap/bettercap/firewall [no test files]
?       github.com/bettercap/bettercap/log  [no test files]
ok      github.com/bettercap/bettercap/modules  2.007s  coverage: 0.0% of statements [no tests to run]
network/net_darwin.go:13:23: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007)
ok      github.com/bettercap/bettercap/network  1.171s  coverage: 47.1% of statements
?       github.com/bettercap/bettercap/packets  [no test files]
ok      github.com/bettercap/bettercap/session  1.956s  coverage: 8.4% of statements
?       github.com/bettercap/bettercap/tls  [no test files]
$ git checkout master 
$ echo "lets see what picat fucked up" | lolcat
$ make test
# github.com/bettercap/bettercap/core
core/core.go:96:38: undefined: usr
... ect

Works fine! Thanx!

Was this page helpful?
0 / 5 - 0 ratings