[GH-ISSUE #2337] rar2john segmentation fault #1564

Closed
opened 2026-10-15 04:20:16 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @efirvida on GitHub (Nov 18, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2337

Originally assigned to: @magnumripper on GitHub.

Hi I'm trying to get the hash from this rar file but always give me a Segmentation Fault error and of course no hash :( any ideas?

the file link is: https://mega.nz/#!S1ojgTaT!pbFgdAKQzfcuktB4hhMnvvv5dunrNssIcIGE0ULg5y0

Originally created by @efirvida on GitHub (Nov 18, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2337 Originally assigned to: @magnumripper on GitHub. Hi I'm trying to get the hash from this rar file but always give me a `Segmentation Fault` error and of course no hash :( any ideas? the file link is: https://mega.nz/#!S1ojgTaT!pbFgdAKQzfcuktB4hhMnvvv5dunrNssIcIGE0ULg5y0
bsakaguchi 2026-10-15 04:20:16 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@magnumripper commented on GitHub (Nov 20, 2016):

Yeah that's a silly bug. I'm on it.

<!-- gh-comment-id:261813349 --> @magnumripper commented on GitHub (Nov 20, 2016): Yeah that's a silly bug. I'm on it.
Author
Owner

@efirvida commented on GitHub (Nov 21, 2016):

Thanks for your quick answer. but I got this error now when I'm trying to build it.

mpicc -DAC_BUILT -march=native -msse2 -c -g -O2 -I/usr/local/include -DARCH_LITTLE_ENDIAN=1   -Wall -Wdeclaration-after-statement -fomit-frame-pointer --param allow-store-data-races=0 -Wno-deprecated-declarations -Wno-format-extra-args -D_GNU_SOURCE    -fopenmp -DHAVE_MPI -pthread  -funroll-loops rar2john.c -o rar2john.o
rar2john.c: In function ‘process_file’:
rar2john.c:182:40: error: macro "mem_calloc" passed 2 arguments, but takes just 1
  gecos = mem_calloc(1, LINE_BUFFER_SIZE);
                                        ^
rar2john.c:182:10: error: ‘mem_calloc’ undeclared (first use in this function)
  gecos = mem_calloc(1, LINE_BUFFER_SIZE);
          ^
rar2john.c:182:10: note: each undeclared identifier is reported only once for each function it appears in
rar2john.c:520:72: error: macro "mem_calloc" passed 2 arguments, but takes just 1
   best = mem_calloc(1, 2 * LINE_BUFFER_SIZE + 2 * file_header_pack_size);
                                                                        ^
rar2john.c: In function ‘ProcessExtra50’:
rar2john.c:704:21: error: too many arguments to function ‘base64_convert_cp’
                     SIZE_SALT50, base64_convert_cp(rar5_salt,e_b64_raw,SIZE_SALT50,Hex1,e_b64_hex,sizeof(Hex1),0, 0),
                     ^
In file included from rar2john.c:63:0:
base64_convert.h:54:7: note: declared here
 char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags);
       ^
rar2john.c:705:21: error: too many arguments to function ‘base64_convert_cp’
                     Lg2Count, base64_convert_cp(InitV,e_b64_raw,SIZE_INITV,Hex2,e_b64_hex,sizeof(Hex2),0, 0),
                     ^
In file included from rar2john.c:63:0:
base64_convert.h:54:7: note: declared here
 char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags);
       ^
rar2john.c:706:21: error: too many arguments to function ‘base64_convert_cp’
                     SIZE_PSWCHECK, base64_convert_cp(PswCheck,e_b64_raw,SIZE_PSWCHECK,Hex3,e_b64_hex,sizeof(Hex3),0, 0));
                     ^
In file included from rar2john.c:63:0:
base64_convert.h:54:7: note: declared here
 char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags);
       ^
rar2john.c: In function ‘read_rar5_header’:
rar2john.c:735:13: error: too many arguments to function ‘base64_convert_cp’
             SIZE_SALT50, base64_convert_cp(rar5_salt,e_b64_raw,SIZE_SALT50,Hex1,e_b64_hex,sizeof(Hex1),0, 0),
             ^
In file included from rar2john.c:63:0:
base64_convert.h:54:7: note: declared here
 char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags);
       ^
rar2john.c:736:13: error: too many arguments to function ‘base64_convert_cp’
             rar5_interations, base64_convert_cp(HeadersInitV,e_b64_raw,SIZE_INITV,Hex2,e_b64_hex,sizeof(Hex2),0, 0),
             ^
In file included from rar2john.c:63:0:
base64_convert.h:54:7: note: declared here
 char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags);
       ^
rar2john.c:737:13: error: too many arguments to function ‘base64_convert_cp’
             SIZE_PSWCHECK, base64_convert_cp(PswCheck,e_b64_raw,SIZE_PSWCHECK,Hex3,e_b64_hex,sizeof(Hex3),0, 0));
             ^
In file included from rar2john.c:63:0:
base64_convert.h:54:7: note: declared here
 char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags);
       ^
Makefile:520: recipe for target 'rar2john.o' failed
make[1]: *** [rar2john.o] Error 1
make[1]: Leaving directory '/home/CLUSTER/uclv.yaidelm/john/src'
Makefile:185: recipe for target 'default' failed
make: *** [default] Error 2

I just replace the old rar2jhon.c file with the new one. do I have to download all the jtr, to make it works?

<!-- gh-comment-id:261941091 --> @efirvida commented on GitHub (Nov 21, 2016): Thanks for your quick answer. but I got this error now when I'm trying to build it. ``` mpicc -DAC_BUILT -march=native -msse2 -c -g -O2 -I/usr/local/include -DARCH_LITTLE_ENDIAN=1 -Wall -Wdeclaration-after-statement -fomit-frame-pointer --param allow-store-data-races=0 -Wno-deprecated-declarations -Wno-format-extra-args -D_GNU_SOURCE -fopenmp -DHAVE_MPI -pthread -funroll-loops rar2john.c -o rar2john.o rar2john.c: In function ‘process_file’: rar2john.c:182:40: error: macro "mem_calloc" passed 2 arguments, but takes just 1 gecos = mem_calloc(1, LINE_BUFFER_SIZE); ^ rar2john.c:182:10: error: ‘mem_calloc’ undeclared (first use in this function) gecos = mem_calloc(1, LINE_BUFFER_SIZE); ^ rar2john.c:182:10: note: each undeclared identifier is reported only once for each function it appears in rar2john.c:520:72: error: macro "mem_calloc" passed 2 arguments, but takes just 1 best = mem_calloc(1, 2 * LINE_BUFFER_SIZE + 2 * file_header_pack_size); ^ rar2john.c: In function ‘ProcessExtra50’: rar2john.c:704:21: error: too many arguments to function ‘base64_convert_cp’ SIZE_SALT50, base64_convert_cp(rar5_salt,e_b64_raw,SIZE_SALT50,Hex1,e_b64_hex,sizeof(Hex1),0, 0), ^ In file included from rar2john.c:63:0: base64_convert.h:54:7: note: declared here char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags); ^ rar2john.c:705:21: error: too many arguments to function ‘base64_convert_cp’ Lg2Count, base64_convert_cp(InitV,e_b64_raw,SIZE_INITV,Hex2,e_b64_hex,sizeof(Hex2),0, 0), ^ In file included from rar2john.c:63:0: base64_convert.h:54:7: note: declared here char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags); ^ rar2john.c:706:21: error: too many arguments to function ‘base64_convert_cp’ SIZE_PSWCHECK, base64_convert_cp(PswCheck,e_b64_raw,SIZE_PSWCHECK,Hex3,e_b64_hex,sizeof(Hex3),0, 0)); ^ In file included from rar2john.c:63:0: base64_convert.h:54:7: note: declared here char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags); ^ rar2john.c: In function ‘read_rar5_header’: rar2john.c:735:13: error: too many arguments to function ‘base64_convert_cp’ SIZE_SALT50, base64_convert_cp(rar5_salt,e_b64_raw,SIZE_SALT50,Hex1,e_b64_hex,sizeof(Hex1),0, 0), ^ In file included from rar2john.c:63:0: base64_convert.h:54:7: note: declared here char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags); ^ rar2john.c:736:13: error: too many arguments to function ‘base64_convert_cp’ rar5_interations, base64_convert_cp(HeadersInitV,e_b64_raw,SIZE_INITV,Hex2,e_b64_hex,sizeof(Hex2),0, 0), ^ In file included from rar2john.c:63:0: base64_convert.h:54:7: note: declared here char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags); ^ rar2john.c:737:13: error: too many arguments to function ‘base64_convert_cp’ SIZE_PSWCHECK, base64_convert_cp(PswCheck,e_b64_raw,SIZE_PSWCHECK,Hex3,e_b64_hex,sizeof(Hex3),0, 0)); ^ In file included from rar2john.c:63:0: base64_convert.h:54:7: note: declared here char *base64_convert_cp(const void *from, b64_convert_type from_t, int from_len, void *to, b64_convert_type to_t, int to_len, unsigned flags); ^ Makefile:520: recipe for target 'rar2john.o' failed make[1]: *** [rar2john.o] Error 1 make[1]: Leaving directory '/home/CLUSTER/uclv.yaidelm/john/src' Makefile:185: recipe for target 'default' failed make: *** [default] Error 2 ``` I just replace the old rar2jhon.c file with the new one. do I have to download all the jtr, to make it works?
Author
Owner

@magnumripper commented on GitHub (Nov 21, 2016):

Yeah, you can't mix old and new code. Clone the lot, it's well worth it.

<!-- gh-comment-id:261951570 --> @magnumripper commented on GitHub (Nov 21, 2016): Yeah, you can't mix old and new code. Clone the lot, it's well worth it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1564
No description provided.