diff --git a/pkgs/tools/security/cowpatty/default.nix b/pkgs/tools/security/cowpatty/default.nix index 4cd420650f3..934b31a35da 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"; + version = "4.8"; - buildInputs = [ openssl libpcap ]; - - 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 + ]; - meta = { + buildInputs = [ + openssl + libpcap + ]; + + makeFlags = [ + "DESTDIR=$(out)" + "BINDIR=/bin" + ]; + + postInstall = '' + installManPage cowpatty.1 + installManPage genpmk.1 + ''; + + 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; }; }