diff options
Diffstat (limited to 'security/hashcat/files')
-rw-r--r-- | security/hashcat/files/patch-deps_LZMA-SDK_C_7zTypes.h | 13 | ||||
-rw-r--r-- | security/hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c | 34 | ||||
-rw-r--r-- | security/hashcat/files/patch-include_sort__r.h | 33 | ||||
-rw-r--r-- | security/hashcat/files/patch-src_Makefile | 41 | ||||
-rw-r--r-- | security/hashcat/files/patch-src_terminal.c | 11 |
5 files changed, 28 insertions, 104 deletions
diff --git a/security/hashcat/files/patch-deps_LZMA-SDK_C_7zTypes.h b/security/hashcat/files/patch-deps_LZMA-SDK_C_7zTypes.h deleted file mode 100644 index b2ac34f0e546..000000000000 --- a/security/hashcat/files/patch-deps_LZMA-SDK_C_7zTypes.h +++ /dev/null @@ -1,13 +0,0 @@ ---- deps/LZMA-SDK/C/7zTypes.h.orig 2021-11-21 15:39:01 UTC -+++ deps/LZMA-SDK/C/7zTypes.h -@@ -196,8 +196,8 @@ typedef void *LPVOID;
- // typedef void VOID;
- // typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
- // gcc / clang on Unix : sizeof(long==sizeof(void*) in 32 or 64 bits)
--typedef long INT_PTR;
--typedef unsigned long UINT_PTR;
-+// typedef long INT_PTR;
-+// typedef unsigned long UINT_PTR;
- typedef long LONG_PTR;
- typedef unsigned long DWORD_PTR;
-
diff --git a/security/hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c b/security/hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c deleted file mode 100644 index a788aaec3e8b..000000000000 --- a/security/hashcat/files/patch-deps_LZMA-SDK_C_CpuArch.c +++ /dev/null @@ -1,34 +0,0 @@ ---- deps/LZMA-SDK/C/CpuArch.c.orig 2022-03-25 08:13:08 UTC -+++ deps/LZMA-SDK/C/CpuArch.c -@@ -384,6 +384,23 @@ BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYP -
- #include <sys/auxv.h>
-
-+#if defined(__FreeBSD__)
-+static UInt64 get_hwcap() {
-+ unsigned long hwcap;
-+ if(elf_aux_info(AT_HWCAP, &hwcap, sizeof(unsigned long)) != 0) {
-+ return(0);
-+ }
-+ return hwcap;
-+}
-+
-+BoolInt CPU_IsSupported_CRC32(void) { return get_hwcap() & HWCAP_CRC32; }
-+BoolInt CPU_IsSupported_NEON(void) { return 1; }
-+BoolInt CPU_IsSupported_SHA1(void){ return get_hwcap() & HWCAP_SHA1; }
-+BoolInt CPU_IsSupported_SHA2(void) { return get_hwcap() & HWCAP_SHA2; }
-+BoolInt CPU_IsSupported_AES(void) { return get_hwcap() & HWCAP_AES; }
-+
-+#else // __FreeBSD__
-+
- #define USE_HWCAP
-
- #ifdef USE_HWCAP
-@@ -410,6 +427,7 @@ MY_HWCAP_CHECK_FUNC (SHA1)
- MY_HWCAP_CHECK_FUNC (SHA2)
- MY_HWCAP_CHECK_FUNC (AES)
-
-+#endif // FreeBSD
- #endif // __APPLE__
- #endif // _WIN32
-
diff --git a/security/hashcat/files/patch-include_sort__r.h b/security/hashcat/files/patch-include_sort__r.h deleted file mode 100644 index 3e1d0e0d9d33..000000000000 --- a/security/hashcat/files/patch-include_sort__r.h +++ /dev/null @@ -1,33 +0,0 @@ ---- include/sort_r.h.orig 2022-09-02 14:58:13 UTC -+++ include/sort_r.h -@@ -25,10 +25,10 @@ Slightly modified to work with hashcat to no falsly de - */ - - #if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \ -- defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__) -+ (defined __FreeBSD__ && !defined(qsort_r)) || defined __DragonFly__ || defined __NetBSD__) - # define _SORT_R_BSD - # define _SORT_R_INLINE inline --#elif (defined __linux__) || defined (__CYGWIN__) -+#elif (defined __linux__) || defined (__CYGWIN__) || (defined (__FreeBSD__) && defined(qsort_r)) - # define _SORT_R_LINUX - # define _SORT_R_INLINE inline - #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__) -@@ -167,7 +167,7 @@ static _SORT_R_INLINE void sort_r_simple(void *base, s - #if defined _SORT_R_LINUX - - typedef int(* __compar_d_fn_t)(const void *, const void *, void *); -- extern void qsort_r(void *base, size_t nel, size_t width, -+ extern void (qsort_r)(void *base, size_t nel, size_t width, - __compar_d_fn_t __compar, void *arg) - __attribute__((nonnull (1, 4))); - -@@ -186,7 +186,7 @@ static _SORT_R_INLINE void sort_r_simple(void *base, s - /* no qsort_r in glibc before 2.8, need to use nested qsort */ - sort_r_simple(base, nel, width, compar, arg); - -- #elif defined __GLIBC__ -+ #elif defined __GLIBC__ || (defined(__FreeBSD__) && defined(qsort_r)) - - qsort_r(base, nel, width, compar, arg); - diff --git a/security/hashcat/files/patch-src_Makefile b/security/hashcat/files/patch-src_Makefile index 4e42021a7a6d..e728d5dc6d15 100644 --- a/security/hashcat/files/patch-src_Makefile +++ b/security/hashcat/files/patch-src_Makefile @@ -1,7 +1,19 @@ ---- src/Makefile.orig 2022-09-02 14:58:13 UTC +--- src/Makefile.orig 2025-08-23 08:43:56 UTC +++ src/Makefile -@@ -82,7 +82,9 @@ CXX := c++ - ifneq (,$(filter $(UNAME),FreeBSD NetBSD)) +@@ -75,8 +75,9 @@ RM := rm + FIND := find + INSTALL := install + RM := rm +-SED := sed +-SED_IN_PLACE := -i ++CXXLIB := -lc++ ++SED := /usr/bin/sed ++SED_IN_PLACE := -i "" + + ifeq ($(UNAME),Darwin) + CC := clang +@@ -95,7 +96,9 @@ CXX := c++ + ifneq (,$(filter $(UNAME),FreeBSD NetBSD DragonFly)) CC := cc CXX := c++ -SED := gsed @@ -10,17 +22,20 @@ +SED_IN_PLACE := -i "" endif + ifneq (,$(filter $(UNAME),OpenBSD)) +@@ -702,6 +705,11 @@ uninstall: + ## native compiled hashcat library and frontend ## -@@ -213,7 +215,7 @@ ifneq ($(CC),clang) - ifeq ($(ENABLE_UNRAR),1) - ifeq ($(USE_SYSTEM_UNRAR),0) - ifneq ($(CC),clang) --CFLAGS_UNRAR += -Wno-class-memaccess -+#CFLAGS_UNRAR += -Wno-class-memaccess - CFLAGS_UNRAR += -Wno-misleading-indentation - endif - CFLAGS_UNRAR += -Wno-missing-braces -@@ -651,10 +653,10 @@ $(HASHCAT_FRONTEND): src/main.c $(HASHCAT_LIBRARY) + ++ifeq ($(shell uname -p),powerpc64le) ++obj/emu_inc_cipher_serpent.NATIVE.o: src/emu_inc_cipher_serpent.c ++ $(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) -O0 $< -o $@ -fpic ++endif ++ + obj/%.NATIVE.o: src/%.c + $(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $< -o $@ -fpic + +@@ -752,10 +760,10 @@ $(HASHCAT_FRONTEND): src/main.c $(HASHCAT_LIBRARY) ifeq ($(SHARED),1) $(HASHCAT_FRONTEND): src/main.c $(HASHCAT_LIBRARY) diff --git a/security/hashcat/files/patch-src_terminal.c b/security/hashcat/files/patch-src_terminal.c deleted file mode 100644 index cf2d5cded207..000000000000 --- a/security/hashcat/files/patch-src_terminal.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/terminal.c.orig 2022-09-02 14:58:13 UTC -+++ src/terminal.c -@@ -490,7 +490,7 @@ int tty_fix () - } - #endif - --#if defined (__APPLE__) || defined (__FreeBSD__) -+#if defined (__APPLE__) - static struct termios savemodes; - static int havemodes = 0; - |