Replace WITH_ISO14443a by dynamic detection in client

This commit is contained in:
Philippe Teuwen 2019-05-01 23:38:57 +02:00
commit e6135a8f78
11 changed files with 99 additions and 92 deletions

View file

@ -3551,46 +3551,46 @@ static int CmdHF14AMfList(const char *Cmd) {
static command_t CommandTable[] = {
{"help", CmdHelp, AlwaysAvailable, "This help"},
{"list", CmdHF14AMfList, IfPm3Present, "List Mifare history"},
{"darkside", CmdHF14AMfDarkside, IfPm3Present, "Darkside attack. read parity error messages."},
{"nested", CmdHF14AMfNested, IfPm3Present, "Nested attack. Test nested authentication"},
{"hardnested", CmdHF14AMfNestedHard, IfPm3Present, "Nested attack for hardened Mifare cards"},
{"keybrute", CmdHF14AMfKeyBrute, IfPm3Present, "J_Run's 2nd phase of multiple sector nested authentication key recovery"},
{"nack", CmdHf14AMfNack, IfPm3Present, "Test for Mifare NACK bug"},
{"chk", CmdHF14AMfChk, IfPm3Present, "Check keys"},
{"fchk", CmdHF14AMfChk_fast, IfPm3Present, "Check keys fast, targets all keys on card"},
{"list", CmdHF14AMfList, IfPm3Iso14443a, "List Mifare history"},
{"darkside", CmdHF14AMfDarkside, IfPm3Iso14443a, "Darkside attack. read parity error messages."},
{"nested", CmdHF14AMfNested, IfPm3Iso14443a, "Nested attack. Test nested authentication"},
{"hardnested", CmdHF14AMfNestedHard, IfPm3Iso14443a, "Nested attack for hardened Mifare cards"},
{"keybrute", CmdHF14AMfKeyBrute, IfPm3Iso14443a, "J_Run's 2nd phase of multiple sector nested authentication key recovery"},
{"nack", CmdHf14AMfNack, IfPm3Iso14443a, "Test for Mifare NACK bug"},
{"chk", CmdHF14AMfChk, IfPm3Iso14443a, "Check keys"},
{"fchk", CmdHF14AMfChk_fast, IfPm3Iso14443a, "Check keys fast, targets all keys on card"},
{"decrypt", CmdHf14AMfDecryptBytes, AlwaysAvailable, "[nt] [ar_enc] [at_enc] [data] - to decrypt sniff or trace"},
{"-----------", CmdHelp, IfPm3Present, ""},
{"dbg", CmdHF14AMfDbg, IfPm3Present, "Set default debug mode"},
{"rdbl", CmdHF14AMfRdBl, IfPm3Present, "Read MIFARE classic block"},
{"rdsc", CmdHF14AMfRdSc, IfPm3Present, "Read MIFARE classic sector"},
{"dump", CmdHF14AMfDump, IfPm3Present, "Dump MIFARE classic tag to binary file"},
{"restore", CmdHF14AMfRestore, IfPm3Present, "Restore MIFARE classic binary file to BLANK tag"},
{"wrbl", CmdHF14AMfWrBl, IfPm3Present, "Write MIFARE classic block"},
{"setmod", CmdHf14AMfSetMod, IfPm3Present, "Set MIFARE Classic EV1 load modulation strength"},
{"auth4", CmdHF14AMfAuth4, IfPm3Present, "ISO14443-4 AES authentication"},
{"-----------", CmdHelp, IfPm3Iso14443a, ""},
{"dbg", CmdHF14AMfDbg, IfPm3Iso14443a, "Set default debug mode"},
{"rdbl", CmdHF14AMfRdBl, IfPm3Iso14443a, "Read MIFARE classic block"},
{"rdsc", CmdHF14AMfRdSc, IfPm3Iso14443a, "Read MIFARE classic sector"},
{"dump", CmdHF14AMfDump, IfPm3Iso14443a, "Dump MIFARE classic tag to binary file"},
{"restore", CmdHF14AMfRestore, IfPm3Iso14443a, "Restore MIFARE classic binary file to BLANK tag"},
{"wrbl", CmdHF14AMfWrBl, IfPm3Iso14443a, "Write MIFARE classic block"},
{"setmod", CmdHf14AMfSetMod, IfPm3Iso14443a, "Set MIFARE Classic EV1 load modulation strength"},
{"auth4", CmdHF14AMfAuth4, IfPm3Iso14443a, "ISO14443-4 AES authentication"},
// {"sniff", CmdHF14AMfSniff, 0, "Sniff card-reader communication"},
{"-----------", CmdHelp, IfPm3Present, ""},
{"sim", CmdHF14AMfSim, IfPm3Present, "Simulate MIFARE card"},
{"eclr", CmdHF14AMfEClear, IfPm3Present, "Clear simulator memory"},
{"eget", CmdHF14AMfEGet, IfPm3Present, "Get simulator memory block"},
{"eset", CmdHF14AMfESet, IfPm3Present, "Set simulator memory block"},
{"eload", CmdHF14AMfELoad, IfPm3Present, "Load from file emul dump"},
{"esave", CmdHF14AMfESave, IfPm3Present, "Save to file emul dump"},
{"ecfill", CmdHF14AMfECFill, IfPm3Present, "Fill simulator memory with help of keys from simulator"},
{"ekeyprn", CmdHF14AMfEKeyPrn, IfPm3Present, "Print keys from simulator memory"},
{"-----------", CmdHelp, IfPm3Present, ""},
{"csetuid", CmdHF14AMfCSetUID, IfPm3Present, "Set UID for magic Chinese card"},
{"csetblk", CmdHF14AMfCSetBlk, IfPm3Present, "Write block - Magic Chinese card"},
{"cgetblk", CmdHF14AMfCGetBlk, IfPm3Present, "Read block - Magic Chinese card"},
{"cgetsc", CmdHF14AMfCGetSc, IfPm3Present, "Read sector - Magic Chinese card"},
{"cload", CmdHF14AMfCLoad, IfPm3Present, "Load dump into magic Chinese card"},
{"csave", CmdHF14AMfCSave, IfPm3Present, "Save dump from magic Chinese card into file or emulator"},
{"-----------", CmdHelp, IfPm3Present, ""},
{"mad", CmdHF14AMfMAD, IfPm3Present, "Checks and prints MAD"},
{"ndef", CmdHFMFNDEF, IfPm3Present, "Prints NDEF records from card"},
{"-----------", CmdHelp, IfPm3Iso14443a, ""},
{"sim", CmdHF14AMfSim, IfPm3Iso14443a, "Simulate MIFARE card"},
{"eclr", CmdHF14AMfEClear, IfPm3Iso14443a, "Clear simulator memory"},
{"eget", CmdHF14AMfEGet, IfPm3Iso14443a, "Get simulator memory block"},
{"eset", CmdHF14AMfESet, IfPm3Iso14443a, "Set simulator memory block"},
{"eload", CmdHF14AMfELoad, IfPm3Iso14443a, "Load from file emul dump"},
{"esave", CmdHF14AMfESave, IfPm3Iso14443a, "Save to file emul dump"},
{"ecfill", CmdHF14AMfECFill, IfPm3Iso14443a, "Fill simulator memory with help of keys from simulator"},
{"ekeyprn", CmdHF14AMfEKeyPrn, IfPm3Iso14443a, "Print keys from simulator memory"},
{"-----------", CmdHelp, IfPm3Iso14443a, ""},
{"csetuid", CmdHF14AMfCSetUID, IfPm3Iso14443a, "Set UID for magic Chinese card"},
{"csetblk", CmdHF14AMfCSetBlk, IfPm3Iso14443a, "Write block - Magic Chinese card"},
{"cgetblk", CmdHF14AMfCGetBlk, IfPm3Iso14443a, "Read block - Magic Chinese card"},
{"cgetsc", CmdHF14AMfCGetSc, IfPm3Iso14443a, "Read sector - Magic Chinese card"},
{"cload", CmdHF14AMfCLoad, IfPm3Iso14443a, "Load dump into magic Chinese card"},
{"csave", CmdHF14AMfCSave, IfPm3Iso14443a, "Save dump from magic Chinese card into file or emulator"},
{"-----------", CmdHelp, IfPm3Iso14443a, ""},
{"mad", CmdHF14AMfMAD, IfPm3Iso14443a, "Checks and prints MAD"},
{"ndef", CmdHFMFNDEF, IfPm3Iso14443a, "Prints NDEF records from card"},
{"ice", CmdHF14AMfice, IfPm3Present, "collect Mifare Classic nonces to file"},
{"ice", CmdHF14AMfice, IfPm3Iso14443a, "collect Mifare Classic nonces to file"},
{NULL, NULL, NULL, NULL}
};