mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-21 23:58:07 +00:00
Support building windows binaries on macOS using MinGW, updated documentation
This commit is contained in:
parent
ba4ce96bbf
commit
7ab00af506
6
BUILD.md
6
BUILD.md
@ -3,7 +3,7 @@ hashcat build documentation
|
|||||||
|
|
||||||
### Revision ###
|
### Revision ###
|
||||||
|
|
||||||
* 1.5
|
* 1.6
|
||||||
|
|
||||||
### Author ###
|
### Author ###
|
||||||
|
|
||||||
@ -61,6 +61,10 @@ Otherwise:
|
|||||||
- Cached kernels go to: $HOME/.cache/hashcat
|
- Cached kernels go to: $HOME/.cache/hashcat
|
||||||
- Potfiles go to: $HOME/.local/share/hashcat/
|
- Potfiles go to: $HOME/.local/share/hashcat/
|
||||||
|
|
||||||
|
### Building hashcat for Windows (using macOS) ###
|
||||||
|
|
||||||
|
Refer to [BUILD_macOS.md](BUILD_macOS.md)
|
||||||
|
|
||||||
### Building hashcat for Windows (using Windows Subsystem for Linux) ###
|
### Building hashcat for Windows (using Windows Subsystem for Linux) ###
|
||||||
|
|
||||||
Refer to [BUILD_WSL.md](BUILD_WSL.md)
|
Refer to [BUILD_WSL.md](BUILD_WSL.md)
|
||||||
|
27
BUILD_macOS.md
Normal file
27
BUILD_macOS.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Compiling hashcat for Windows with macOS.
|
||||||
|
|
||||||
|
Tested on macOS 12.6.6 M1.
|
||||||
|
|
||||||
|
Make sure to have the HomeBrew upgraded.
|
||||||
|
|
||||||
|
### Installation ###
|
||||||
|
|
||||||
|
```
|
||||||
|
brew install mingw-w64
|
||||||
|
git clone https://github.com/hashcat/hashcat
|
||||||
|
git clone https://github.com/win-iconv/win-iconv
|
||||||
|
cd win-iconv/
|
||||||
|
patch < ../hashcat/tools/win-iconv-64.diff
|
||||||
|
sudo make install
|
||||||
|
cd ../
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building ###
|
||||||
|
|
||||||
|
You've already cloned the latest master revision of hashcat repository above, so switch to the folder and type "make win" to start compiling hashcat
|
||||||
|
```
|
||||||
|
cd hashcat/
|
||||||
|
make win
|
||||||
|
```
|
||||||
|
|
||||||
|
The process may take a while, please be patient.
|
@ -95,7 +95,9 @@
|
|||||||
- Apple Driver: Updated requirements to use Apple OpenCL API to macOS 13.0 - use
|
- Apple Driver: Updated requirements to use Apple OpenCL API to macOS 13.0 - use
|
||||||
- Backend Checks: Describe workaround in error message when detecting more than 64 backend devices
|
- Backend Checks: Describe workaround in error message when detecting more than 64 backend devices
|
||||||
- Brain: Added sanity check and corresponding error message for invalid --brain-port values
|
- Brain: Added sanity check and corresponding error message for invalid --brain-port values
|
||||||
|
- Building: Support building windows binaries on macOS using MinGW
|
||||||
- Dependencies: Updated OpenCL-Headers to v2023.04.17
|
- Dependencies: Updated OpenCL-Headers to v2023.04.17
|
||||||
|
- Documents: Updated BUILD.md and added BUILD_macOS.md (containing instructions for building windows binaries on macOS)
|
||||||
- Modules: Added support for non-zero IVs for -m 6800 (Lastpass). Also added `tools/lastpass2hashcat.py`
|
- Modules: Added support for non-zero IVs for -m 6800 (Lastpass). Also added `tools/lastpass2hashcat.py`
|
||||||
- Open Document Format: Added support for small documents with content length < 1024
|
- Open Document Format: Added support for small documents with content length < 1024
|
||||||
- Status Code: Add specific return code for self-test fail (-11)
|
- Status Code: Add specific return code for self-test fail (-11)
|
||||||
|
47
src/Makefile
47
src/Makefile
@ -407,10 +407,6 @@ EMU_OBJS_ALL += emu_inc_hash_base58
|
|||||||
|
|
||||||
OBJS_ALL := affinity autotune backend benchmark bitmap bitops combinator common convert cpt cpu_crc32 debugfile dictstat dispatch dynloader event ext_ADL ext_cuda ext_hip ext_nvapi ext_nvml ext_nvrtc ext_hiprtc ext_OpenCL ext_sysfs_amdgpu ext_sysfs_cpu ext_iokit ext_lzma filehandling folder hashcat hashes hlfmt hwmon induct interface keyboard_layout locking logfile loopback memory monitor mpsp outfile_check outfile pidfile potfile restore rp rp_cpu selftest slow_candidates shared status stdout straight terminal thread timer tuningdb usage user_options wordlist $(EMU_OBJS_ALL)
|
OBJS_ALL := affinity autotune backend benchmark bitmap bitops combinator common convert cpt cpu_crc32 debugfile dictstat dispatch dynloader event ext_ADL ext_cuda ext_hip ext_nvapi ext_nvml ext_nvrtc ext_hiprtc ext_OpenCL ext_sysfs_amdgpu ext_sysfs_cpu ext_iokit ext_lzma filehandling folder hashcat hashes hlfmt hwmon induct interface keyboard_layout locking logfile loopback memory monitor mpsp outfile_check outfile pidfile potfile restore rp rp_cpu selftest slow_candidates shared status stdout straight terminal thread timer tuningdb usage user_options wordlist $(EMU_OBJS_ALL)
|
||||||
|
|
||||||
ifeq ($(UNAME),Darwin)
|
|
||||||
OBJS_ALL += ext_metal
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(ENABLE_BRAIN),1)
|
ifeq ($(ENABLE_BRAIN),1)
|
||||||
OBJS_ALL += brain
|
OBJS_ALL += brain
|
||||||
endif
|
endif
|
||||||
@ -419,6 +415,12 @@ NATIVE_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.o)
|
|||||||
LINUX_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.o)
|
LINUX_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.o)
|
||||||
WIN_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.o)
|
WIN_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.o)
|
||||||
|
|
||||||
|
ifeq ($(UNAME),Darwin)
|
||||||
|
OBJS_METAL := ext_metal
|
||||||
|
|
||||||
|
NATIVE_OBJS += $(foreach OBJ,$(OBJS_METAL),obj/$(OBJ).METAL.NATIVE.o)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_SYSTEM_LZMA),0)
|
ifeq ($(USE_SYSTEM_LZMA),0)
|
||||||
OBJS_LZMA := 7zCrc 7zCrcOpt 7zFile 7zStream Alloc Bra Bra86 BraIA64 CpuArch Delta LzmaDec Lzma2Dec Sha256 Sha256Opt Xz XzCrc64 XzCrc64Opt XzDec XzIn
|
OBJS_LZMA := 7zCrc 7zCrcOpt 7zFile 7zStream Alloc Bra Bra86 BraIA64 CpuArch Delta LzmaDec Lzma2Dec Sha256 Sha256Opt Xz XzCrc64 XzCrc64Opt XzDec XzIn
|
||||||
|
|
||||||
@ -618,8 +620,10 @@ uninstall:
|
|||||||
obj/%.NATIVE.o: src/%.c
|
obj/%.NATIVE.o: src/%.c
|
||||||
$(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $< -o $@ -fpic
|
$(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $< -o $@ -fpic
|
||||||
|
|
||||||
obj/%.NATIVE.o: src/%.m
|
ifeq ($(UNAME),Darwin)
|
||||||
|
obj/%.METAL.NATIVE.o: src/%.m
|
||||||
$(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $< -o $@ -fpic
|
$(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $< -o $@ -fpic
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_SYSTEM_LZMA),0)
|
ifeq ($(USE_SYSTEM_LZMA),0)
|
||||||
obj/%.LZMA.NATIVE.o: $(DEPS_LZMA_PATH)/%.c
|
obj/%.LZMA.NATIVE.o: $(DEPS_LZMA_PATH)/%.c
|
||||||
@ -712,7 +716,7 @@ modules: $(MODULES_LIB)
|
|||||||
## Cross Compilation (binary release version)
|
## Cross Compilation (binary release version)
|
||||||
##
|
##
|
||||||
|
|
||||||
ifeq ($(UNAME),Linux)
|
ifneq (,$(filter $(UNAME),Linux Darwin))
|
||||||
|
|
||||||
##
|
##
|
||||||
## Compiler paths
|
## Compiler paths
|
||||||
@ -758,10 +762,32 @@ LFLAGS_CROSS_WIN += -lws2_32
|
|||||||
LFLAGS_CROSS_WIN += -lpowrprof
|
LFLAGS_CROSS_WIN += -lpowrprof
|
||||||
LFLAGS_CROSS_WIN += -static -static-libgcc -static-libstdc++
|
LFLAGS_CROSS_WIN += -static -static-libgcc -static-libstdc++
|
||||||
|
|
||||||
|
CFLAGS_LZMA_WIN := $(CFLAGS_LZMA)
|
||||||
|
CFLAGS_UNRAR_WIN := $(CFLAGS_UNRAR)
|
||||||
|
|
||||||
|
ifeq ($(UNAME),Darwin)
|
||||||
|
CFLAGS_CROSS_WIN := $(filter-out -Wno-typedef-redefinition,$(CFLAGS_CROSS_WIN))
|
||||||
|
|
||||||
|
CFLAGS_LZMA_WIN += -Wno-misleading-indentation
|
||||||
|
|
||||||
|
CFLAGS_UNRAR_WIN += -Wno-misleading-indentation
|
||||||
|
CFLAGS_UNRAR_WIN += -Wno-class-memaccess
|
||||||
|
endif
|
||||||
|
|
||||||
##
|
##
|
||||||
## Targets
|
## Targets
|
||||||
##
|
##
|
||||||
|
|
||||||
|
ifeq ($(UNAME),Darwin)
|
||||||
|
.PHONY: binaries
|
||||||
|
binaries: win
|
||||||
|
|
||||||
|
.PHONY: host_win
|
||||||
|
host_win: hashcat.exe
|
||||||
|
|
||||||
|
.PHONY: win
|
||||||
|
win: host_win modules_win
|
||||||
|
else
|
||||||
.PHONY: binaries
|
.PHONY: binaries
|
||||||
binaries: linux win
|
binaries: linux win
|
||||||
|
|
||||||
@ -772,6 +798,7 @@ host_win: hashcat.exe
|
|||||||
.PHONY: linux win
|
.PHONY: linux win
|
||||||
linux: host_linux modules_linux
|
linux: host_linux modules_linux
|
||||||
win: host_win modules_win
|
win: host_win modules_win
|
||||||
|
endif
|
||||||
|
|
||||||
##
|
##
|
||||||
## cross compiled modules
|
## cross compiled modules
|
||||||
@ -802,10 +829,10 @@ obj/%.WIN.o: src/%.c
|
|||||||
|
|
||||||
ifeq ($(USE_SYSTEM_LZMA),0)
|
ifeq ($(USE_SYSTEM_LZMA),0)
|
||||||
obj/%.LZMA.LINUX.o: $(DEPS_LZMA_PATH)/%.c
|
obj/%.LZMA.LINUX.o: $(DEPS_LZMA_PATH)/%.c
|
||||||
$(CC_LINUX) $(CCFLAGS) $(CFLAGS_CROSS_LINUX) $(CFLAGS_LZMA) -c -o $@ $<
|
$(CC_LINUX) $(CCFLAGS) $(CFLAGS_CROSS_LINUX) $(CFLAGS_LZMA) -c -o $@ $<
|
||||||
|
|
||||||
obj/%.LZMA.WIN.o: $(DEPS_LZMA_PATH)/%.c
|
obj/%.LZMA.WIN.o: $(DEPS_LZMA_PATH)/%.c
|
||||||
$(CC_WIN) $(CCFLAGS) $(CFLAGS_CROSS_WIN) $(CFLAGS_LZMA) -c -o $@ $<
|
$(CC_WIN) $(CCFLAGS) $(CFLAGS_CROSS_WIN) $(CFLAGS_LZMA_WIN) -c -o $@ $<
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_SYSTEM_ZLIB),0)
|
ifeq ($(USE_SYSTEM_ZLIB),0)
|
||||||
@ -829,10 +856,10 @@ endif
|
|||||||
ifeq ($(ENABLE_UNRAR),1)
|
ifeq ($(ENABLE_UNRAR),1)
|
||||||
ifeq ($(USE_SYSTEM_UNRAR),0)
|
ifeq ($(USE_SYSTEM_UNRAR),0)
|
||||||
obj/%.UNRAR.LINUX.o: $(DEPS_UNRAR_PATH)/%.cpp
|
obj/%.UNRAR.LINUX.o: $(DEPS_UNRAR_PATH)/%.cpp
|
||||||
$(CXX_LINUX) $(CXXFLAGS) $(CFLAGS_CROSS_LINUX) $(CFLAGS_UNRAR) -c -o $@ $<
|
$(CXX_LINUX) $(CXXFLAGS) $(CFLAGS_CROSS_LINUX) $(CFLAGS_UNRAR) -c -o $@ $<
|
||||||
|
|
||||||
obj/%.UNRAR.WIN.o: $(DEPS_UNRAR_PATH)/%.cpp
|
obj/%.UNRAR.WIN.o: $(DEPS_UNRAR_PATH)/%.cpp
|
||||||
$(CXX_WIN) $(CXXFLAGS) $(CFLAGS_CROSS_WIN) $(CFLAGS_UNRAR) -c -o $@ $<
|
$(CXX_WIN) $(CXXFLAGS) $(CFLAGS_CROSS_WIN) $(CFLAGS_UNRAR_WIN) -c -o $@ $<
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user