#include "nonce2key/nonce2key.h"
#include "cmdhf.h"
-#define llx PRIx64
-
static int CmdHelp(const char *Cmd);
static void waitCmd(uint8_t iLen);
int len = (resp.arg[1] > sizeof(data)) ? sizeof(data) : resp.arg[1];
memcpy(data, resp.d.asBytes, len);
tryMfk32(uid, data, key);
- tryMfk32_moebius(uid, data, key);
+ //tryMfk32_moebius(uid, data, key);
//tryMfk64(uid, data, key);
PrintAndLog("--");
}
if(topazmode)
c.arg[0] |= ISO14A_TOPAZMODE;
-
+
// Max buffer is USB_CMD_DATA_SIZE
- c.arg[1] = (datalen & 0xFFFF) | (numbits << 16);
+ datalen = (datalen > USB_CMD_DATA_SIZE) ? USB_CMD_DATA_SIZE : datalen;
+
+ c.arg[1] = (datalen & 0xFFFF) | (uint32_t)(numbits << 16);
memcpy(c.d.asBytes,data,datalen);
clearCommandBuffer();
int CmdHF14A(const char *Cmd) {
// flush
- WaitForResponseTimeout(CMD_ACK,NULL,100);
+ clearCommandBuffer();
+ //WaitForResponseTimeout(CMD_ACK,NULL,100);
// parse
CmdsParse(CommandTable, Cmd);