diff --git a/hashcat.changes b/hashcat.changes index dc5f448..fde9ca4 100644 --- a/hashcat.changes +++ b/hashcat.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Sep 8 08:47:27 UTC 2020 - Jan Engelhardt + +- Update to release 6.1.1 + * new hash-mode plugin interface, new backend API interface, + new algorithms +- Add system-libs.patch + ------------------------------------------------------------------- Thu Mar 14 21:29:33 UTC 2019 - Jan Engelhardt diff --git a/hashcat.spec b/hashcat.spec index e85fd78..28c07de 100644 --- a/hashcat.spec +++ b/hashcat.spec @@ -1,7 +1,7 @@ # # spec file for package hashcat # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,41 +17,97 @@ Name: hashcat -Version: 5.1.0 +%define lname libhashcat6_1_1 +Version: 6.1.1 Release: 0 Summary: CPU-based password recovery utility License: MIT AND GPL-2.0-or-later Group: Productivity/Security -Url: https://hashcat.net/ +URL: https://hashcat.net/ -#Git-Clone: git://github.com/hashcat/hashcat Source: https://github.com/hashcat/hashcat/archive/v%version.tar.gz +Patch1: system-libs.patch BuildRequires: fdupes BuildRequires: gmp-devel -BuildRequires: opencl-headers -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: xxhash-devel +BuildRequires: pkgconfig(clzma) +BuildRequires: pkgconfig(minizip) +BuildRequires: pkgconfig(zlib) ExclusiveArch: %ix86 x86_64 %description -Hashcat is an advanced CPU-based password recovery utility, -supporting seven unique modes of testing for over 100 optimized -hashing algorithms. +Hashcat is a password recovery utility, supporting seven +unique modes of testing for over 100 optimized hashing algorithms. + +GPU Driver requirements: + + * AMD GPUs on Linux require "RadeonOpenCompute (ROCm)" Software + Platform (3.1 or later) + * AMD GPUs on Windows require "AMD Radeon Adrenalin 2020 + Edition" (20.2.2 or later) + * Intel and AMD CPUs require "OpenCL Runtime for Intel Core and + Intel Xeon Processors" (16.1.1 or later) + * NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and + "CUDA Toolkit" (9.0 or later) + +%package -n %lname +Summary: Implementation of the hashcat engine +Group: System/Libraries + +%description -n %lname +Hashcat is a password recovery utility, supporting seven +unique modes of testing for over 100 optimized hashing algorithms. + +%package devel +Summary: Header files for making hashcat plugins +Group: Development/Libraries/C and C++ +Requires: %lname = %version + +%description devel +Hashcat is a password recovery utility, supporting seven +unique modes of testing for over 100 optimized hashing algorithms. + +This subpackage contains the header files. %prep -%setup -q +%autosetup -p1 %build -make %{?_smp_mflags} COMPTIME=0 our_CFLAGS="%optflags" PREFIX="%_prefix" +%global margs DOCUMENT_FOLDER="%_docdir/%name" our_CFLAGS="%optflags" LIBRARY_FOLDER="%_libdir" +%make_build %margs %install -%make_install PREFIX="%_prefix" DOCUMENT_FOLDER="%_docdir/%name" +%make_install %margs +b="%buildroot" +ln -s libhashcat.so.%version "$b/%_libdir/libhashcat.so" +# fix stupid placement of arch-dep files +mkdir "$b/%_libdir/%name" +mv "$b/%_datadir/%name/modules" "$b/%_libdir/%name/" +ln -s "%_libdir/%name/modules" "$b/%_datadir/%name/" %fdupes %buildroot/%_prefix +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + %files -%defattr(-,root,root) %doc README.md %_bindir/hashcat -%_datadir/%name/ %_docdir/%name/ +%_libdir/%name/ +%dir %_datadir/%name/ +%_datadir/%name/modules +%_datadir/%name/hashcat.hcstat2 +%_datadir/%name/hashcat.hctune +%dir %_datadir/%name/OpenCL/ +%_datadir/%name/OpenCL/*.cl + +%files -n %lname +%_libdir/libhashcat.so.%version + +%files devel +%_includedir/hashcat/ +%_libdir/libhashcat.so +%dir %_datadir/%name/ +%_datadir/%name/OpenCL/*.h %changelog diff --git a/system-libs.patch b/system-libs.patch new file mode 100644 index 0000000..5dd6e0c --- /dev/null +++ b/system-libs.patch @@ -0,0 +1,91 @@ +From: Jan Engelhardt +Date: 2020-09-08 11:36:38.217829093 +0200 + + * Drop %(date +%s) / __DATE__. + * Drop forced stripping. + * Replace lzma-sdk library name by what's used. + * Since now the Makefile is already touched, enable use of system + libraries through this patch rather than on the command-line. + +--- + src/Makefile | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +Index: hashcat-6.1.1/src/Makefile +=================================================================== +--- hashcat-6.1.1.orig/src/Makefile ++++ hashcat-6.1.1/src/Makefile +@@ -3,16 +3,16 @@ + ## License.....: MIT + ## + +-SHARED ?= 0 ++SHARED ?= 1 + DEBUG := 0 + PRODUCTION := 1 + PRODUCTION_VERSION := v6.1.1 + ENABLE_CUBIN ?= 1 + ENABLE_BRAIN ?= 1 +-USE_SYSTEM_LZMA ?= 0 +-USE_SYSTEM_ZLIB ?= 0 ++USE_SYSTEM_LZMA ?= 1 ++USE_SYSTEM_ZLIB ?= 1 + USE_SYSTEM_OPENCL ?= 0 +-USE_SYSTEM_XXHASH ?= 0 ++USE_SYSTEM_XXHASH ?= 1 + + ## + ## Detect Operating System +@@ -95,7 +95,7 @@ VERSION_PURE := $(shell echo + ## + + DESTDIR ?= +-PREFIX ?= /usr/local ++PREFIX ?= /usr + + INSTALL_FOLDER ?= $(PREFIX)/bin + SHARED_ROOT_FOLDER ?= $(PREFIX)/share +@@ -112,7 +112,7 @@ LIBRARY_DEV_FOLDER ?= $(LIBRARY_DEV + ifeq ($(USE_SYSTEM_LZMA),0) + DEPS_LZMA_PATH := deps/LZMA-SDK/C + else +-DEPS_LZMA_PATH := $(LIBRARY_DEV_ROOT_FOLDER) ++DEPS_LZMA_PATH := /usr/include/clzma + endif + + ifeq ($(USE_SYSTEM_ZLIB),0) +@@ -158,7 +158,7 @@ endif # MSYS2 + ## Misc stuff + ## + +-COMPTIME := $(shell date +%s) ++COMPTIME := 0 + + ## + ## General compiler and linker options +@@ -166,6 +166,7 @@ COMPTIME := $(shell date + + LFLAGS := $(LDFLAGS) + ++CFLAGS += $(our_CFLAGS) + ifeq ($(PRODUCTION),0) + CFLAGS += -W + CFLAGS += -Wall +@@ -188,7 +189,7 @@ endif + ifeq ($(DEBUG),0) + CFLAGS += -O2 + ifneq ($(UNAME),Darwin) +-LFLAGS += -s ++LFLAGS += + endif + else + ifeq ($(DEBUG),1) +@@ -214,7 +215,7 @@ CFLAGS += -pipe -std=gn + # LZMA + CFLAGS += -I$(DEPS_LZMA_PATH) + ifeq ($(USE_SYSTEM_LZMA),1) +-LFLAGS += -llzmasdk ++LFLAGS += -lclzma + endif + + # ZLIB diff --git a/v5.1.0.tar.gz b/v5.1.0.tar.gz deleted file mode 100644 index 39638c2..0000000 --- a/v5.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:283beaa68e1eab41de080a58bb92349c8e47a2bb1b93d10f36ea30f418f1e338 -size 4266878 diff --git a/v6.1.1.tar.gz b/v6.1.1.tar.gz new file mode 100644 index 0000000..a8a646e --- /dev/null +++ b/v6.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39c140bbb3c0bdb1564bfa9b9a1cff49115a42f4c9c19e9b066b617aea309f80 +size 5385180