nixpkgs/pkgs/tools/security/bettercap/default.nix
2021-01-21 09:52:27 -08:00

40 lines
1.0 KiB
Nix

{ lib, stdenv
, buildGoModule
, fetchFromGitHub
, pkg-config
, libpcap
, libnfnetlink
, libnetfilter_queue
, libusb1
}:
buildGoModule rec {
pname = "bettercap";
version = "2.29";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-hXYsFRYSyYKYJM4gS0Dyiia9aPA07GWSsp9doA0vYGI=";
};
vendorSha256 = "sha256-yIvwYUK+4cnHFwvJS2seDa9vJ/2cQ10Q46hR8U0aSRE=";
doCheck = false;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libpcap libusb1 ]
++ lib.optionals stdenv.isLinux [ libnfnetlink libnetfilter_queue ];
meta = with lib; {
description = "A man in the middle tool";
longDescription = ''
BetterCAP is a powerful, flexible and portable tool created to perform various types of MITM attacks against a network, manipulate HTTP, HTTPS and TCP traffic in realtime, sniff for credentials and much more.
'';
homepage = "https://www.bettercap.org/";
license = with licenses; gpl3;
maintainers = with maintainers; [ y0no ];
};
}