about summary refs log tree commit diff
path: root/pkgs/tools/security/cowpatty
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-08-31 22:58:52 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-08-31 22:58:52 +0200
commitf452146df8a5b6ac8920ddecbcec41a817dffff0 (patch)
treeb7b5874c6d6ce918d37364e2cfabd062a7d327e4 /pkgs/tools/security/cowpatty
parentd874a520155a73111f227744672254de0624aae5 (diff)
cowpatty: 4.6 -> 4.8
Diffstat (limited to 'pkgs/tools/security/cowpatty')
-rw-r--r--pkgs/tools/security/cowpatty/default.nix50
1 files changed, 36 insertions, 14 deletions
diff --git a/pkgs/tools/security/cowpatty/default.nix b/pkgs/tools/security/cowpatty/default.nix
index 4cd420650f3bb..934b31a35da67 100644
--- a/pkgs/tools/security/cowpatty/default.nix
+++ b/pkgs/tools/security/cowpatty/default.nix
@@ -1,26 +1,48 @@
-{ lib, stdenv, fetchurl, openssl, libpcap
+{ lib
+, stdenv
+, clang
+, fetchFromGitHub
+, installShellFiles
+, openssl
+, libpcap
 }:
 
-with lib;
-
 stdenv.mkDerivation rec {
   pname = "cowpatty";
-  version = "4.6";
-
-  buildInputs = [ openssl libpcap ];
+  version = "4.8";
 
-  src = fetchurl {
-    url = "http://www.willhackforsushi.com/code/cowpatty/${version}/${pname}-${version}.tgz";
-    sha256 = "1hivh3bq2maxvqzwfw06fr7h8bbpvxzah6mpibh3wb85wl9w2gyd";
+  src = fetchFromGitHub {
+    owner = "joswr1ght";
+    repo = pname;
+    rev = version;
+    sha256 = "0fvwwghhd7wsx0lw2dj9rdsjnirawnq3c6silzvhi0yfnzn5fs0s";
   };
 
-  installPhase = "make DESTDIR=$out BINDIR=/bin install";
+  nativeBuildInputs = [
+    clang
+    installShellFiles
+  ];
+
+  buildInputs = [
+    openssl
+    libpcap
+  ];
+
+  makeFlags = [
+    "DESTDIR=$(out)"
+    "BINDIR=/bin"
+  ];
+
+  postInstall = ''
+    installManPage cowpatty.1
+    installManPage genpmk.1
+  '';
 
-  meta = {
+  meta = with lib; {
     description = "Offline dictionary attack against WPA/WPA2 networks";
-    license = licenses.gpl2;
-    homepage = "https://www.willhackforsushi.com/?page_id=50";
-    maintainers = with maintainers; [ nico202 ];
+    homepage = "https://github.com/joswr1ght/cowpatty";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ nico202 fab ];
     platforms = platforms.linux;
   };
 }