fix: more warnings.
This commit is contained in:
@@ -766,7 +766,7 @@ int CmdHFiClassDecrypt(const char *Cmd) {
|
|||||||
hdr->csn[4],hdr->csn[5],hdr->csn[6],hdr->csn[7]);
|
hdr->csn[4],hdr->csn[5],hdr->csn[6],hdr->csn[7]);
|
||||||
|
|
||||||
// tripledes
|
// tripledes
|
||||||
mbedtls_des3_context ctx = { 0 };
|
mbedtls_des3_context ctx;
|
||||||
mbedtls_des3_set2key_dec( &ctx, key);
|
mbedtls_des3_set2key_dec( &ctx, key);
|
||||||
|
|
||||||
uint8_t enc_dump[8] = {0};
|
uint8_t enc_dump[8] = {0};
|
||||||
@@ -797,7 +797,7 @@ static int iClassEncryptBlkData(uint8_t *blkData) {
|
|||||||
PrintAndLogEx(SUCCESS, "decryption file found");
|
PrintAndLogEx(SUCCESS, "decryption file found");
|
||||||
uint8_t encryptedData[16];
|
uint8_t encryptedData[16];
|
||||||
uint8_t *encrypted = encryptedData;
|
uint8_t *encrypted = encryptedData;
|
||||||
mbedtls_des3_context ctx = { 0 };
|
mbedtls_des3_context ctx;
|
||||||
mbedtls_des3_set2key_enc( &ctx, key);
|
mbedtls_des3_set2key_enc( &ctx, key);
|
||||||
|
|
||||||
mbedtls_des3_crypt_ecb(&ctx, blkData,encrypted);
|
mbedtls_des3_crypt_ecb(&ctx, blkData,encrypted);
|
||||||
|
|||||||
@@ -2392,10 +2392,10 @@ int CmdHF14AMfucSetUid(const char *Cmd){
|
|||||||
int CmdHF14AMfuGenDiverseKeys(const char *Cmd){
|
int CmdHF14AMfuGenDiverseKeys(const char *Cmd){
|
||||||
|
|
||||||
uint8_t uid[4];
|
uint8_t uid[4];
|
||||||
char cmdp = param_getchar(Cmd, 0);
|
char cmdp = tolower(param_getchar(Cmd, 0));
|
||||||
if (strlen(Cmd) == 0 || cmdp == 'h' || cmdp == 'H') return usage_hf_mfu_gendiverse();
|
if (strlen(Cmd) == 0 || cmdp == 'h') return usage_hf_mfu_gendiverse();
|
||||||
|
|
||||||
if ( cmdp == 'r' || cmdp == 'R') {
|
if ( cmdp == 'r' ) {
|
||||||
// read uid from tag
|
// read uid from tag
|
||||||
UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT | ISO14A_NO_RATS, 0, 0}};
|
UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT | ISO14A_NO_RATS, 0, 0}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
@@ -2441,7 +2441,7 @@ int CmdHF14AMfuGenDiverseKeys(const char *Cmd){
|
|||||||
mix[6] = block ^ uid[2];
|
mix[6] = block ^ uid[2];
|
||||||
mix[7] = uid[3];
|
mix[7] = uid[3];
|
||||||
|
|
||||||
mbedtls_des3_context ctx = { 0x00 };
|
mbedtls_des3_context ctx;
|
||||||
mbedtls_des3_set2key_enc(&ctx, masterkey);
|
mbedtls_des3_set2key_enc(&ctx, masterkey);
|
||||||
|
|
||||||
mbedtls_des3_crypt_cbc(&ctx // des3_context
|
mbedtls_des3_crypt_cbc(&ctx // des3_context
|
||||||
@@ -2501,11 +2501,11 @@ int CmdHF14AMfuGenDiverseKeys(const char *Cmd){
|
|||||||
int CmdHF14AMfuPwdGen(const char *Cmd){
|
int CmdHF14AMfuPwdGen(const char *Cmd){
|
||||||
|
|
||||||
uint8_t uid[7] = {0x00};
|
uint8_t uid[7] = {0x00};
|
||||||
char cmdp = param_getchar(Cmd, 0);
|
char cmdp = tolower(param_getchar(Cmd, 0));
|
||||||
if (strlen(Cmd) == 0 || cmdp == 'h' || cmdp == 'H') return usage_hf_mfu_pwdgen();
|
if (strlen(Cmd) == 0 || cmdp == 'h') return usage_hf_mfu_pwdgen();
|
||||||
if (cmdp == 't' || cmdp == 'T') return ul_ev1_pwdgen_selftest();
|
if (cmdp == 't') return ul_ev1_pwdgen_selftest();
|
||||||
|
|
||||||
if ( cmdp == 'r' || cmdp == 'R') {
|
if ( cmdp == 'r') {
|
||||||
// read uid from tag
|
// read uid from tag
|
||||||
UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT | ISO14A_NO_RATS, 0, 0}};
|
UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT | ISO14A_NO_RATS, 0, 0}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
|
|||||||
Reference in New Issue
Block a user