NAME=winbuild; docker run --rm -it --name ${NAME} --hostname ${NAME} -v /tmp/data:/tmp/data ubuntu bash
apt update -y
apt install -y build-essential git make mingw-w64 win-iconv-mingw-w64-dev
cd /tmp/data
git clone https://github.com/hashcat/hashcat.git
cd hashcat
cat << "_EOF" > /tmp/patch
diff --git a/src/Makefile b/src/Makefile
index f378c0fe..b1b18723 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -27,6 +27,7 @@ UNAME := $(patsubst CYGWIN_NT-%,CYGWIN,$(UNAME))
UNAME := $(patsubst MSYS_NT-%,MSYS2,$(UNAME))
UNAME := $(patsubst MINGW32_NT-%,MSYS2,$(UNAME))
UNAME := $(patsubst MINGW64_NT-%,MSYS2,$(UNAME))
+UNAME := MSYS2
ifeq (,$(filter $(UNAME),Linux FreeBSD Darwin CYGWIN MSYS2))
$(error "! Your Operating System ($(UNAME)) is not supported by this Makefile")
@@ -56,7 +57,7 @@ MODULE_INTERFACE_VERSION := 520
## Native compiler paths
##
-CC := gcc
+CC := x86_64-w64-mingw32-gcc
AR := ar
FIND := find
INSTALL := install
_EOF
make -j4
cp /usr/x86_64-w64-mingw32/bin/iconv.dll .