From cff179f829650be1de32f030dfb73c7b8284ed76 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 31 Mar 2014 10:56:02 -0500 Subject: [PATCH 1/2] hashcat: version 0.47 Signed-off-by: Austin Seipp --- pkgs/tools/security/hashcat/default.nix | 48 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/tools/security/hashcat/default.nix diff --git a/pkgs/tools/security/hashcat/default.nix b/pkgs/tools/security/hashcat/default.nix new file mode 100644 index 000000000000..5e1737241904 --- /dev/null +++ b/pkgs/tools/security/hashcat/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, p7zip, patchelf }: + +let + bits = if stdenv.system == "x86_64-linux" then "64" else "32"; + libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.libc ]; + + fixBin = x: '' + patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + --set-rpath ${libPath} ${x} + ''; +in +stdenv.mkDerivation rec { + name = "hashcat-${version}"; + version = "0.47"; + + src = fetchurl { + url = "http://hashcat.net/files/${name}.7z"; + sha256 = "0mc4lv4qfxabp794xfzgr63fhwk7lvbg12pry8a96lldp0jwp6i3"; + }; + + buildInputs = [ p7zip patchelf ]; + + unpackPhase = "7z x $src > /dev/null && cd ${name}"; + + installPhase = '' + mkdir -p $out/bin $out/libexec + cp -R * $out/libexec + + echo -n "/" > $out/bin/eula.accepted + ln -s $out/libexec/hashcat-cli${bits}.bin $out/bin/hashcat + ln -s $out/libexec/hashcat-cliXOP.bin $out/bin/hashcat-xop + ln -s $out/libexec/hashcat-cliAVX.bin $out/bin/hashcat-avx + ''; + + fixupPhase = '' + ${fixBin "$out/libexec/hashcat-cli${bits}.bin"} + ${fixBin "$out/libexec/hashcat-cliXOP.bin"} + ${fixBin "$out/libexec/hashcat-cliAVX.bin"} + ''; + + meta = { + description = "Fast password cracker"; + homepage = "http://hashcat.net/hashcat/"; + license = stdenv.lib.licenses.unfreeRedistributable; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df25e7dec5c5..f7e7e51dc784 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1172,6 +1172,8 @@ let hardlink = callPackage ../tools/system/hardlink { }; + hashcat = callPackage ../tools/security/hashcat { }; + halibut = callPackage ../tools/typesetting/halibut { }; hddtemp = callPackage ../tools/misc/hddtemp { }; From 3ef0a880cbd7d7efe58e70800cea045b5134b073 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 31 Mar 2014 11:22:50 -0500 Subject: [PATCH 2/2] p0f: version 3.06b Signed-off-by: Austin Seipp --- pkgs/tools/security/p0f/default.nix | 38 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/tools/security/p0f/default.nix diff --git a/pkgs/tools/security/p0f/default.nix b/pkgs/tools/security/p0f/default.nix new file mode 100644 index 000000000000..2c54e0b3cb8f --- /dev/null +++ b/pkgs/tools/security/p0f/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, libpcap }: + +stdenv.mkDerivation rec { + name = "p0f-${version}"; + version = "3.06b"; + + src = fetchurl { + url = "http://lcamtuf.coredump.cx/p0f3/releases/${name}.tgz"; + sha256 = "1rydqvr78a3rjp9iwfbw4bs7jfb4p22962makdgw8yjmw8dr6lfi"; + }; + + buildInputs = [ libpcap ]; + + buildPhase = '' + substituteInPlace config.h --replace "p0f.fp" "$out/etc/p0f.fp" + ./build.sh + cd tools && make && cd .. + ''; + + installPhase = '' + mkdir -p $out/sbin $out/etc + + cp ./p0f $out/sbin + cp ./p0f.fp $out/etc + + cp ./tools/p0f-client $out/sbin + cp ./tools/p0f-sendsyn $out/sbin + cp ./tools/p0f-sendsyn6 $out/sbin + ''; + + meta = { + description = "Passive network reconnaissance and fingerprinting tool"; + homepage = "http://lcamtuf.coredump.cx/p0f3/"; + license = stdenv.lib.licenses.lgpl21; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f7e7e51dc784..bec5bca14283 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1650,6 +1650,8 @@ let inherit (gnome3) gnome_icon_theme gnome_icon_theme_symbolic; }; + p0f = callPackage ../tools/security/p0f { }; + hurdPartedCross = if crossSystem != null && crossSystem.config == "i586-pc-gnu" then (makeOverridable