背景

在 Kali 上安装使用 powershell-empire 时,csharpserver 插件提示找不到 dotnet

相关报错

[ERROR]: [Errno 2] No such file or directory: 'dotnet' 
[INFO]: csharpserver: [!] [Errno 2] No such file or directory: 'dotnet' 
[ERROR]: Plugin failed to run: csharpserver 

Empire 官方给出的解决方案是 apt install powershell ,然而 Kali 的官方源并没有提供 arm64 版本的 powershell

相关报错

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package powershell is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'powershell' has no installation candidate

解决方案

使用微软提供的 dotnet install script 进行的安装

  1. wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
  2. sudo chmod +x ./dotnet-install.sh
  3. ./dotnet-install.sh --version latest
  4. sudo ln -s $HOME/.dotnet/dotnet /usr/bin
Last modification:June 10, 2023
If you think my article is useful to you, please feel free to appreciate