Bettercap 无法在 ubuntu 18.04 上运行

问题描述 投票:0回答:1

我最近从源代码 github.com/bettercap/bettercap 安装了 bettercap 我在开始时遇到了一些兼容性问题,但我通过更新 go 版本修复了所有问题 现在当我运行

sudo bettercap
我得到以下错误

bettercap v2.32.0 (built for linux amd64 with go1.19.6) [type 'help' for a list of commands]

panic: runtime error: index out of range [0] with length 0
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xd2180f]

goroutine 1 [running]:
github.com/bettercap/bettercap/session.(*Session).Close(0xc0000f6e00)
    /home/iyad/go/src/github.com/bettercap/bettercap/session/session.go:190 +0xef
panic({0x1152b40, 0xc00003f7e8})
    /snap/go/10050/src/runtime/panic.go:884 +0x212
github.com/bettercap/bettercap/routing.update()
    /home/iyad/go/src/github.com/bettercap/bettercap/routing/update_linux.go:40 +0x5e5
github.com/bettercap/bettercap/routing.Update()
    /home/iyad/go/src/github.com/bettercap/bettercap/routing/tables.go:19 +0x7c
github.com/bettercap/bettercap/routing.Gateway({0x11b7654, 0x4}, {0xc00081d918, 0x6})
    /home/iyad/go/src/github.com/bettercap/bettercap/routing/tables.go:23 +0x6b
github.com/bettercap/bettercap/network.FindGateway(0xc000263300)
    /home/iyad/go/src/github.com/bettercap/bettercap/network/net_gateway.go:10 +0x3c
github.com/bettercap/bettercap/session.(*Session).Start(0xc0000f6e00)
    /home/iyad/go/src/github.com/bettercap/bettercap/session/session.go:254 +0x2ce
main.main()
    /home/iyad/go/src/github.com/bettercap/bettercap/main.go:49 +0x458

我尝试用

sudo apt apdate/upgrade
更新,预计这又是兼容性问题 我试着询问聊天 gpt,我们用
ip route
一起检查了网络设置,我得到了: `默认通过 192.168.100.1 dev wlp5s0 proto dhcp metric 600 169.254.0.0/16 dev wlp5s0 范围链接指标 1000 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 192.168.100.0/24 dev wlp5s0 proto kernel scope link src 192.168.100.12 metric 600

`

这通常意味着一切都已正确设置,(注意他们在我分享的内容中没有关于我的 ip 的信息) 最后它只有在我使用 docker 时才有效

docker run -it --privileged --net=host bettercap/bettercap -h 

security networking ubuntu-18.04 sudo
1个回答
0
投票

此错误的一个可能原因是您的网络接口配置不正确。另一个可能的原因是您的蓝牙适配器与 bettercap 不兼容。要解决此问题,您可以尝试以下步骤:

  • 检查您的网络接口是否已启动并分配了 IP 地址。您可以使用命令
    ip addr show
    查看接口的状态。如果您的界面出现故障,您可以使用
    ip link set <interface> up
    将其调出。如果您的接口没有IP地址,您可以使用
    dhclient <interface>
    ip addr add <address>/<mask> dev <interface>
    分配一个。
  • 检查 bettercap 是否支持您的蓝牙适配器。您可以使用命令
    hciconfig
    查看蓝牙设备的详细信息。如果您的设备没有显示或显示错误,您可能需要安装不同的驱动程序或使用不同的加密狗。
  • 从 GitHub 更新 bettercap 到最新版本。您可以使用命令
    go get -u github.com/bettercap/bettercap
    从源代码更新 bettercap。这可能会修复一些导致恐慌错误的错误或兼容性问题。

希望这可以帮助您解决问题。

© www.soinside.com 2019 - 2024. All rights reserved.