From d58a9ad84e565d0675b3b78d41ca8cc37b1d1292 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 10 Feb 2024 19:07:13 +0100 Subject: [PATCH] text --- client/src/cmddata.c | 4 ++-- client/src/cmdhf14a.c | 6 +++--- client/src/cmdhf14b.c | 3 ++- client/src/cmdhf15.c | 7 ++++--- client/src/cmdhffelica.c | 3 ++- client/src/cmdhficlass.c | 9 +++++---- client/src/cmdhfmf.c | 8 +++++++- client/src/cmdhfmfdes.c | 14 +++++++------- client/src/cmdhfxerox.c | 2 +- client/src/cmdlfem4x05.c | 3 ++- client/src/cmdlfhitag.c | 4 ++-- client/src/emv/cmdemv.c | 6 +++--- 12 files changed, 40 insertions(+), 29 deletions(-) diff --git a/client/src/cmddata.c b/client/src/cmddata.c index cfab0bb16..03bd2992b 100644 --- a/client/src/cmddata.c +++ b/client/src/cmddata.c @@ -3826,8 +3826,8 @@ static int CmdBinaryMap(const char *Cmd) { } static command_t CommandTable[] = { + {"-----------", CmdHelp, AlwaysAvailable, "------------------------- " _CYAN_("General") "-------------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, - {"-----------", CmdHelp, AlwaysAvailable, "------------------------- " _CYAN_("Modulation") "-------------------------"}, {"biphaserawdecode", CmdBiphaseDecodeRaw, AlwaysAvailable, "Biphase decode bin stream in DemodBuffer"}, {"detectclock", CmdDetectClockRate, AlwaysAvailable, "Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer"}, @@ -3862,7 +3862,7 @@ static command_t CommandTable[] = { {"convertbitstream", CmdConvertBitStream, AlwaysAvailable, "Convert GraphBuffer's 0/1 values to 127 / -127"}, {"getbitstream", CmdGetBitStream, AlwaysAvailable, "Convert GraphBuffer's >=1 values to 1 and <1 to 0"}, - {"-----------", CmdHelp, AlwaysAvailable, "------------------------- " _CYAN_("General") "-------------------------"}, + {"-----------", CmdHelp, AlwaysAvailable, "------------------------- " _CYAN_("Operations") "-------------------------"}, {"asn1", CmdAsn1Decoder, AlwaysAvailable, "ASN1 decoder"}, {"atr", CmdAtrLookup, AlwaysAvailable, "ATR lookup"}, {"bin2hex", Cmdbin2hex, AlwaysAvailable, "Converts binary to hexadecimal"}, diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index ab5894d88..09cd63e53 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -3520,7 +3520,7 @@ static command_t CommandTable[] = { {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdHF14AList, AlwaysAvailable, "List ISO 14443-a history"}, - {"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("operations") " ---------------------"}, + {"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("Operations") " ---------------------"}, {"antifuzz", CmdHF14AAntiFuzz, IfPm3Iso14443a, "Fuzzing the anticollision phase. Warning! Readers may react strange"}, {"config", CmdHf14AConfig, IfPm3Iso14443a, "Configure 14a settings (use with caution)"}, {"cuids", CmdHF14ACUIDs, IfPm3Iso14443a, "Collect n>0 ISO14443-a UIDs in one go"}, @@ -3529,11 +3529,11 @@ static command_t CommandTable[] = { {"sniff", CmdHF14ASniff, IfPm3Iso14443a, "sniff ISO 14443-a traffic"}, {"raw", CmdHF14ACmdRaw, IfPm3Iso14443a, "Send raw hex data to tag"}, {"reader", CmdHF14AReader, IfPm3Iso14443a, "Act like an ISO14443-a reader"}, - {"-----------", CmdHelp, IfPm3Iso14443a, "------------------------- " _CYAN_("apdu") " -------------------------"}, + {"-----------", CmdHelp, IfPm3Iso14443a, "------------------------- " _CYAN_("APDU") " -------------------------"}, {"apdu", CmdHF14AAPDU, IfPm3Iso14443a, "Send ISO 14443-4 APDU to tag"}, {"apdufind", CmdHf14AFindapdu, IfPm3Iso14443a, "Enumerate APDUs - CLA/INS/P1P2"}, {"chaining", CmdHF14AChaining, IfPm3Iso14443a, "Control ISO 14443-4 input chaining"}, - {"-----------", CmdHelp, IfPm3Iso14443a, "------------------------- " _CYAN_("ndef") " -------------------------"}, + {"-----------", CmdHelp, IfPm3Iso14443a, "------------------------- " _CYAN_("NDEF") " -------------------------"}, {"ndefformat", CmdHF14ANdefFormat, IfPm3Iso14443a, "Format ISO 14443-A as NFC Type 4 tag"}, {"ndefread", CmdHF14ANdefRead, IfPm3Iso14443a, "Read an NDEF file from ISO 14443-A Type 4 tag"}, {"ndefwrite", CmdHF14ANdefWrite, IfPm3Iso14443a, "Write NDEF records to ISO 14443-A tag"}, diff --git a/client/src/cmdhf14b.c b/client/src/cmdhf14b.c index 5b8b1c153..708a92190 100644 --- a/client/src/cmdhf14b.c +++ b/client/src/cmdhf14b.c @@ -2522,9 +2522,10 @@ static int CmdHF14BView(const char *Cmd) { } static command_t CommandTable[] = { + {"---------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdHF14BList, AlwaysAvailable, "List ISO-14443-B history"}, - {"---------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("general") " -----------------------"}, + {"---------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("Operations") " -----------------------"}, {"apdu", CmdHF14BAPDU, IfPm3Iso14443b, "Send ISO 14443-4 APDU to tag"}, {"dump", CmdHF14BDump, IfPm3Iso14443b, "Read all memory pages of an ISO-14443-B tag, save to file"}, {"info", CmdHF14Binfo, IfPm3Iso14443b, "Tag information"}, diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 360bac5d7..47e6668a4 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -3418,9 +3418,10 @@ static int CmdHF15Wipe(const char *Cmd) { } static command_t CommandTable[] = { + {"-----------", CmdHF15Help, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, {"help", CmdHF15Help, AlwaysAvailable, "This help"}, {"list", CmdHF15List, AlwaysAvailable, "List ISO-15693 history"}, - {"-----------", CmdHF15Help, AlwaysAvailable, "----------------------- " _CYAN_("general") " -----------------------"}, + {"-----------", CmdHF15Help, AlwaysAvailable, "----------------------- " _CYAN_("Operations") " -----------------------"}, {"demod", CmdHF15Demod, AlwaysAvailable, "Demodulate ISO-15693 from tag"}, {"dump", CmdHF15Dump, IfPm3Iso15693, "Read all memory pages of an ISO-15693 tag, save to file"}, {"info", CmdHF15Info, IfPm3Iso15693, "Tag information"}, @@ -3434,7 +3435,7 @@ static command_t CommandTable[] = { {"view", CmdHF15View, AlwaysAvailable, "Display content from tag dump file"}, {"wipe", CmdHF15Wipe, IfPm3Iso15693, "Wipe card to zeros"}, {"wrbl", CmdHF15Write, IfPm3Iso15693, "Write a block"}, - {"-----------", CmdHF15Help, IfPm3Iso15693, "--------------------- " _CYAN_("simulation") " ----------------------"}, + {"-----------", CmdHF15Help, IfPm3Iso15693, "--------------------- " _CYAN_("Simulation") " ----------------------"}, {"sim", CmdHF15Sim, IfPm3Iso15693, "Fake an ISO-15693 tag"}, {"eload", CmdHF15ELoad, IfPm3Iso15693, "Upload file into emulator memory"}, {"esave", CmdHF15ESave, IfPm3Iso15693, "Save emulator memory to file"}, @@ -3451,7 +3452,7 @@ static command_t CommandTable[] = { {"findafi", CmdHF15FindAfi, IfPm3Iso15693, "Brute force AFI of an ISO-15693 tag"}, {"writeafi", CmdHF15WriteAfi, IfPm3Iso15693, "Writes the AFI on an ISO-15693 tag"}, {"writedsfid", CmdHF15WriteDsfid, IfPm3Iso15693, "Writes the DSFID on an ISO-15693 tag"}, - {"-----------", CmdHF15Help, IfPm3Iso15693, "------------------------- " _CYAN_("magic") " -----------------------"}, + {"-----------", CmdHF15Help, IfPm3Iso15693, "------------------------- " _CYAN_("Magic") " -----------------------"}, {"csetuid", CmdHF15CSetUID, IfPm3Iso15693, "Set UID for magic card"}, {NULL, NULL, NULL, NULL} }; diff --git a/client/src/cmdhffelica.c b/client/src/cmdhffelica.c index a23eacad1..7c6e0f520 100644 --- a/client/src/cmdhffelica.c +++ b/client/src/cmdhffelica.c @@ -2189,9 +2189,10 @@ static int CmdHFFelicaCmdRaw(const char *Cmd) { } static command_t CommandTable[] = { + {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdHFFelicaList, AlwaysAvailable, "List ISO 18092/FeliCa history"}, - {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, + {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("Operations") " -----------------------"}, {"info", CmdHFFelicaInfo, IfPm3Felica, "Tag information"}, {"raw", CmdHFFelicaCmdRaw, IfPm3Felica, "Send raw hex data to tag"}, {"rdbl", CmdHFFelicaReadPlain, IfPm3Felica, "read block data from authentication-not-required Service."}, diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 10fdcdfd6..f9d87b822 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -4628,9 +4628,10 @@ static int CmdHFiClassSAM(const char *Cmd) { } static command_t CommandTable[] = { + {"-----------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("General") " ---------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdHFiClassList, AlwaysAvailable, "List iclass history"}, - {"-----------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("general") " ---------------------"}, + {"-----------", CmdHelp, IfPm3Iclass, "------------------- " _CYAN_("Operations") " -------------------"}, // {"clone", CmdHFiClassClone, IfPm3Iclass, "Create a HID credential to Picopass / iCLASS tag"}, {"dump", CmdHFiClassDump, IfPm3Iclass, "Dump Picopass / iCLASS tag to file"}, {"info", CmdHFiClassInfo, IfPm3Iclass, "Tag information"}, @@ -4641,18 +4642,18 @@ static command_t CommandTable[] = { {"view", CmdHFiClassView, AlwaysAvailable, "Display content from tag dump file"}, {"wrbl", CmdHFiClass_WriteBlock, IfPm3Iclass, "Write Picopass / iCLASS block"}, {"creditepurse", CmdHFiClassCreditEpurse, IfPm3Iclass, "Credit epurse value"}, - {"-----------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("recovery") " --------------------"}, + {"-----------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("Recovery") " --------------------"}, // {"autopwn", CmdHFiClassAutopwn, IfPm3Iclass, "Automatic key recovery tool for iCLASS"}, {"chk", CmdHFiClassCheckKeys, IfPm3Iclass, "Check keys"}, {"loclass", CmdHFiClass_loclass, AlwaysAvailable, "Use loclass to perform bruteforce reader attack"}, {"lookup", CmdHFiClassLookUp, AlwaysAvailable, "Uses authentication trace to check for key in dictionary file"}, - {"-----------", CmdHelp, IfPm3Iclass, "-------------------- " _CYAN_("simulation") " -------------------"}, + {"-----------", CmdHelp, IfPm3Iclass, "-------------------- " _CYAN_("Simulation") " -------------------"}, {"sim", CmdHFiClassSim, IfPm3Iclass, "Simulate iCLASS tag"}, {"eload", CmdHFiClassELoad, IfPm3Iclass, "Upload file into emulator memory"}, {"esave", CmdHFiClassESave, IfPm3Iclass, "Save emulator memory to file"}, {"esetblk", CmdHFiClassESetBlk, IfPm3Iclass, "Set emulator memory block data"}, {"eview", CmdHFiClassEView, IfPm3Iclass, "View emulator memory"}, - {"-----------", CmdHelp, AlwaysAvailable, "---------------------- " _CYAN_("utils") " ----------------------"}, + {"-----------", CmdHelp, AlwaysAvailable, "---------------------- " _CYAN_("Utils") " ----------------------"}, {"configcard", CmdHFiClassConfigCard, IfPm3Iclass, "Reader configuration card"}, {"calcnewkey", CmdHFiClassCalcNewKey, AlwaysAvailable, "Calc diversified keys (blocks 3 & 4) to write new keys"}, {"encode", CmdHFiClassEncode, AlwaysAvailable, "Encode binary wiegand to block 7"}, diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 82e7a3e8d..bfb9398ca 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -9331,15 +9331,21 @@ static int CmdHF14AMfInfo(const char *Cmd) { PrintAndLogEx(SUCCESS, "Block 0.......... %s", sprint_hex(blockdata, MFBLOCK_SIZE)); } + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(INFO, "--- " _CYAN_("Fingerprint")); if ( (blockdata[8] == 0x03 && blockdata[15] == 0x90) || (blockdata[9] == 0x02 && blockdata[14] == 0x1D) || (blockdata[8] == 0x04 && blockdata[15] == 0x90) || (memcmp(blockdata + 8, "\x62\x63\x64\x65\x66\x67\x68\x69", 8) == 0) ) { - PrintAndLogEx(SUCCESS, " Fudan tag detected"); + PrintAndLogEx(SUCCESS, "FUDAN detected"); } + if (e_sector[1].foundKey[MF_KEY_A] && (e_sector[1].Key[MF_KEY_A] == 0x2A2C13CC242A)) { + PrintAndLogEx(SUCCESS, "Dorma Kaba SAFLOK detected"); + } + } else { PrintAndLogEx(INFO, ""); } diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 0cf556eb1..240fbddd4 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -5686,18 +5686,18 @@ static int CmdHF14ADesTest(const char *Cmd) { static command_t CommandTable[] = { {"help", CmdHelp, AlwaysAvailable, "This help"}, - {"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("general") " ----------------------"}, - {"info", CmdHF14ADesInfo, IfPm3Iso14443a, "Tag information"}, - {"getuid", CmdHF14ADesGetUID, IfPm3Iso14443a, "Get uid from card"}, - {"default", CmdHF14ADesDefault, IfPm3Iso14443a, "Set defaults for all the commands"}, + {"list", CmdHF14ADesList, AlwaysAvailable, "List DESFire (ISO 14443A) history"}, + {"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("General") " ----------------------"}, {"auth", CmdHF14ADesAuth, IfPm3Iso14443a, "MIFARE DesFire Authentication"}, {"chk", CmdHF14aDesChk, IfPm3Iso14443a, "Check keys"}, + {"default", CmdHF14ADesDefault, IfPm3Iso14443a, "Set defaults for all the commands"}, {"detect", CmdHF14aDesDetect, IfPm3Iso14443a, "Detect key type and tries to find one from the list"}, - {"freemem", CmdHF14ADesGetFreeMem, IfPm3Iso14443a, "Get free memory size"}, - {"setconfig", CmdHF14ADesSetConfiguration, IfPm3Iso14443a, "Set card configuration"}, {"formatpicc", CmdHF14ADesFormatPICC, IfPm3Iso14443a, "Format PICC"}, - {"list", CmdHF14ADesList, AlwaysAvailable, "List DESFire (ISO 14443A) history"}, + {"freemem", CmdHF14ADesGetFreeMem, IfPm3Iso14443a, "Get free memory size"}, + {"getuid", CmdHF14ADesGetUID, IfPm3Iso14443a, "Get uid from card"}, + {"info", CmdHF14ADesInfo, IfPm3Iso14443a, "Tag information"}, {"mad", CmdHF14aDesMAD, IfPm3Iso14443a, "Prints MAD records / files from the card"}, + {"setconfig", CmdHF14ADesSetConfiguration, IfPm3Iso14443a, "Set card configuration"}, {"-----------", CmdHelp, IfPm3Iso14443a, "-------------------- " _CYAN_("Applications") " -------------------"}, {"lsapp", CmdHF14ADesLsApp, IfPm3Iso14443a, "Show all applications with files list"}, {"getaids", CmdHF14ADesGetAIDs, IfPm3Iso14443a, "Get Application IDs list"}, diff --git a/client/src/cmdhfxerox.c b/client/src/cmdhfxerox.c index 95fb88720..911569499 100644 --- a/client/src/cmdhfxerox.c +++ b/client/src/cmdhfxerox.c @@ -1013,7 +1013,7 @@ static int CmdHFXeroxRdBl(const char *Cmd) { static command_t CommandTable[] = { {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdHFXeroxList, AlwaysAvailable, "List ISO-14443B history"}, - {"--------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("general") " -----------------------"}, + {"--------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, {"info", CmdHFXeroxInfo, IfPm3Iso14443b, "Short info on Fuji/Xerox tag"}, {"dump", CmdHFXeroxDump, IfPm3Iso14443b, "Read all memory pages of an Fuji/Xerox tag, save to file"}, {"reader", CmdHFXeroxReader, IfPm3Iso14443b, "Act like a Fuji/Xerox reader"}, diff --git a/client/src/cmdlfem4x05.c b/client/src/cmdlfem4x05.c index ea1dbb8ac..1aa869427 100644 --- a/client/src/cmdlfem4x05.c +++ b/client/src/cmdlfem4x05.c @@ -2595,8 +2595,9 @@ static int CmdEM4x05Config(const char *Cmd) { } static command_t CommandTable[] = { + {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, - {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("general") " -----------------------"}, + {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("Operations") " -----------------------"}, {"brute", CmdEM4x05Brute, IfPm3Lf, "Bruteforce password"}, {"chk", CmdEM4x05Chk, IfPm3Lf, "Check passwords from dictionary"}, {"config", CmdEM4x05Config, AlwaysAvailable, "Create common configuration words"}, diff --git a/client/src/cmdlfhitag.c b/client/src/cmdlfhitag.c index e9f4f5c89..0f258042a 100644 --- a/client/src/cmdlfhitag.c +++ b/client/src/cmdlfhitag.c @@ -1314,7 +1314,7 @@ static command_t CommandTable[] = { {"-----------", CmdHelp, IfPm3Hitag, "------------------------ " _CYAN_("General") " ------------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdLFHitagList, AlwaysAvailable, "List Hitag trace history"}, - {"-----------", CmdHelp, IfPm3Hitag, "----------------------- " _CYAN_("operations") " -----------------------"}, + {"-----------", CmdHelp, IfPm3Hitag, "----------------------- " _CYAN_("Operations") " -----------------------"}, {"info", CmdLFHitagInfo, IfPm3Hitag, "Hitag 2 tag information"}, {"dump", CmdLFHitag2Dump, IfPm3Hitag, "Dump Hitag 2 tag"}, {"read", CmdLFHitagReader, IfPm3Hitag, "Read Hitag memory"}, @@ -1323,7 +1323,7 @@ static command_t CommandTable[] = { {"sniff", CmdLFHitagSniff, IfPm3Hitag, "Eavesdrop Hitag communication"}, {"cc", CmdLFHitagSCheckChallenges, IfPm3Hitag, "Hitag S: test all provided challenges"}, {"ta", CmdLFHitag2CheckChallenges, IfPm3Hitag, "Hitag 2: test all recorded authentications"}, - {"-----------", CmdHelp, IfPm3Hitag, "----------------------- " _CYAN_("simulation") " -----------------------"}, + {"-----------", CmdHelp, IfPm3Hitag, "----------------------- " _CYAN_("Simulation") " -----------------------"}, {"eload", CmdLFHitagEload, IfPm3Hitag, "Upload file into emulator memory"}, // {"esave", CmdLFHitagESave, IfPm3Hitag, "Save emulator memory to file"}, {"eview", CmdLFHitagEview, IfPm3Hitag, "View emulator memory"}, diff --git a/client/src/emv/cmdemv.c b/client/src/emv/cmdemv.c index 0f7f57576..e5d5ab40f 100644 --- a/client/src/emv/cmdemv.c +++ b/client/src/emv/cmdemv.c @@ -2896,11 +2896,11 @@ static int CmdEMVReader(const char *Cmd) { } static command_t CommandTable[] = { - {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("general") " -----------------------"}, + {"-----------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("General") " -----------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdEMVList, AlwaysAvailable, "List ISO7816 history"}, - {"test", CmdEMVTest, AlwaysAvailable, "Crypto logic test"}, - {"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("operations") " ---------------------"}, + {"test", CmdEMVTest, AlwaysAvailable, "Crypto logic selftest"}, + {"-----------", CmdHelp, IfPm3Iso14443a, "---------------------- " _CYAN_("Operations") " ---------------------"}, {"challenge", CmdEMVGenerateChallenge, IfPm3Iso14443, "Generate challenge"}, {"exec", CmdEMVExec, IfPm3Iso14443, "Executes EMV contactless transaction"}, {"genac", CmdEMVAC, IfPm3Iso14443, "Generate ApplicationCryptogram"},