chg: 'hf felica litedump' - now turns off device when aborted via keyboard, or buttonpress
This commit is contained in:
@@ -331,7 +331,7 @@ int CmdHFFelicaDumpLite(const char *Cmd) {
|
||||
if ( ctmp == 'h' || ctmp == 'H') return usage_hf_felica_dumplite();
|
||||
|
||||
PrintAndLog("[+] FeliCa lite - dump started");
|
||||
|
||||
PrintAndLog("[+] press pm3-button to cancel");
|
||||
UsbCommand c = {CMD_FELICA_LITE_DUMP, {0,0,0}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
@@ -344,13 +344,19 @@ int CmdHFFelicaDumpLite(const char *Cmd) {
|
||||
if (ukbhit()) {
|
||||
int gc = getchar(); (void)gc;
|
||||
printf("\n[!] aborted via keyboard!\n");
|
||||
DropField();
|
||||
return 1;
|
||||
}
|
||||
if (timeout > 100) {
|
||||
PrintAndLog("[!] timeout while waiting for reply.");
|
||||
DropField();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (resp.arg[0] == 0) {
|
||||
PrintAndLog("\n[!] Button pressed. Aborted.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint64_t tracelen = resp.arg[1];
|
||||
uint8_t *trace = malloc(tracelen);
|
||||
|
||||
Reference in New Issue
Block a user