diff --git a/testing/hashcat/0001-fix-modules-path.patch b/testing/hashcat/0001-fix-modules-path.patch new file mode 100644 index 00000000000..a10588057fb --- /dev/null +++ b/testing/hashcat/0001-fix-modules-path.patch @@ -0,0 +1,33 @@ +diff --git a/src/Makefile b/src/Makefile +index e538b6c28..bc741ea8b 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -532,9 +532,9 @@ install_kernels: install_shared + + .PHONY: install_modules + install_modules: install_shared modules +- $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/modules +- $(FIND) modules/ -mindepth 1 -type d -execdir $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/modules/{} \; +- $(FIND) modules/ -mindepth 1 -type f -execdir $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/modules/{} \; ++ $(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)/hashcat/modules ++ $(FIND) modules/ -mindepth 1 -type d -execdir $(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)/hashcat/modules/{} \; ++ $(FIND) modules/ -mindepth 1 -type f -execdir $(INSTALL) -m 644 {} $(DESTDIR)$(LIBRARY_FOLDER)/hashcat/modules/{} \; + + .PHONY: install_library + install_library: $(HASHCAT_LIBRARY) +diff --git a/src/interface.c b/src/interface.c +index d81b4ec97..5bf3e091a 100644 +--- a/src/interface.c ++++ b/src/interface.c +@@ -21,9 +21,9 @@ int module_filename (const folder_config_t *folder_config, const int hash_mode, + { + // native compiled + #if defined (_WIN) || defined (__CYGWIN__) +- return snprintf (out_buf, out_size, "%s/modules/module_%05d.dll", folder_config->shared_dir, hash_mode); ++ return snprintf (out_buf, out_size, "/usr/lib/hashcat/modules/module_%05d.dll", hash_mode); + #else +- return snprintf (out_buf, out_size, "%s/modules/module_%05d.so", folder_config->shared_dir, hash_mode); ++ return snprintf (out_buf, out_size, "/usr/lib/hashcat/modules/module_%05d.so", hash_mode); + #endif + } + diff --git a/testing/hashcat/APKBUILD b/testing/hashcat/APKBUILD new file mode 100644 index 00000000000..d5a57803da5 --- /dev/null +++ b/testing/hashcat/APKBUILD @@ -0,0 +1,30 @@ +# Contributor: Patrycja Rosa +# Maintainer: Patrycja Rosa +pkgname=hashcat +pkgver=6.2.5 +pkgrel=0 +pkgdesc="World's fastest and most advanced password recovery utility" +url="https://hashcat.net/hashcat/" +arch="all !s390x" # compiling for big-endian architecture not supported +license="MIT" +makedepends="linux-headers findutils opencl-headers xxhash-dev zlib-dev minizip-dev" +subpackages="$pkgname-doc" +source="https://github.com/hashcat/hashcat/archive/v$pkgver/hashcat-$pkgver.tar.gz + 0001-fix-modules-path.patch" +options="!check" # no checks provided + +build() { + make PREFIX="/usr" \ + USE_SYSTEM_OPENCL=1 \ + USE_SYSTEM_XXHASH=1 \ + USE_SYSTEM_ZLIB=1 +} + +package() { + make DESTDIR="$pkgdir" PREFIX="/usr" install +} + +sha512sums=" +2b881146c625172c91cb74b33851473155dcde2421fba1b4acfba28116499b9cff832a62c4dbc24e16df06a827494f30699a7d0e5195d5ed107704f525255383 hashcat-6.2.5.tar.gz +9a58e709d69910f0f33cd7b0151b4709b78bd55b8592ad51e9bc5d41b807aaddaf87ed09102da3955f757a84349f59d7e06b073c6031b763418e3334da3de8a7 0001-fix-modules-path.patch +"