From 8a5b3c2a45adc51edc23f78621a34cf7956ff554 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 9 Aug 2016 09:10:26 +0200 Subject: [PATCH] CHG: textual fixes in help text CHG: better exit message for 'lf awid bruteforce' --- client/cmdlfawid.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/client/cmdlfawid.c b/client/cmdlfawid.c index 1550af02..43f54a6f 100644 --- a/client/cmdlfawid.c +++ b/client/cmdlfawid.c @@ -311,15 +311,23 @@ int CmdAWIDBrute(const char *Cmd){ for ( uint16_t cn = 1; cn < 0xFFFF; ++cn){ if (ukbhit()) { - PrintAndLog("aborted via keyboard!"); + UsbCommand resp; UsbCommand ping = {CMD_PING}; clearCommandBuffer(); SendCommand(&ping); + if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) { + PrintAndLog("aborted via keyboard!"); + return 0; + } + PrintAndLog("Device didnt respond to ABORT"); return 1; } PrintAndLog("Trying FC: %u; CN: %u", fc, cn); - (void)getAWIDBits(fmtlen, fc, cn, bs); + if ( !getAWIDBits(fmtlen, fc, cn, bs)) { + PrintAndLog("Error with tag bitstream generation."); + return 1; + } memcpy(c.d.asBytes, bs, size); clearCommandBuffer(); SendCommand(&c); @@ -332,9 +340,9 @@ int CmdAWIDBrute(const char *Cmd){ static command_t CommandTable[] = { {"help", CmdHelp, 1, "This help"}, {"fskdemod", CmdAWIDDemodFSK, 0, "['1'] Realtime AWID FSK demodulator (option '1' for one tag only)"}, - {"sim", CmdAWIDSim, 0, " -- AWID tag simulator"}, - {"clone", CmdAWIDClone, 0, " -- Clone AWID to T55x7"}, - {"brute", CmdAWIDBrute, 0, " -- bruteforce card number"}, + {"sim", CmdAWIDSim, 0, " -- AWID tag simulator"}, + {"clone", CmdAWIDClone, 0, " -- Clone AWID to T55x7"}, + {"brute", CmdAWIDBrute, 0, " -- bruteforce card number given a FC"}, {NULL, NULL, 0, NULL} }; -- 2.39.5