Skip to content

Commit 670c7c9

Browse files
committed
user/hashcat: update to 7.1.2
1 parent 17c2381 commit 670c7c9

6 files changed

Lines changed: 89 additions & 71 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -ruN a/src/Makefile b/src/Makefile
2+
--- a/src/Makefile 2025-08-23 10:43:56.000000000 +0200
3+
+++ b/src/Makefile 2025-09-08 09:41:23.145267815 +0200
4+
@@ -89,7 +89,7 @@
5+
IS_APPLE_SILICON := $(shell [ "$$(sysctl -in hw.optional.arm64 2>/dev/null)" = "1" ] && echo 1 || echo 0)
6+
endif
7+
8+
-IS_AARCH64 := $(shell [ "$$(arch 2>/dev/null)" = "aarch64" ] && echo 1 || echo 0)
9+
+IS_AARCH64 := $(shell [ "$$CBUILD_TARGET_MACHINE" = "aarch64" ] && echo 1 || echo 0)
10+
IS_ARM := $(or $(filter 1,$(IS_APPLE_SILICON)),$(filter 1,$(IS_AARCH64)))
11+
12+
ifneq (,$(filter $(UNAME),FreeBSD NetBSD DragonFly))
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff -ruN a/src/bridges/bridge_rust_generic_hash.mk b/src/bridges/bridge_rust_generic_hash.mk
2+
--- a/src/bridges/bridge_rust_generic_hash.mk 2025-08-23 10:43:56.000000000 +0200
3+
+++ b/src/bridges/bridge_rust_generic_hash.mk 2025-09-07 14:45:55.397752076 +0200
4+
@@ -2,7 +2,7 @@
5+
RUSTUP_PRESENT := false
6+
7+
CARGO_VERSION := $(word 2, $(shell cargo version 2>/dev/null))
8+
-CARGO_BUILD_FLAGS := --release --manifest-path Rust/generic_hash/Cargo.toml
9+
+CARGO_BUILD_FLAGS := --release --offline --config .cargo/config.toml --manifest-path Rust/generic_hash/Cargo.toml
10+
RUSTUP_FLAGS :=
11+
ifneq ($(filter 1.%,$(CARGO_VERSION)),)
12+
CARGO_PRESENT := true
13+
@@ -78,4 +78,4 @@
14+
bridges/bridge_rust_generic_hash.$(BRIDGE_SUFFIX): $(COMMON_PREREQS) obj/combined.NATIVE.a $(GENERIC_HASH_DEFAULT)
15+
$(CC) $(CCFLAGS) $(CFLAGS_NATIVE) $(filter-out $(GENERIC_HASH_SO) $(GENERIC_HASH_DLL),$^) -o $@ $(LFLAGS_NATIVE) -shared -fPIC -D BRIDGE_INTERFACE_VERSION_CURRENT=$(BRIDGE_INTERFACE_VERSION) $(PYTHON_CFLAGS)
16+
endif
17+
-endif
18+
\ No newline at end of file
19+
+endif

user/hashcat/patches/check-hardware-crc-arm.patch

Lines changed: 0 additions & 30 deletions
This file was deleted.

user/hashcat/patches/check-hardware-sha-arm.patch

Lines changed: 0 additions & 26 deletions
This file was deleted.

user/hashcat/patches/fix-modules-path.patch

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
Patch-Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/e71cc12f98ab3e42e0c2736ef41bc784e360da1c/testing/hashcat/0001-fix-modules-path.patch
22

3-
diff --git a/src/Makefile b/src/Makefile
4-
index e538b6c28..bc741ea8b 100644
5-
--- a/src/Makefile
6-
+++ b/src/Makefile
7-
@@ -532,9 +532,9 @@ install_kernels: install_shared
3+
diff -ruN a/src/Makefile b/src/Makefile
4+
--- a/src/Makefile 2025-08-23 10:43:56.000000000 +0200
5+
+++ b/src/Makefile 2025-09-07 14:54:40.368790546 +0200
6+
@@ -658,15 +658,15 @@
87

98
.PHONY: install_modules
109
install_modules: install_shared modules
@@ -15,13 +14,36 @@ index e538b6c28..bc741ea8b 100644
1514
+ $(FIND) modules/ -mindepth 1 -type d -execdir $(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)/hashcat/modules/{} \;
1615
+ $(FIND) modules/ -mindepth 1 -type f -execdir $(INSTALL) -m 644 {} $(DESTDIR)$(LIBRARY_FOLDER)/hashcat/modules/{} \;
1716

17+
.PHONY: install_bridges
18+
install_bridges: install_shared bridges
19+
- $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/bridges
20+
- $(FIND) bridges/ -mindepth 1 -type d -execdir $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/bridges/{} \;
21+
- $(FIND) bridges/ -mindepth 1 -type f -execdir $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/bridges/{} \;
22+
+ $(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)/bridges
23+
+ $(FIND) bridges/ -mindepth 1 -type d -execdir $(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)/bridges/{} \;
24+
+ $(FIND) bridges/ -mindepth 1 -type f -execdir $(INSTALL) -m 644 {} $(DESTDIR)$(LIBRARY_FOLDER)/bridges/{} \;
25+
1826
.PHONY: install_library
1927
install_library: $(HASHCAT_LIBRARY)
20-
diff --git a/src/interface.c b/src/interface.c
21-
index d81b4ec97..5bf3e091a 100644
22-
--- a/src/interface.c
23-
+++ b/src/interface.c
24-
@@ -21,9 +21,9 @@ int module_filename (const folder_config_t *folder_config, const int hash_mode,
28+
diff -ruN a/src/bridges.c b/src/bridges.c
29+
--- a/src/bridges.c 2025-08-23 10:43:56.000000000 +0200
30+
+++ b/src/bridges.c 2025-09-07 14:56:02.068139453 +0200
31+
@@ -22,9 +22,9 @@
32+
{
33+
// native compiled
34+
#if defined (_WIN) || defined (__CYGWIN__)
35+
- return snprintf (out_buf, out_size, "%s/bridges/bridge_%s.dll", folder_config->shared_dir, bridge_name);
36+
+ return snprintf (out_buf, out_size, "/usr/lib/hashcat/bridges/bridge_%s.dll", bridge_name);
37+
#else
38+
- return snprintf (out_buf, out_size, "%s/bridges/bridge_%s.so", folder_config->shared_dir, bridge_name);
39+
+ return snprintf (out_buf, out_size, "/usr/lib/hashcat/bridges/bridge_%s.so", bridge_name);
40+
#endif
41+
}
42+
43+
diff -ruN a/src/interface.c b/src/interface.c
44+
--- a/src/interface.c 2025-08-23 10:43:56.000000000 +0200
45+
+++ b/src/interface.c 2025-09-07 14:53:37.182294123 +0200
46+
@@ -21,9 +21,9 @@
2547
{
2648
// native compiled
2749
#if defined (_WIN) || defined (__CYGWIN__)

user/hashcat/template.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,56 @@
11
pkgname = "hashcat"
2-
pkgver = "6.2.6"
2+
pkgver = "7.1.2"
33
pkgrel = 0
44
build_style = "makefile"
55
make_env = {
66
"PREFIX": "/usr",
77
"SED": "/usr/bin/gsed",
8-
"USE_SYSTEM_ZLIB": "1",
98
"USE_SYSTEM_OPENCL": "1",
109
"USE_SYSTEM_XXHASH": "1",
10+
"USE_SYSTEM_ZLIB": "1",
11+
# prevents -march=native from being passed
12+
"MAINTAINER_MODE": "1",
1113
}
1214
make_use_env = True
13-
hostmakedepends = ["gsed"]
15+
hostmakedepends = [
16+
"cargo",
17+
"gsed",
18+
]
1419
makedepends = [
1520
"linux-headers",
1621
"minizip-devel",
1722
"opencl-headers",
23+
"python-devel",
24+
"rust-std",
1825
"xxhash-devel",
1926
"zlib-ng-compat-devel",
2027
]
2128
pkgdesc = "Password recovery tool"
2229
license = "MIT"
2330
url = "https://hashcat.net/hashcat"
2431
source = f"https://hashcat.net/files/hashcat-{pkgver}.tar.gz"
25-
sha256 = "b25e1077bcf34908cc8f18c1a69a2ec98b047b2cbcf0f51144dcf3ba1e0b7b2a"
32+
sha256 = "9546a6326d747530b44fcc079babad40304a87f32d3c9080016d58b39cfc8b96"
2633
# check: no obvious test suite
27-
options = ["!check"]
34+
options = ["!check", "!cross"]
2835

2936

3037
if self.profile().endian == "big":
3138
broken = "bug endian"
3239

3340

41+
def prepare(self):
42+
from cbuild.util import cargo
43+
44+
cargo.Cargo(self).vendor(
45+
["--manifest-path", "Rust/generic_hash/Cargo.toml"]
46+
)
47+
48+
49+
def init_build(self):
50+
from cbuild.util import cargo
51+
52+
self.make_env.update(cargo.get_environment(self))
53+
54+
3455
def post_install(self):
3556
self.install_license("docs/license.txt")

0 commit comments

Comments
 (0)