juuso / keychaindump

A proof-of-concept tool for reading OS X keychain passwords
508 stars 129 forks source link

Not working in macOS Big Sur. 7 errors in keychaindump.c #14

Open abhishek-bodapati opened 3 years ago

abhishek-bodapati commented 3 years ago
keychaindump.c:209:27: error: expected expression
    DES_set_key((C_Block *)ckey1, &ks1);
                          ^
keychaindump.c:209:18: error: use of undeclared identifier 'C_Block'; did you mean 'clock'?
    DES_set_key((C_Block *)ckey1, &ks1);
                 ^~~~~~~
                 clock
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:109:9: note: 'clock' declared here
clock_t clock(void) __DARWIN_ALIAS(clock);
        ^
keychaindump.c:210:27: error: expected expression
    DES_set_key((C_Block *)ckey2, &ks2);
                          ^
keychaindump.c:210:18: error: use of undeclared identifier 'C_Block'; did you mean 'clock'?
    DES_set_key((C_Block *)ckey2, &ks2);
                 ^~~~~~~
                 clock
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:109:9: note: 'clock' declared here
clock_t clock(void) __DARWIN_ALIAS(clock);
        ^
keychaindump.c:211:27: error: expected expression
    DES_set_key((C_Block *)ckey3, &ks3);
                          ^
keychaindump.c:211:18: error: use of undeclared identifier 'C_Block'; did you mean 'clock'?
    DES_set_key((C_Block *)ckey3, &ks3);
                 ^~~~~~~
                 clock
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h:109:9: note: 'clock' declared here
clock_t clock(void) __DARWIN_ALIAS(clock);
        ^
keychaindump.c:449:9: error: implicit declaration of function 'geteuid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (geteuid()) {
        ^
keychaindump.c:449:9: note: did you mean 'getauid'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/bsm/audit.h:353:9: note: 'getauid' declared here
int     getauid(au_id_t *);
        ^
keychaindump.c:490:21: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if (key_len = dump_wrapping_key(key, g_master_candidates[i], buffer, sz)) {
            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
keychaindump.c:490:21: note: place parentheses around the assignment to silence this warning
        if (key_len = dump_wrapping_key(key, g_master_candidates[i], buffer, sz)) {
                    ^
            (                                                                   )
keychaindump.c:490:21: note: use '==' to turn this assignment into an equality comparison
        if (key_len = dump_wrapping_key(key, g_master_candidates[i], buffer, sz)) {
                    ^
                    ==
1 warning and 7 errors generated.
xorcare commented 3 years ago

A similar problem:

xor at ant in /var/folders/g4/kq_rtk_j64z3xhpy0q8pftl40000gn/T/tmp.hGNY3u47/keychaindump on  master 
❯ gcc keychaindump.c -o keychaindump -lcrypto
keychaindump.c:12:10: fatal error: 'openssl/des.h' file not found
#include <openssl/des.h>
         ^~~~~~~~~~~~~~~
1 error generated.