chg: strange behavior when running checks with hardnested

This commit is contained in:
iceman1001 2017-12-18 11:29:34 +01:00
commit e6f0672015
5 changed files with 6 additions and 4 deletions

View file

@ -1156,6 +1156,7 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
uint64_t foundkey = 0;
int16_t isOK = mfnestedhard(blockNo, keyType, key, trgBlockNo, trgKeyType, know_target_key ? trgkey : NULL, nonce_file_read, nonce_file_write, slow, tests, &foundkey);
DropField();
if (isOK) {
switch (isOK) {
case 1 : PrintAndLog("Error: No response from Proxmark.\n"); break;
@ -1164,7 +1165,6 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
}
return 2;
}
return 0;
}

View file

@ -29,7 +29,7 @@
#include "mifarehost.h"
#include "util_posix.h" // msclock
#include "mifaredefault.h" // mifare default key array
#include "cmdhf14a.h" // dropfield
extern int CmdHFMF(const char *Cmd);

View file

@ -2389,6 +2389,7 @@ int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBloc
free_bitarray(all_bitflips_bitarray[EVEN_STATE]);
free_sum_bitarrays();
free_part_sum_bitarrays();
return is_OK;
}
}

View file

@ -597,6 +597,7 @@ static int l_hardnested(lua_State *L){
uint64_t foundkey = 0;
int retval = mfnestedhard(blockNo, keyType, key, trgBlockNo, trgKeyType, haveTarget ? trgkey : NULL, nonce_file_read, nonce_file_write, slow, tests, &foundkey);
DropField();
//Push the retval on the stack
lua_pushinteger(L,retval);