-
-
Win11 hashcat 编译
-
发表于:
2024-1-20 10:53
3527
-
从git项目的【README.md】->【BUILD.md】->【BUILD_MSYS2.md】(如下图)
编译测试平台是【Win11 的 MSYS2 的 MINGW64】,编译步骤也简单,一准备(包),二编译(make),三运行。
如图,起说明文档也标注了在 win10 x64 测试通过
make过程有以下错误
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/combined.NATIVE.a(isnt.UNRAR.NATIVE.o):isnt.cpp:(.text+0x148): undefined reference to `__imp_CoCreateInstance'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/combined.NATIVE.a(isnt.UNRAR.NATIVE.o):isnt.cpp:(.text+0x15a): undefined reference to `__imp_SysAllocString'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/combined.NATIVE.a(isnt.UNRAR.NATIVE.o):isnt.cpp:(.text+0x1e5): undefined reference to `__imp_CoSetProxyBlanket'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/combined.NATIVE.a(isnt.UNRAR.NATIVE.o):isnt.cpp:(.text+0x267): undefined reference to `__imp_VariantClear'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/combined.NATIVE.a(isnt.UNRAR.NATIVE.o):isnt.cpp:(.rdata$.refptr.CLSID_WbemLocator[.refptr.CLSID_WbemLocator]+0x0): undefined reference to `CLSID_WbemLocator'
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/combined.NATIVE.a(isnt.UNRAR.NATIVE.o):isnt.cpp:(.rdata$.refptr.IID_IWbemLocator[.refptr.IID_IWbemLocator]+0x0): undefined reference to `IID_IWbemLocator'
collect2.exe: error: ld returned 1 exit status
gcc -std=gnu99 -W -Wall -Wextra -O2 -pipe -Iinclude/ -IOpenCL/ -Ideps/LZMA-SDK/C -Ideps/zlib -Ideps/zlib/contrib -Ideps/OpenCL-Headers -DWITH_BRAIN -Ideps/xxHash -DWITH_CUBIN -Ideps/unrar -DWITH_HWMON src/modules/module_24700.c obj/combined.NATIVE.a -o modules/module_24700.dll -s -lstdc++ -Wl,--dynamicbase -Wl,--nxcompat -lpsapi -liconv -lws2_32 -lpowrprof -shared -fPIC -D MODULE_INTERFACE_VERSION_CURRENT=700
make: *** [src/Makefile:709: modules/module_23800.dll] Error 1
这里直接给解决方法之一:即把/deps/unrar/isnt.cpp的WMI_IsWindow10的函数体屏蔽,直接返回false,这样就只在win11跑不会有问题。
其他两个方向(未尝试):(1)修改各种配置让其识别ole2等库,(2)修改代码,通过动态方式加载几个函数,并以函数指针方式调用试下判别win10功能
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课