1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 // High frequency ISO14443A commands
17 //-----------------------------------------------------------------------------
23 #include "pm3_cmd.h" //hf14a_config
24 #include "mifare.h" // structs
26 // structure and database for uid -> tagtype lookups
34 const uint8_t aid_length
;
54 int CmdHF14A(const char *Cmd
);
55 int CmdHF14ASniff(const char *Cmd
); // used by hf topaz sniff
56 int CmdHF14ASim(const char *Cmd
); // used by hf mfu sim
57 int CmdHF14ANdefRead(const char *Cmd
); // used by cmdnfc.c
58 int CmdHF14ANdefFormat(const char *Cmd
); // used by cmdnfc.c
59 int CmdHF14ANdefWrite(const char *Cmd
); // used by cmdnfc.c
61 int detect_nxp_card(uint8_t sak
, uint16_t atqa
, uint64_t select_status
);
63 int hf14a_getconfig(hf14a_config
*config
);
64 int hf14a_setconfig(hf14a_config
*config
, bool verbose
);
65 int infoHF14A(bool verbose
, bool do_nack_test
, bool do_aid_search
);
66 int infoHF14A4Applications(bool verbose
);
67 const char *getTagInfo(uint8_t uid
);
68 int Hf14443_4aGetCardData(iso14a_card_select_t
*card
);
69 int ExchangeAPDU14a(const uint8_t *datain
, int datainlen
, bool activateField
, bool leaveSignalON
, uint8_t *dataout
, int maxdataoutlen
, int *dataoutlen
);
70 int ExchangeRAW14a(uint8_t *datain
, int datainlen
, bool activateField
, bool leaveSignalON
, uint8_t *dataout
, int maxdataoutlen
, int *dataoutlen
, bool silentMode
);
72 iso14a_polling_parameters_t
iso14a_get_polling_parameters(bool use_ecp
, bool use_magsafe
);
73 int SelectCard14443A_4(bool disconnect
, bool verbose
, iso14a_card_select_t
*card
);
74 int SelectCard14443A_4_WithParameters(bool disconnect
, bool verbose
, iso14a_card_select_t
*card
, iso14a_polling_parameters_t
*polling_parameters
);
76 bool Get_apdu_in_framing(void);
77 void Set_apdu_in_framing(bool v
);