Closed wuyasec closed 4 years ago
Please provide details about OS, your build env, and you are using the latest source?
win10pro 1909 x64 ;;Same operation as official video;;Resources are just downloaded
Good, And your build env? are you using WSL or Proxspace? If proxspace with version and is it 32 or 64b?
Proxspace;run runme64.bat
If you modify
https://github.com/RfidResearchGroup/proxmark3/blob/master/tools/mf_nonce_brute/mf_nonce_brute.c#L3
-#if defined(_WIN32)
+#if defined(_WIN32) || defined(__WIN32__)
# define _USE_32BIT_TIME_T 1
#endif
@@ -350,7 +350,7 @@ int main(int argc, char *argv[]) {
//calc (parity XOR corresponding nonce bit encoded with the same keystream bit)
uint16_t xored = xored_bits(nt_par, nt_enc, ar_par, ar_enc, at_par, at_enc);
-#ifndef __WIN32
+#if !defined(_WIN32) || !defined(__WIN32__)
thread_count = sysconf(_SC_NPROCESSORS_CONF);
if (thread_count < 2)
thread_count = 2;
make changes and try compiling
Same error;corecrt.h:121-145 `#ifndef _TIME32_T_DEFINED
typedef long __time32_t;
__MINGW_EXTENSION typedef int64 time64_t;
typedef __time32_t time_t;
typedef __time64_t time_t;
Try this one,
#if !defined(_WIN64)
#if defined(_WIN32) || defined(__WIN32__)
# define _USE_32BIT_TIME_T 1
#endif
#endif
[*] MAKE mf_nonce_brute/all [-] CC mf_nonce_brute.c [-] CC ../../common/crapto1/crypto1.c [-] CC ../../common/crapto1/crapto1.c [-] CC ../../common/bucketsort.c [-] CC iso14443crc.c [-] CC sleep.c [=] LD mf_nonce_brute pm3 ~$
At last:[=] LD mf_nonce_brute,Whether the completion of the compilation task
error: [-] CC mf_nonce_brute.c In file included from D:/ProxSpace/msys2/mingw64/x86_64-w64-mingw32/include/crtdefs.h:10, from D:/ProxSpace/msys2/mingw64/x86_64-w64-mingw32/include/inttypes.h:11, from mf_nonce_brute.c:7: D:/ProxSpace/msys2/mingw64/x86_64-w64-mingw32/include/corecrt.h:133:2: error: #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64 133 | #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64 | ^~~~~ make[1]: [../../Makefile.host:75: obj/mf_nonce_brute.o] Error 1 make: [Makefile:89: mf_nonce_brute/all] Error 2