// at your option, any later version. See the LICENSE.txt file for the text of
// the license.
//-----------------------------------------------------------------------------
-// Low frequency AWID26 commands
+// Low frequency AWID26/50 commands
//-----------------------------------------------------------------------------
-
-#include <stdio.h> // sscanf
-#include "proxmark3.h" // Definitions, USB controls, etc
-#include "ui.h" // PrintAndLog
-#include "cmdparser.h" // CmdsParse, CmdsHelp
#include "cmdlfawid.h" // AWID function declarations
-#include "lfdemod.h" // parityTest
-#include "util.h" // weigandparity
-#include "protocols.h" // for T55xx config register definitions
-#include "cmdmain.h"
-#include "sleep.h"
static int CmdHelp(const char *Cmd);
return 0;
}
-static boolean sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, uint8_t *bs, size_t bs_len){
+static bool sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, uint8_t *bs, size_t bs_len){
PrintAndLog("Trying FC: %u; CN: %u", fc, cn);
if ( !getAWIDBits(fmtlen, fc, cn, bs)) {
static int sendPing(){
UsbCommand resp;
UsbCommand ping = {CMD_PING};
- clearCommandBuffer();
- SendCommand(&ping);
+ clearCommandBuffer(); SendCommand(&ping);
+ clearCommandBuffer(); SendCommand(&ping);
+ clearCommandBuffer(); SendCommand(&ping);
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
PrintAndLog("aborted via keyboard!");
return 0;
// Do one down (if cardnumber is given)
if ( cn > 1 )
- if ( down > 0 )
+ if ( down > 1 )
if ( !sendTry(fmtlen, fc, --down, delay, bs, size)) return 1;
}
return 0;