Today i have upgraded bettercap to version 2.5 and then when i call (with or without sudo) it prints the following lines:
MacBook-Pro:~ Fenix$ bettercap
bettercap v2.5 (type 'help' for a list of commands)
Stopping modules and cleaning session state ...
panic: runtime error: index out of range
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x428704f]
goroutine 1 [running]:
github.com/bettercap/bettercap/session.(*Session).Close(0xc421358000)
/Users/Fenix/go/src/github.com/bettercap/bettercap/session/session.go:251 +0xff
panic(0x4637440, 0x4cb4e80)
/usr/local/go/src/runtime/panic.go:505 +0x229
encoding/binary.binary.bigEndian.Uint32(...)
/usr/local/go/src/encoding/binary/binary.go:111
github.com/bettercap/bettercap/network.ip2int(0x0, 0x0, 0x0, 0x0)
/Users/Fenix/go/src/github.com/bettercap/bettercap/network/lan_endpoint.go:88 +0x4f
github.com/bettercap/bettercap/network.(*Endpoint).SetIP(0xc421362400, 0xc421381160, 0xf)
/Users/Fenix/go/src/github.com/bettercap/bettercap/network/lan_endpoint.go:115 +0x9a
github.com/bettercap/bettercap/network.buildEndpointFromInterface(0xc, 0x5dc, 0xc421380d99, 0x3, 0xc421380e96, 0x6, 0x6, 0x13, 0xc4200fba88, 0x40d3c43, ...)
/Users/Fenix/go/src/github.com/bettercap/bettercap/network/net.go:138 +0x1f4
github.com/bettercap/bettercap/network.FindInterface(0x0, 0x0, 0xc4200fbbf0, 0xc4213922a0, 0x474f4f6)
/Users/Fenix/go/src/github.com/bettercap/bettercap/network/net.go:205 +0x189
github.com/bettercap/bettercap/session.(*Session).Start(0xc421358000, 0xc421391960, 0x10)
/Users/Fenix/go/src/github.com/bettercap/bettercap/session/session.go:363 +0xb1
main.main()
/Users/Fenix/go/src/github.com/bettercap/bettercap/main.go:57 +0xdae
Bettercap 2.5
MacOS 10.13.4
Go 1.10 darwin/amd64
bettercap or sudo bettercap
Thanks!
I have the same problem after updating. While developers resolve the issue, I recommend you download v2.4 and use it :)
go get github.com/bettercap/bettercap does not install 2.5 but master, which is the developement version. In order to use 2.5, you either need to download a precompild release, or checkout the 2.5 tag of the source code you're downloading that way ...
there you go :+1:
@sidelux otherwise bettercap is available also on homebrew (macOS)
@evilsocket I wrote this script to update cleanly:
(launched from ../gopath directory)
rm -rf go
go get github.com/bettercap/bettercap
cd go/bin
cp bettercap /usr/local/go/bin
bettercap
echo "Updated."
So i'm pretty sure i used go get...
Update: btw now it works thanks ;)
Most helpful comment
@sidelux otherwise bettercap is available also on homebrew (macOS)