mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 04:50:12 -07:00
make miscchecks
This commit is contained in:
parent
6466ce4e6d
commit
b910d7ea94
4 changed files with 34 additions and 34 deletions
|
@ -519,14 +519,14 @@ if (LZ4_FOUND)
|
||||||
endif (LZ4_FOUND)
|
endif (LZ4_FOUND)
|
||||||
|
|
||||||
if (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
if (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
||||||
set(ADDITIONAL_DIRS ${GD_INCLUDE_DIRS} ${ADDITIONAL_DIRS})
|
set(ADDITIONAL_DIRS ${GD_INCLUDE_DIRS} ${ADDITIONAL_DIRS})
|
||||||
set(ADDITIONAL_LNK ${GD_LIBRARIES} ${ADDITIONAL_LNK})
|
set(ADDITIONAL_LNK ${GD_LIBRARIES} ${ADDITIONAL_LNK})
|
||||||
set(ADDITIONAL_LNKDIRS ${GD_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
|
set(ADDITIONAL_LNKDIRS ${GD_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
|
||||||
set(TARGET_SOURCES
|
set(TARGET_SOURCES
|
||||||
${PM3_ROOT}/client/src/imgutils.c
|
${PM3_ROOT}/client/src/imgutils.c
|
||||||
${PM3_ROOT}/client/src/cmdhfwaveshare.c
|
${PM3_ROOT}/client/src/cmdhfwaveshare.c
|
||||||
${TARGET_SOURCES})
|
${TARGET_SOURCES})
|
||||||
add_definitions("-DHAVE_GD")
|
add_definitions("-DHAVE_GD")
|
||||||
endif (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
endif (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
||||||
|
|
||||||
if (WHEREAMI_FOUND)
|
if (WHEREAMI_FOUND)
|
||||||
|
|
|
@ -518,14 +518,14 @@ if (LZ4_FOUND)
|
||||||
endif (LZ4_FOUND)
|
endif (LZ4_FOUND)
|
||||||
|
|
||||||
if (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
if (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
||||||
set(ADDITIONAL_DIRS ${GD_INCLUDE_DIRS} ${ADDITIONAL_DIRS})
|
set(ADDITIONAL_DIRS ${GD_INCLUDE_DIRS} ${ADDITIONAL_DIRS})
|
||||||
set(ADDITIONAL_LNK ${GD_LIBRARIES} ${ADDITIONAL_LNK})
|
set(ADDITIONAL_LNK ${GD_LIBRARIES} ${ADDITIONAL_LNK})
|
||||||
set(ADDITIONAL_LNKDIRS ${GD_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
|
set(ADDITIONAL_LNKDIRS ${GD_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS})
|
||||||
set(TARGET_SOURCES
|
set(TARGET_SOURCES
|
||||||
${PM3_ROOT}/client/src/imgutils.c
|
${PM3_ROOT}/client/src/imgutils.c
|
||||||
${PM3_ROOT}/client/src/cmdhfwaveshare.c
|
${PM3_ROOT}/client/src/cmdhfwaveshare.c
|
||||||
${TARGET_SOURCES})
|
${TARGET_SOURCES})
|
||||||
add_definitions("-DHAVE_GD")
|
add_definitions("-DHAVE_GD")
|
||||||
endif (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
endif (NOT SKIPGD EQUAL 1 AND GD_FOUND)
|
||||||
|
|
||||||
if (WHEREAMI_FOUND)
|
if (WHEREAMI_FOUND)
|
||||||
|
|
|
@ -3737,23 +3737,23 @@ static int CmdCryptography(const char *Cmd) {
|
||||||
if (type & 0x4) { // AES or DES?
|
if (type & 0x4) { // AES or DES?
|
||||||
if (type & 0x02) { // If we will calculate a MAC
|
if (type & 0x02) { // If we will calculate a MAC
|
||||||
/*PrintAndLogEx(INFO, "Called FeliCa MAC");
|
/*PrintAndLogEx(INFO, "Called FeliCa MAC");
|
||||||
// For DES all I know useful is the felica and fudan MAC algorithm.This is just des-cbc, but felica needs it in its way.
|
// For DES all I know useful is the felica and fudan MAC algorithm.This is just des-cbc, but felica needs it in its way.
|
||||||
for (int i = 0; i < datilen; i+=8){ // For all 8 byte sequences
|
for (int i = 0; i < datilen; i+=8){ // For all 8 byte sequences
|
||||||
reverser(dati, &dati[i], 8, i);
|
reverser(dati, &dati[i], 8, i);
|
||||||
if (i){ // If IV is processed
|
if (i){ // If IV is processed
|
||||||
for (int n = 0; n < 8; ++n){
|
for (int n = 0; n < 8; ++n){
|
||||||
dato[n] ^= dati[i+n]; // XOR with Dx
|
dato[n] ^= dati[i+n]; // XOR with Dx
|
||||||
}
|
}
|
||||||
des_encrypt_ecb(dato, dato, 8, key); // Cipher itself
|
des_encrypt_ecb(dato, dato, 8, key); // Cipher itself
|
||||||
} else { // If we didn't start with IV
|
} else { // If we didn't start with IV
|
||||||
for (int n = 0; n < 8; ++n){
|
for (int n = 0; n < 8; ++n){
|
||||||
dato[n] = iv[n]; // Feed data into output
|
dato[n] = iv[n]; // Feed data into output
|
||||||
dato[n] ^= dati[i+n]; // XOR with D1
|
dato[n] ^= dati[i+n]; // XOR with D1
|
||||||
}
|
}
|
||||||
des_encrypt_ecb(dato, dato, 8, key); // Cipher itself
|
des_encrypt_ecb(dato, dato, 8, key); // Cipher itself
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PrintAndLogEx(SUCCESS, "MAC: %s", sprint_hex_inrow(dato, 8));*/
|
PrintAndLogEx(SUCCESS, "MAC: %s", sprint_hex_inrow(dato, 8));*/
|
||||||
PrintAndLogEx(INFO, "Not implemented yet - feel free to contribute!");
|
PrintAndLogEx(INFO, "Not implemented yet - feel free to contribute!");
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1364,7 +1364,7 @@ static int CmdPCSC(const char *Cmd) {
|
||||||
}
|
}
|
||||||
if (cl_proto == ISODEP_NFCB) {
|
if (cl_proto == ISODEP_NFCB) {
|
||||||
|
|
||||||
if (exchange_14b_apdu(cmdbuf + 2, apduLen, !field_activated, true, apduRes, sizeof(apduRes), &apduResLen, 0)) {
|
if (exchange_14b_apdu(cmdbuf + 2, apduLen, !field_activated, true, apduRes, sizeof(apduRes), &apduResLen, 0)) {
|
||||||
have_card = false;
|
have_card = false;
|
||||||
mbedtls_net_close(&netCtx);
|
mbedtls_net_close(&netCtx);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue