From 78fdffddf70a67901af9f045b44f996632481c26 Mon Sep 17 00:00:00 2001
From: Philippe Teuwen <phil@teuwen.org>
Date: Wed, 1 May 2019 23:20:18 +0200
Subject: [PATCH] Replace WITH_ICLASS by dynamic detection in client

---
 client/cmdhficlass.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c
index cd3c204cb..fc3498ae8 100644
--- a/client/cmdhficlass.c
+++ b/client/cmdhficlass.c
@@ -2421,23 +2421,23 @@ static command_t CommandTable[] = {
     {"help",        CmdHelp,                    AlwaysAvailable, "This help"},
     {"calcnewkey",  CmdHFiClassCalcNewKey,      AlwaysAvailable, "[options..] Calc Diversified keys (blocks 3 & 4) to write new keys"},
     {"chk",         CmdHFiClassCheckKeys,       AlwaysAvailable, "            Check keys"},
-    {"clone",       CmdHFiClassCloneTag,        IfPm3Present,    "[options..] Authenticate and Clone from iClass bin file"},
+    {"clone",       CmdHFiClassCloneTag,        IfPm3Iclass,     "[options..] Authenticate and Clone from iClass bin file"},
     {"decrypt",     CmdHFiClassDecrypt,         AlwaysAvailable, "[f <fname>] Decrypt tagdump" },
-    {"dump",        CmdHFiClassReader_Dump,     IfPm3Present,    "[options..] Authenticate and Dump iClass tag's AA1"},
-    {"eload",       CmdHFiClassELoad,           IfPm3Present,    "[f <fname>] (experimental) Load data into iClass emulator memory"},
+    {"dump",        CmdHFiClassReader_Dump,     IfPm3Iclass,     "[options..] Authenticate and Dump iClass tag's AA1"},
+    {"eload",       CmdHFiClassELoad,           IfPm3Iclass,     "[f <fname>] (experimental) Load data into iClass emulator memory"},
     {"encryptblk",  CmdHFiClassEncryptBlk,      AlwaysAvailable, "<BlockData> Encrypt given block data"},
-    {"list",        CmdHFiClassList,            IfPm3Present,    "            List iClass history"},
+    {"list",        CmdHFiClassList,            IfPm3Iclass,     "            List iClass history"},
     {"loclass",     CmdHFiClass_loclass,        AlwaysAvailable, "[options..] Use loclass to perform bruteforce of reader attack dump"},
     {"lookup",      CmdHFiClassLookUp,          AlwaysAvailable, "[options..] Uses authentication trace to check for key in dictionary file"},
     {"managekeys",  CmdHFiClassManageKeys,      AlwaysAvailable, "[options..] Manage the keys to use with iClass"},
-    {"permutekey",  CmdHFiClassPermuteKey,      IfPm3Present,    "            Permute function from 'heart of darkness' paper"},
-    {"readblk",     CmdHFiClass_ReadBlock,      IfPm3Present,    "[options..] Authenticate and Read iClass block"},
-    {"reader",      CmdHFiClassReader,          IfPm3Present,    "            Act like an iClass reader"},
+    {"permutekey",  CmdHFiClassPermuteKey,      IfPm3Iclass,     "            Permute function from 'heart of darkness' paper"},
+    {"readblk",     CmdHFiClass_ReadBlock,      IfPm3Iclass,     "[options..] Authenticate and Read iClass block"},
+    {"reader",      CmdHFiClassReader,          IfPm3Iclass,     "            Act like an iClass reader"},
     {"readtagfile", CmdHFiClassReadTagFile,     AlwaysAvailable, "[options..] Display Content from tagfile"},
-    {"replay",      CmdHFiClassReader_Replay,   IfPm3Present,    "<mac>       Read an iClass tag via Replay Attack"},
-    {"sim",         CmdHFiClassSim,             IfPm3Present,    "[options..] Simulate iClass tag"},
-    {"sniff",       CmdHFiClassSniff,           IfPm3Present,    "            Eavesdrop iClass communication"},
-    {"writeblk",    CmdHFiClass_WriteBlock,     IfPm3Present,    "[options..] Authenticate and Write iClass block"},
+    {"replay",      CmdHFiClassReader_Replay,   IfPm3Iclass,     "<mac>       Read an iClass tag via Replay Attack"},
+    {"sim",         CmdHFiClassSim,             IfPm3Iclass,     "[options..] Simulate iClass tag"},
+    {"sniff",       CmdHFiClassSniff,           IfPm3Iclass,     "            Eavesdrop iClass communication"},
+    {"writeblk",    CmdHFiClass_WriteBlock,     IfPm3Iclass,     "[options..] Authenticate and Write iClass block"},
     {NULL, NULL, NULL, NULL}
 };