Win32x Version
pedroalbanese opened this issue · 4 comments
Hello; Would it be possible to create the Windows 32bit binary? It could be for Cygwin or CoreUtils. I tried to compile the source code with gcc, but was unsuccessful. I believe I am not competent to do so.
Can you help me run on Windows7? Compiling or teaching me how to do it?
Thankful.
I have not tried the following as I don't have a 32bit Windows system available, but I guess you could:
- Install Cygwin
- In Cygwin, install the git, gcc, autoconf, automake, libtool and libssl-devel packages
- Get the code (unless you already have it) with
git clone https://github.com/glv2/bruteforce-salted-openssl
- Go to the directory containing the code and compile it with the commands:
./autogen.sh
,./configure
andmake
. You should now have a programm calledbruteforce-salted-openssl.exe
.
If the compilation doesn't work for some reason and you don't know what's wrong, you could also try to compile with the command:
gcc -O2 -o bruteforce-salted-openssl.exe src/bruteforce-salted-openssl.c -lcrypto -lpthread -lm
Thank You very much!!!
I can't compile with MinGW32 nor make command, I'm getting same error:
$ i686-w64-mingw32-gcc -O2 -o bruteforce-salted-openssl.exe src/bruteforce-salted-openssl.c -lcrypto -lpthread -lm
src/bruteforce-salted-openssl.c: In function ‘decryption_func’:
src/bruteforce-salted-openssl.c:470:21: error: ‘SIGUSR1’ undeclared (first use in this function)
470 | handle_signal(SIGUSR1); /* Print some stats */
| ^~~~~~~
src/bruteforce-salted-openssl.c:470:21: note: each undeclared identifier is reported only once for each function it appears in
src/bruteforce-salted-openssl.c: In function ‘main’:
src/bruteforce-salted-openssl.c:1170:10: error: ‘SIGUSR1’ undeclared (first use in this function)
1170 | signal(SIGUSR1, handle_signal);
| ^~~~~~~
src/bruteforce-salted-openssl.c:1173:12: error: ‘SIGALRM’ undeclared (first use in this function); did you mean ‘SIGABRT’?
1173 | signal(SIGALRM, handle_signal);
| ^~~~~~~
| SIGABRT
src/bruteforce-salted-openssl.c:1174:19: error: invalid use of undefined type ‘struct itimerval’
1174 | progress_timer.it_value.tv_sec = status_interval;
| ^
src/bruteforce-salted-openssl.c:1175:19: error: invalid use of undefined type ‘struct itimerval’
1175 | progress_timer.it_value.tv_usec = 0;
| ^
src/bruteforce-salted-openssl.c:1176:19: error: invalid use of undefined type ‘struct itimerval’
1176 | progress_timer.it_interval.tv_sec = status_interval;
| ^
src/bruteforce-salted-openssl.c:1177:19: error: invalid use of undefined type ‘struct itimerval’
1177 | progress_timer.it_interval.tv_usec = 0;
| ^
src/bruteforce-salted-openssl.c:1178:5: warning: implicit declaration of function ‘setitimer’ [-Wimplicit-function-declaration]
1178 | setitimer(ITIMER_REAL, &progress_timer, NULL);
| ^~~~~~~~~
src/bruteforce-salted-openssl.c:1178:15: error: ‘ITIMER_REAL’ undeclared (first use in this function)
1178 | setitimer(ITIMER_REAL, &progress_timer, NULL);
| ^~~~~~~~~~~
src/bruteforce-salted-openssl.c:1198:12: error: ‘SIGVTALRM’ undeclared (first use in this function); did you mean ‘SIGTERM’?
1198 | signal(SIGVTALRM, save_state);
| ^~~~~~~~~
| SIGTERM
src/bruteforce-salted-openssl.c:1199:16: error: invalid use of undefined type ‘struct itimerval’
1199 | state_timer.it_value.tv_sec = 60 * nb_threads;
| ^
src/bruteforce-salted-openssl.c:1200:16: error: invalid use of undefined type ‘struct itimerval’
1200 | state_timer.it_value.tv_usec = 0;
| ^
src/bruteforce-salted-openssl.c:1201:16: error: invalid use of undefined type ‘struct itimerval’
1201 | state_timer.it_interval.tv_sec = 60 * nb_threads;
| ^
src/bruteforce-salted-openssl.c:1202:16: error: invalid use of undefined type ‘struct itimerval’
1202 | state_timer.it_interval.tv_usec = 0;
| ^
src/bruteforce-salted-openssl.c:1203:15: error: ‘ITIMER_VIRTUAL’ undeclared (first use in this function)
1203 | setitimer(ITIMER_VIRTUAL, &state_timer, NULL);
| ^~~~~~~~~~~~~~
src/bruteforce-salted-openssl.c: At top level:
src/bruteforce-salted-openssl.c:87:18: error: storage size of ‘progress_timer’ isn’t known
87 | struct itimerval progress_timer, state_timer;
| ^~~~~~~~~~~~~~
src/bruteforce-salted-openssl.c:87:34: error: storage size of ‘state_timer’ isn’t known
87 | struct itimerval progress_timer, state_timer;
| ^~~~~~~~~~~
I compiled by cygwin, but the -w and -b functions don't work .. i would like to try like MinGW. Thx
Compiling directly with MinGW probably doesn't work because MinGW targets the native Windows API whereas bruteforce-salted-openssl expects the POSIX API. This is why you must compile it using Cygwin (it should also work with MSYS2 instead of Cygwin).
What errors did you get with the -b and -w options?