about summary refs log tree commit diff
path: root/pkgs/tools/security/yersinia
diff options
context:
space:
mode:
authorVictor Buttner <victor@0x23.dk>2021-11-10 08:54:40 +0100
committerVictor Buttner <victor@0x23.dk>2022-05-06 22:38:20 +0200
commit308bd3ae9b3b9c8ec31d27bce4af685b7844d97f (patch)
treeaefca623f37ba46bad10d88e93c02a11a78e2ae3 /pkgs/tools/security/yersinia
parente4806bb4416f88c20f8be0b8ef9b5b09ff9022a6 (diff)
yersinia: init at 0.8.2
Diffstat (limited to 'pkgs/tools/security/yersinia')
-rw-r--r--pkgs/tools/security/yersinia/default.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/tools/security/yersinia/default.nix b/pkgs/tools/security/yersinia/default.nix
new file mode 100644
index 0000000000000..390ed880ca1e2
--- /dev/null
+++ b/pkgs/tools/security/yersinia/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkg-config, fetchpatch
+, ncurses, libpcap, libnet
+# alpha version of GTK interface
+, withGtk ? false, gtk2
+# enable remote admin interface
+, enableAdmin ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "yersinia";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+    owner = "tomac";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "06yfpf9iyi525rly1ychsihzvw3sas8kp0nxxr99xkwiqp5dc78b";
+  };
+
+  patches = [
+    # ncurses-6.3 support, included in next release
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://github.com/tomac/yersinia/commit/d91bbf6f475e7ea39f131b77ce91b2de9646d5ca.patch";
+      sha256 = "fl1pZKWA+nLtBm9+3FBFqaeuVZjszQCNkNl6Cf++BAI=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libpcap libnet ncurses ]
+    ++ lib.optional withGtk gtk2;
+
+  autoreconfPhase = "./autogen.sh";
+
+  configureFlags = [
+    "--with-pcap-includes=${libpcap}/include"
+    "--with-libnet-includes=${libnet}/include"
+  ]
+  ++ lib.optional (!enableAdmin) "--disable-admin"
+  ++ lib.optional (!withGtk) "--disable-gtk";
+
+  makeFlags = [ "LDFLAGS=-lncurses" ];
+
+  meta = with lib; {
+    description = "A framework for layer 2 attacks";
+    homepage = "https://github.com/tomac/yersinia";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ vdot0x23 ];
+    # INSTALL and FAQ in this package seem a little outdated
+    # so not sure, but it could work on openbsd, illumos, and freebsd
+    # if you have a machine to test with, feel free to add these
+    platforms = with platforms; linux;
+  };
+}