nfc-relay: exit properly if emulator initialization failed.
This commit is contained in:
parent
f85c91a04e
commit
e5d685a23d
1 changed files with 6 additions and 1 deletions
|
@ -81,7 +81,12 @@ int main(int argc,char* argv[])
|
||||||
printf("[+] Try to break out the auto-emulation, this requires a second reader!\n");
|
printf("[+] Try to break out the auto-emulation, this requires a second reader!\n");
|
||||||
printf("[+] To do this, please send any command after the anti-collision\n");
|
printf("[+] To do this, please send any command after the anti-collision\n");
|
||||||
printf("[+] For example, send a RATS command or use the \"nfc-anticol\" tool\n");
|
printf("[+] For example, send a RATS command or use the \"nfc-anticol\" tool\n");
|
||||||
nfc_target_init(pdiTag,abtReaderRx,&szReaderRxBits);
|
if (!nfc_target_init(pdiTag,abtReaderRx,&szReaderRxBits))
|
||||||
|
{
|
||||||
|
printf("[+] Initialization of NFC emulator failed\n");
|
||||||
|
nfc_disconnect(pdiTag);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
printf("[+] Configuring emulator settings\n");
|
printf("[+] Configuring emulator settings\n");
|
||||||
nfc_configure(pdiTag,DCO_HANDLE_CRC,false);
|
nfc_configure(pdiTag,DCO_HANDLE_CRC,false);
|
||||||
nfc_configure(pdiTag,DCO_HANDLE_PARITY,false);
|
nfc_configure(pdiTag,DCO_HANDLE_PARITY,false);
|
||||||
|
|
Loading…
Reference in a new issue