2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2020-06-19 12:36:08 +02:00
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, opencl-headers
|
|
|
|
, ocl-icd
|
|
|
|
, xxHash
|
|
|
|
}:
|
2014-03-31 17:56:02 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-28 10:51:43 +02:00
|
|
|
pname = "hashcat";
|
2020-08-01 17:37:09 +02:00
|
|
|
version = "6.1.1";
|
2014-03-31 17:56:02 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-11-01 16:05:10 +01:00
|
|
|
url = "https://hashcat.net/files/hashcat-${version}.tar.gz";
|
2020-08-01 17:37:09 +02:00
|
|
|
sha256 = "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r";
|
2014-03-31 17:56:02 +02:00
|
|
|
};
|
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2018-11-17 21:10:52 +01:00
|
|
|
buildInputs = [ opencl-headers xxHash ];
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
makeFlags = [
|
2019-01-08 03:51:22 +01:00
|
|
|
"PREFIX=${placeholder "out"}"
|
2017-11-01 16:05:10 +01:00
|
|
|
"COMPTIME=1337"
|
|
|
|
"VERSION_TAG=${version}"
|
2019-05-28 10:51:43 +02:00
|
|
|
"USE_SYSTEM_OPENCL=1"
|
|
|
|
"USE_SYSTEM_XXHASH=1"
|
2017-11-01 16:05:10 +01:00
|
|
|
];
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2021-02-22 02:37:51 +01:00
|
|
|
preFixup = ''
|
|
|
|
for f in $out/share/hashcat/OpenCL/*.cl; do
|
|
|
|
sed "s|#include \"\(.*\)\"|#include \"$out/share/hashcat/OpenCL/\1\"|g" -i "$f"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
|
2014-03-31 17:56:02 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2014-03-31 17:56:02 +02:00
|
|
|
description = "Fast password cracker";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://hashcat.net/hashcat/";
|
2017-11-01 16:05:10 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ kierdavis zimbatm ];
|
2014-03-31 17:56:02 +02:00
|
|
|
};
|
|
|
|
}
|