nfc-emulate-tag: handle HALT & READ
This commit is contained in:
parent
73561c5c1a
commit
03963ef535
1 changed files with 12 additions and 0 deletions
|
@ -84,6 +84,18 @@ target_io( nfc_target_t * pnt, const byte_t * pbtInput, const size_t szInput, by
|
||||||
}
|
}
|
||||||
if(szInput) {
|
if(szInput) {
|
||||||
switch(pbtInput[0]) {
|
switch(pbtInput[0]) {
|
||||||
|
case 0x30: // Mifare read
|
||||||
|
// block address is in pbtInput[1]
|
||||||
|
*pszOutput = 15;
|
||||||
|
strcpy(pbtOutput, "You read block ");
|
||||||
|
pbtOutput[15] = pbtInput[1];
|
||||||
|
break;
|
||||||
|
case 0x50: // Deselect / HALT
|
||||||
|
if (!quiet_output) {
|
||||||
|
printf("Target halted me. Bye!\n");
|
||||||
|
}
|
||||||
|
loop = false;
|
||||||
|
break;
|
||||||
case 0x60: // Mifare authA
|
case 0x60: // Mifare authA
|
||||||
case 0x61: // Mifare authB
|
case 0x61: // Mifare authB
|
||||||
// Let's give back a very random nonce...
|
// Let's give back a very random nonce...
|
||||||
|
|
Loading…
Reference in a new issue