mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
chg: strange behavior when running checks with hardnested
This commit is contained in:
parent
154c30d0e5
commit
e6f0672015
5 changed files with 6 additions and 4 deletions
|
@ -1156,6 +1156,7 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
uint64_t foundkey = 0;
|
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);
|
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) {
|
if (isOK) {
|
||||||
switch (isOK) {
|
switch (isOK) {
|
||||||
case 1 : PrintAndLog("Error: No response from Proxmark.\n"); break;
|
case 1 : PrintAndLog("Error: No response from Proxmark.\n"); break;
|
||||||
|
@ -1164,7 +1165,6 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "mifarehost.h"
|
#include "mifarehost.h"
|
||||||
#include "util_posix.h" // msclock
|
#include "util_posix.h" // msclock
|
||||||
#include "mifaredefault.h" // mifare default key array
|
#include "mifaredefault.h" // mifare default key array
|
||||||
|
#include "cmdhf14a.h" // dropfield
|
||||||
|
|
||||||
extern int CmdHFMF(const char *Cmd);
|
extern int CmdHFMF(const char *Cmd);
|
||||||
|
|
||||||
|
|
|
@ -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_bitarray(all_bitflips_bitarray[EVEN_STATE]);
|
||||||
free_sum_bitarrays();
|
free_sum_bitarrays();
|
||||||
free_part_sum_bitarrays();
|
free_part_sum_bitarrays();
|
||||||
|
|
||||||
return is_OK;
|
return is_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) {
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int mfCheckKeys (uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t keycnt, uint8_t * keyBlock, uint64_t * key){
|
int mfCheckKeys(uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t keycnt, uint8_t * keyBlock, uint64_t * key){
|
||||||
*key = -1;
|
*key = -1;
|
||||||
UsbCommand c = {CMD_MIFARE_CHKKEYS, { (blockNo | (keyType << 8)), clear_trace, keycnt}};
|
UsbCommand c = {CMD_MIFARE_CHKKEYS, { (blockNo | (keyType << 8)), clear_trace, keycnt}};
|
||||||
memcpy(c.d.asBytes, keyBlock, 6 * keycnt);
|
memcpy(c.d.asBytes, keyBlock, 6 * keycnt);
|
||||||
|
|
|
@ -597,7 +597,8 @@ static int l_hardnested(lua_State *L){
|
||||||
|
|
||||||
uint64_t foundkey = 0;
|
uint64_t foundkey = 0;
|
||||||
int retval = mfnestedhard(blockNo, keyType, key, trgBlockNo, trgKeyType, haveTarget ? trgkey : NULL, nonce_file_read, nonce_file_write, slow, tests, &foundkey);
|
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
|
//Push the retval on the stack
|
||||||
lua_pushinteger(L,retval);
|
lua_pushinteger(L,retval);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue