From 56f1aaa234318f51b77cc4ce555bd7705056c882 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 10 Aug 2016 16:23:59 +0200 Subject: [PATCH] CHG: on a slow usb connection it seems the pingcmd which stops the bruteforce on deviceside doesnt get there. Lets send three pings to make sure the device gets it. --- client/cmdlfawid.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/cmdlfawid.c b/client/cmdlfawid.c index a304cf7b..2334e3e3 100644 --- a/client/cmdlfawid.c +++ b/client/cmdlfawid.c @@ -104,8 +104,9 @@ static bool sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, ui 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; @@ -374,7 +375,7 @@ int CmdAWIDBrute(const char *Cmd){ // 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; -- 2.39.2