mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 05:13:22 -07:00
hf mf sniff: small fixes
This commit is contained in:
parent
078e2bd238
commit
8ec06f5ef3
2 changed files with 7 additions and 5 deletions
|
@ -2482,7 +2482,7 @@ void RAMFUNC SniffMifare(uint8_t param) {
|
||||||
for(uint32_t sniffCounter = 0; true; ) {
|
for(uint32_t sniffCounter = 0; true; ) {
|
||||||
|
|
||||||
if(BUTTON_PRESS()) {
|
if(BUTTON_PRESS()) {
|
||||||
DbpString("cancelled by button");
|
DbpString("Canceled by button.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2576,7 +2576,7 @@ void RAMFUNC SniffMifare(uint8_t param) {
|
||||||
|
|
||||||
} // main cycle
|
} // main cycle
|
||||||
|
|
||||||
DbpString("COMMAND FINISHED");
|
DbpString("COMMAND FINISHED.");
|
||||||
|
|
||||||
FpgaDisableSscDma();
|
FpgaDisableSscDma();
|
||||||
MfSniffEnd();
|
MfSniffEnd();
|
||||||
|
|
|
@ -2527,14 +2527,13 @@ int CmdHF14AMfSniff(const char *Cmd){
|
||||||
}
|
}
|
||||||
|
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
if (WaitForResponseTimeout(CMD_ACK,&resp,2000)) {
|
if (WaitForResponseTimeoutW(CMD_ACK, &resp, 2000, false)) {
|
||||||
res = resp.arg[0] & 0xff;
|
res = resp.arg[0] & 0xff;
|
||||||
uint16_t traceLen = resp.arg[1];
|
uint16_t traceLen = resp.arg[1];
|
||||||
len = resp.arg[2];
|
len = resp.arg[2];
|
||||||
|
|
||||||
if (res == 0) { // we are done
|
if (res == 0) { // we are done
|
||||||
free(buf);
|
break;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res == 1) { // there is (more) data to be transferred
|
if (res == 1) { // there is (more) data to be transferred
|
||||||
|
@ -2610,6 +2609,9 @@ int CmdHF14AMfSniff(const char *Cmd){
|
||||||
} // while (true)
|
} // while (true)
|
||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|
||||||
|
msleep(300); // wait for exiting arm side.
|
||||||
|
PrintAndLog("Done.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue