From b94e4d927efe56a729f55bd7cd4e4915c8d480e0 Mon Sep 17 00:00:00 2001 From: mwalker33 <51802811+mwalker33@users.noreply.github.com> Date: Thu, 22 Oct 2020 14:34:18 +1100 Subject: [PATCH 01/14] Update cmdlfem4x.c Show clock reate for EM4100 tags --- client/src/cmdlfem4x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/cmdlfem4x.c b/client/src/cmdlfem4x.c index 74ce5a737..671498c75 100644 --- a/client/src/cmdlfem4x.c +++ b/client/src/cmdlfem4x.c @@ -199,9 +199,11 @@ void printEM410x(uint32_t hi, uint64_t id) { if (hi) { //output 88 bit em id PrintAndLogEx(NORMAL, "\nEM TAG ID : "_YELLOW_("%06X%016" PRIX64), hi, id); + PrintAndLogEx(NORMAL, "Clock rate : "_YELLOW_("RF/%d"), g_DemodClock); } else { //output 40 bit em id PrintAndLogEx(NORMAL, "\nEM TAG ID : "_YELLOW_("%010" PRIX64), id); + PrintAndLogEx(NORMAL, "Clock rate : "_YELLOW_("RF/%d"), g_DemodClock); PrintAndLogEx(NORMAL, "\nPossible de-scramble patterns\n"); PrintAndLogEx(NORMAL, "Unique TAG ID : %010" PRIX64, id2lo); PrintAndLogEx(NORMAL, "HoneyWell IdentKey {"); From 74760c6de6194bf272810cf5f4c6ac19ba853f6f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 22 Oct 2020 12:20:39 +0200 Subject: [PATCH 02/14] hf lto dump / info - now adapts to different type_info --- client/src/cmdhflto.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhflto.c b/client/src/cmdhflto.c index 7313d23fb..a4b7d1f03 100644 --- a/client/src/cmdhflto.c +++ b/client/src/cmdhflto.c @@ -22,6 +22,15 @@ #include "protocols.h" #include "fileutils.h" //saveFile +/* + iceman notes + We can't dump LTO 5 or 6 tags yet since we don't have a datasheet. + If you have access to datasheet, le me know! + + LTO w Type info 00 01 has 101 blocks. + LTO w Type info 00 03 has 255 blocks. + LTO w Type info 00 xx has NN blocks. +*/ #define CM_MEM_MAX_SIZE 0x1FE0 // (32byte/block * 255block = 8160byte) static int CmdHelp(const char *Cmd); @@ -185,6 +194,17 @@ static int CmdHfLTOInfo(const char *Cmd) { return infoLTO(true); } +static const char* lto_print_size(uint8_t ti) { + switch(ti) { + case 1: + return "101 blocks / 3232 bytes"; + case 3: + return "255 blocks / 8160 bytes"; + default : + return ""; + } +} + int infoLTO(bool verbose) { clearCommandBuffer(); @@ -199,8 +219,9 @@ int infoLTO(bool verbose) { if (ret_val == PM3_SUCCESS) { PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(SUCCESS, "UID: " _YELLOW_("%s"), sprint_hex_inrow(serial_number, sizeof(serial_number))); - PrintAndLogEx(SUCCESS, "TYPE INFO: " _YELLOW_("%s"), sprint_hex_inrow(type_info, sizeof(type_info))); + PrintAndLogEx(SUCCESS, "UID......... " _YELLOW_("%s"), sprint_hex_inrow(serial_number, sizeof(serial_number))); + PrintAndLogEx(SUCCESS, "Type info... " _YELLOW_("%s"), sprint_hex_inrow(type_info, sizeof(type_info))); + PrintAndLogEx(SUCCESS, "Memory...... " _YELLOW_("%s"), lto_print_size(type_info[1])); } return ret_val; @@ -442,11 +463,18 @@ int dumpLTO(uint8_t *dump, bool verbose) { lto_switch_off_field(); return ret_val; } + // 0003 == 255 blocks x 32 = 8160 bytes + // 0001 == 101 blocks x 32 = 3232 bytes + uint8_t blocks = 0xFF; + if (type_info[1] == 0x01) { + blocks = 0x65; + } + PrintAndLogEx(SUCCESS, "Found LTO tag w " _YELLOW_("%s") " memory", lto_print_size(type_info[1])); uint8_t block_data_d00_d15[18]; uint8_t block_data_d16_d31[18]; - for (uint8_t i = 0; i < 255; i++) { + for (uint8_t i = 0; i < blocks; i++) { ret_val = lto_rdbl(i, block_data_d00_d15, block_data_d16_d31, verbose); @@ -458,6 +486,8 @@ int dumpLTO(uint8_t *dump, bool verbose) { lto_switch_off_field(); return ret_val; } + PrintAndLogEx(INPLACE, "...reading block %d", i); + fflush(stdout); } lto_switch_off_field(); @@ -502,6 +532,7 @@ static int CmdHfLTODump(const char *Cmd) { } int ret_val = dumpLTO(dump, true); + PrintAndLogEx(NORMAL, ""); if (ret_val != PM3_SUCCESS) { free(dump); return ret_val; From 452ad19bb939e27a5bb76f6ed8ae540998b964fb Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 22 Oct 2020 17:44:37 +0200 Subject: [PATCH 03/14] fix https://github.com/RfidResearchGroup/proxmark3/issues/1028 --- client/src/cmdlfhid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdlfhid.c b/client/src/cmdlfhid.c index 7379d882e..18f7934d2 100644 --- a/client/src/cmdlfhid.c +++ b/client/src/cmdlfhid.c @@ -433,8 +433,6 @@ static int CmdHIDBrute(const char *Cmd) { cn_hi.OEM = arg_get_int_def(ctx, 6, 0); delay = arg_get_int_def(ctx, 7, 1000); - CLIParserFree(ctx); - if (arg_get_lit(ctx, 8) && arg_get_lit(ctx, 9)) { direction = 0; } else if (arg_get_lit(ctx, 8)) { @@ -443,6 +441,8 @@ static int CmdHIDBrute(const char *Cmd) { direction = 2; } + CLIParserFree(ctx); + if (verbose) { PrintAndLogEx(INFO, "Wiegand format#.. %i", format_idx); PrintAndLogEx(INFO, "OEM#............. %u", cn_hi.OEM); From 6ffcc827a8ec9ac01c5b28d7e7d87e34797fd030 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 22 Oct 2020 22:16:44 +0200 Subject: [PATCH 04/14] visual helptext --- client/src/cmdhf.c | 5 ++++- client/src/cmdhw.c | 1 + client/src/cmdlf.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index dcd85c5d5..db456489e 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -350,7 +350,8 @@ int CmdHFPlot(const char *Cmd) { } static command_t CommandTable[] = { - {"help", CmdHelp, AlwaysAvailable, "This help"}, + + {"--------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("High Frequency") " -----------------------"}, {"14a", CmdHF14A, AlwaysAvailable, "{ ISO14443A RFIDs... }"}, {"14b", CmdHF14B, AlwaysAvailable, "{ ISO14443B RFIDs... }"}, {"15", CmdHF15, AlwaysAvailable, "{ ISO15693 RFIDs... }"}, @@ -369,6 +370,8 @@ static command_t CommandTable[] = { {"thinfilm", CmdHFThinfilm, AlwaysAvailable, "{ Thinfilm RFIDs... }"}, {"topaz", CmdHFTopaz, AlwaysAvailable, "{ TOPAZ (NFC Type 1) RFIDs... }"}, {"waveshare", CmdHFWaveshare, AlwaysAvailable, "{ Waveshare NFC ePaper... }"}, + {"-----------", CmdHelp, AlwaysAvailable, "--------------------- " _CYAN_("General") " ---------------------"}, + {"help", CmdHelp, AlwaysAvailable, "This help"}, {"list", CmdTraceList, AlwaysAvailable, "List protocol data in trace buffer"}, {"plot", CmdHFPlot, IfPm3Hfplot, "Plot signal"}, {"tune", CmdHFTune, IfPm3Present, "Continuously measure HF antenna tuning"}, diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index 7ad1ba5b8..4acd6c8df 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -681,6 +681,7 @@ static int CmdConnect(const char *Cmd) { } static command_t CommandTable[] = { + {"-------------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("Hardware") " -----------------------"}, {"help", CmdHelp, AlwaysAvailable, "This help"}, {"connect", CmdConnect, AlwaysAvailable, "connect Proxmark3 to serial port"}, {"dbg", CmdDbg, IfPm3Present, "Set Proxmark3 debug level"}, diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 44af2b092..32d4567c6 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -1526,7 +1526,7 @@ out: } static command_t CommandTable[] = { - {"-----------", CmdHelp, AlwaysAvailable, "-------------- " _CYAN_("Direct") " --------------"}, + {"-----------", CmdHelp, AlwaysAvailable, "-------------- " _CYAN_("Low Frequency") " --------------"}, {"awid", CmdLFAWID, AlwaysAvailable, "{ AWID RFIDs... }"}, {"cotag", CmdLFCOTAG, AlwaysAvailable, "{ COTAG CHIPs... }"}, {"destron", CmdLFDestron, AlwaysAvailable, "{ FDX-A Destron RFIDs... }"}, From 18a6d3e92a545cee2a7ce78686813afa9f559f61 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 23 Oct 2020 01:24:54 +0200 Subject: [PATCH 05/14] typos --- client/luascripts/hf_mf_format.lua | 2 +- client/src/cmdhficlass.c | 6 +++--- client/src/cmdhfmf.c | 2 +- client/src/cmdlfem4x.c | 2 +- client/src/cmdlfhid.c | 2 +- client/src/proxmark3.c | 4 ++-- common/legic_prng.c | 2 +- doc/cheatsheet.md | 6 +++--- doc/cliparser.md | 2 +- doc/clocks.md | 8 ++++---- doc/cloner_notes.md | 7 ++++--- doc/colors_notes.md | 4 ++-- doc/emv_notes.md | 6 +++--- doc/fpga_arm_notes.md | 12 ++++++------ doc/loclass_notes.md | 4 ++-- doc/magic_cards_notes.md | 4 ++-- doc/md/Development/Coverity-Scan-Config-and-Run.md | 2 +- .../Linux-Installation-Instructions.md | 2 +- .../ModemManager-Must-Be-Discarded.md | 8 ++++---- doc/md/Installation_Instructions/Troubleshooting.md | 4 ++-- .../Windows-Installation-Instructions.md | 2 +- .../2_Configuration-and-Verification.md | 2 +- doc/new_frame_format.md | 2 +- doc/path_notes.md | 2 +- doc/termux_notes.md | 2 +- doc/trace_notes.md | 6 +++--- doc/uart_notes.md | 4 ++-- 27 files changed, 55 insertions(+), 54 deletions(-) diff --git a/client/luascripts/hf_mf_format.lua b/client/luascripts/hf_mf_format.lua index d949c25f2..0bde3c2d1 100644 --- a/client/luascripts/hf_mf_format.lua +++ b/client/luascripts/hf_mf_format.lua @@ -36,7 +36,7 @@ arguments = [[ -k - the current six byte key with write access -n - the new key that will be written to the card -a - the new access bytes that will be written to the card - -x - execute the commands aswell. + -x - execute the commands as well. ]] local TIMEOUT = 2000 -- Shouldn't take longer than 2 seconds diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 75c77559c..00c0010b2 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -561,7 +561,7 @@ static void mem_app_config(const picopass_hdr *hdr) { PrintAndLogEx(INFO, " Write A...... credit"); PrintAndLogEx(INFO, " Write B...... credit"); PrintAndLogEx(INFO, " Debit........ debit or credit"); - PrintAndLogEx(INFO, " redit........ credit"); + PrintAndLogEx(INFO, " Credit....... credit"); } } @@ -715,7 +715,7 @@ static int CmdHFiClassSim(const char *Cmd) { return PM3_EMALLOC; } - memset(dump, 0, datalen);//<-- Need zeroes for the EPURSE - field (offical) + memset(dump, 0, datalen);//<-- Need zeroes for the EPURSE - field (official) uint8_t i = 0; for (i = 0 ; i < NUM_CSNS ; i++) { @@ -2249,7 +2249,7 @@ static int CmdHFiClass_ReadBlock(const char *Cmd) { } if (auth == false && verbose) { - PrintAndLogEx(WARNING, "warning: no authentication used with read. Typical for cards configured toin `non-secure page`"); + PrintAndLogEx(WARNING, "warning: no authentication used with read. Typical for cards configured into `non-secure page`"); } diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 599884120..84b2a3620 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -2962,7 +2962,7 @@ out: printKeyTable(sectorsCnt, e_sector); if (use_flashmemory && found_keys == (sectorsCnt << 1)) { - PrintAndLogEx(SUCCESS, "Card dumped aswell. run " _YELLOW_("`%s %c`"), + PrintAndLogEx(SUCCESS, "Card dumped as well. run " _YELLOW_("`%s %c`"), "hf mf esave", GetFormatFromSector(sectorsCnt) ); diff --git a/client/src/cmdlfem4x.c b/client/src/cmdlfem4x.c index 671498c75..1956bc4d1 100644 --- a/client/src/cmdlfem4x.c +++ b/client/src/cmdlfem4x.c @@ -654,7 +654,7 @@ static command_t CommandTable[] = { {"4x50_dump", CmdEM4x50Dump, IfPm3EM4x50, "dump EM4x50 tag"}, {"4x50_info", CmdEM4x50Info, IfPm3EM4x50, "tag information EM4x50"}, {"4x50_write", CmdEM4x50Write, IfPm3EM4x50, "write word data to EM4x50"}, - {"4x50_write_password", CmdEM4x50WritePassword, IfPm3EM4x50, "change passwword of EM4x50 tag"}, + {"4x50_write_password", CmdEM4x50WritePassword, IfPm3EM4x50, "change password of EM4x50 tag"}, {"4x50_read", CmdEM4x50Read, IfPm3EM4x50, "read word data from EM4x50"}, {"4x50_wipe", CmdEM4x50Wipe, IfPm3EM4x50, "wipe data from EM4x50"}, {NULL, NULL, NULL, NULL} diff --git a/client/src/cmdlfhid.c b/client/src/cmdlfhid.c index 18f7934d2..893b0fc1b 100644 --- a/client/src/cmdlfhid.c +++ b/client/src/cmdlfhid.c @@ -470,7 +470,7 @@ static int CmdHIDBrute(const char *Cmd) { cn_low = cn_hi; // main loop - // iceman: could add options for bruteforcing OEM, ISSUE or FC aswell.. + // iceman: could add options for bruteforcing OEM, ISSUE or FC as well.. bool exitloop = false; bool fin_hi, fin_low; fin_hi = fin_low = false; diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 9541314aa..7554e41ca 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -502,7 +502,7 @@ static void set_my_user_directory(void) { // if not found, default to current directory if (my_user_directory == NULL) { my_user_directory = GetCurrentDir(_cwd_Buffer, sizeof(_cwd_Buffer)); - // change all slashs to / (windows should not care... + // change all slashes to / (windows should not care... for (int i = 0; i < strlen(_cwd_Buffer); i++) if (_cwd_Buffer[i] == '\\') _cwd_Buffer[i] = '/'; // my_user_directory = "."; @@ -1044,7 +1044,7 @@ int main(int argc, char *argv[]) { InitGraphics(argc, argv, script_cmds_file, script_cmd, stayInCommandLoop); MainGraphics(); # else - // for *nix distro's, check enviroment variable to verify a display + // for *nix distro's, check environment variable to verify a display char *display = getenv("DISPLAY"); if (display && strlen(display) > 1) { InitGraphics(argc, argv, script_cmds_file, script_cmd, stayInCommandLoop); diff --git a/common/legic_prng.c b/common/legic_prng.c index ad16d28b7..35ca4c6de 100644 --- a/common/legic_prng.c +++ b/common/legic_prng.c @@ -24,7 +24,7 @@ static struct lfsr { // * someone mentioned iv must be ODD. // Hack: // Now we have a special case with iv == 0 -// it sets b to 0 aswell to make sure we get a all zero keystream out +// it sets b to 0 as well to make sure we get a all zero keystream out // which is used in the initialisation phase sending the IV // void legic_prng_init(uint8_t iv) { diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index cfbb57a5d..a239b6af4 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -1,7 +1,7 @@ # Command Cheat Sheet -|Generic|Low Frequence 125 kHz|High Frequence 13.56 MHz| +|Generic|Low Frequency 125 kHz|High Frequency 13.56 MHz| |---|---|---| |[Generic](#Generic)|[T55XX](#T55XX)|[MIFARE](#MIFARE)| |[Data](#Data)|[HID Prox](#HID-Prox)|[iCLASS](#iCLASS)| @@ -324,7 +324,7 @@ pm3 --> script run hf_mf_uidbruteforce -s 0x11223344556677 -e 0x11223344556679 - ## Wiegand manipulation ^[Top](#top) -List all available weigand formats in client +List all available wiegand formats in client ``` pm3 --> wiegand list ``` @@ -592,7 +592,7 @@ Options -k The current six byte key with write access -n The new key that will be written to the card -a The new access bytes that will be written to the card --x Execute the commands aswell +-x Execute the commands as well pm3 --> script run hf_mf_format -k FFFFFFFFFFFF -n FFFFFFFFFFFF -x ``` diff --git a/doc/cliparser.md b/doc/cliparser.md index 9dcab7867..1f28b9f82 100644 --- a/doc/cliparser.md +++ b/doc/cliparser.md @@ -25,7 +25,7 @@ And then it fell into silence since it wasn't well documented how to use the cli Fast forward today, where more commands has used the cliparser but it still wasn't the natural way when adding a new client command to the Proxmark3 client. After more discussions among @doegox, @iceman1001 and @mrwalker the concept became more clear on how to use the cliparser lib in the _preferred_ way. -The aftermath was a design and layout specified which lead to a simpler implementation of the cliparser in the client source code while still unifiy all helptexts with the new colours support and a defined layout. As seen below, the simplicity and clearness. +The aftermath was a design and layout specified which lead to a simpler implementation of the cliparser in the client source code while still unifying all helptexts with the new colours support and a defined layout. As seen below, the simplicity and clearness. ![sample of new style helptext](http://www.icedev.se/proxmark3/helptext.png) diff --git a/doc/clocks.md b/doc/clocks.md index 098315fc6..c1d046f06 100644 --- a/doc/clocks.md +++ b/doc/clocks.md @@ -92,7 +92,7 @@ About 1 us precision * `void StartCountUS(void)` * `uint32_t RAMFUNC GetCountUS(void)` -Use two chainer timers TC0 and TC1. +Use two chained timers TC0 and TC1. TC0 runs at 1.5 MHz and TC1 is clocked when TC0 reaches 0xC000. Maximal value: 0x7fffffff = 2147 s @@ -110,13 +110,13 @@ About 1 cycle of 13.56 MHz? precision * `uint32_t RAMFUNC GetCountSspClk(void)` * `uint32_t RAMFUNC GetCountSspClkDelta(uint32_t start)` <= **TODO** could be used more often -Use two chainer timers TC0 and TC1. +Use two chained timers TC0 and TC1. TC0 runs at SSP_CLK from FPGA (13.56 MHz?) and TC1 is clocked when TC0 loops. Usage: * for iso14443 commands to count field cycles -* Also usable with FPGA in LF mode ?? cf `armsrc/legicrfsim.c` SSP Clock is clocked by the FPGA at 212 kHz (subcarrier frequency) +* Also usable with FPGA in LF mode ?? cf `armsrc/legicrfsim.c` SSP Clock is clocked by the FPGA at 212 kHz (sub-carrier frequency) Can't be used at the same time as CountUS or Ticks functions. @@ -133,7 +133,7 @@ cf `armsrc/ticks.c` * `void WaitMS(uint32_t ms)` * `void StopTicks(void)` <= **TODO** why a stop for this timer and not for CountUS / CountSspClk ? -Use two chainer timers TC0 and TC1. +Use two chained timers TC0 and TC1. TC0 runs at 1.5 MHz and TC1 is clocked when TC0 loops. Maximal value: 0xffffffff = 2863 s (but don't use high value with WaitTicks else you'll trigger WDT) diff --git a/doc/cloner_notes.md b/doc/cloner_notes.md index b57a4faf8..2802f4494 100644 --- a/doc/cloner_notes.md +++ b/doc/cloner_notes.md @@ -1,12 +1,13 @@ -# Notes on Cloner gunes +# Notes on Cloner guns This document is based mostly on information posted on http://www.proxmark.org/forum/viewtopic.php?pid=39903#p39903 +- [Notes on Cloner guns](#notes-on-cloner-guns) - [Blue and black cloners](#blue-and-black-cloners) - [White cloner (pre 2015)](#white-cloner-pre-2015) - [White cloner (after 2016)](#white-cloner-after-2016) - [White cloner (after 2016 D Quality)](#white-cloner-after-2016-d-quality) -- [restore page1 data](#restore-page1-data) +- [Restore page1 data](#restore-page1-data) - [Sniffing the comms](#sniffing-the-comms) @@ -67,7 +68,7 @@ If t55xx write b 2 d 2D782308 1 The T55x7 protocol uses a pwm based protocol for writing to tags. In order to make decoding easier try the new command as seen below instead. It will try to extract the data written. ``` --- after threshold limit 20 is triggred, skip 10000 samples before collecting samples. +-- after threshold limit 20 is triggered, skip 10000 samples before collecting samples. lf config s 10000 t 20 lf t55xx sniff diff --git a/doc/colors_notes.md b/doc/colors_notes.md index 7756addd9..c06a584e1 100644 --- a/doc/colors_notes.md +++ b/doc/colors_notes.md @@ -10,13 +10,13 @@ The client should autodetect color support when starting. You can also use the command `pref show` to see and set your personal setting. -Why use colors in the Proxmark client? When evertyhing is white it is hard to extract the important information fast. You also need new-lines for extra space to be easier to read. +Why use colors in the Proxmark client? When everything is white it is hard to extract the important information fast. You also need new-lines for extra space to be easier to read. We have gradually been introducing this color scheme into the client since we got decent color support on all systems: OSX, Linux, WSL, Proxspace. ## style/color ^[Top](#top) -The following definition has be crystalized out from these experiments. Its not set in stone yet so take this document as a guideline for how to create unified system scheme. +The following definition has be crystallized out from these experiments. Its not set in stone yet so take this document as a guideline for how to create unified system scheme. ### Definition ^[Top](#top) diff --git a/doc/emv_notes.md b/doc/emv_notes.md index a289d8ea5..2766e6761 100644 --- a/doc/emv_notes.md +++ b/doc/emv_notes.md @@ -5,7 +5,7 @@ - Get ATR|ATS - Get AID by PSE (`emv pse`) -- Get AID by appliation list (`emv search`) +- Get AID by application list (`emv search`) - Select application (`emv select`) - Format PDOL (look at next part) - Execute GPO (`emv gpo` this step and format PDOL) @@ -27,7 +27,7 @@ - Get ATR|ATS - Get AID by PSE (`emv pse`) -- Get AID by appliation list (`emv search`) +- Get AID by application list (`emv search`) - Select application (`emv select`) - Format PDOL (look at next part) - Execute GPO (`emv gpo` this step and format PDOL) @@ -62,7 +62,7 @@ It works for VISA(r) and Mastercard(r) transactions. It may work with other EMV ^[Top](#top) MSD - Magnetic Stripe mode -VSDC - contact transacion +VSDC - contact transaction qVSDC - contactless transaction ### Mastercard(r) transactions diff --git a/doc/fpga_arm_notes.md b/doc/fpga_arm_notes.md index 6aa5b0453..15a09057a 100644 --- a/doc/fpga_arm_notes.md +++ b/doc/fpga_arm_notes.md @@ -34,7 +34,7 @@ LF analog path (MCP6294 opamp. This has a GBW of 10 MHz), all 'slow' signals. ## FPGA -Since the SPARTAN II is a old outdated FPGA, thus is very limited resource there was a need to split LF and HF functionality into two seperate FPGA images. Which are stored in ARM flash memory as bitstreams. +Since the SPARTAN II is a old outdated FPGA, thus is very limited resource there was a need to split LF and HF functionality into two separate FPGA images. Which are stored in ARM flash memory as bitstreams. We swap between these images by flashing fpga from ARM on the go. It takes about 1sec. Hence its usually a bad idea to program your device to continuously execute LF alt HF commands. @@ -43,7 +43,7 @@ The FPGA images is precompiled and located inside the /fpga folder. - fpga_lf.bit There is very rarely changes to the images so there is no need to setup a fpga tool chain to compile it yourself. -Since the FPGA is very old, the Xilinix WebPack ISE 10.1 is the last working tool chain. You can download this legacy development on xilinix and register for a free product installation id. +Since the FPGA is very old, the Xilinx WebPack ISE 10.1 is the last working tool chain. You can download this legacy development on Xilinx and register for a free product installation id. Or use mine `11LTAJ5ZJK3PXTUBMF0C0J6C4` The package to download is about 7Gb and linux based. Though I recently managed to install it on WSL for Windows 10. In order to save space, these fpga images are LZ4 compressed and included in the fullimage.elf file when compiling the ARM SRC. `make armsrc` @@ -131,7 +131,7 @@ it into the memory of the FPGA. This gives some major advantages: The FPGA has two main tasks. The first task is to demodulate the signal received from the ADC and relay this as a digital encoded signal to the ARM. Depending on the task this might be the demodulation of a -100% Amplitude Shift Keying (ASK) signal from the reader or the load modulation of a card. The encodin +100% Amplitude Shift Keying (ASK) signal from the reader or the load modulation of a card. The encoding schemes used to communicate the signal to the ARM are Modified Miller for the reader and Manchester encoding for the card signal. @@ -153,10 +153,10 @@ these samples. When the Proxmark is in sniffing mode this is done for both the M Miller at the same time. Whenever one of the decoding procedures returns a valid message, this message is stored in another buffer (BigBuf) and both decoding procedures are set to an un-synced state. The BigBuf is limited to the available memory on the ARM. The current firmware has 2 KB of memory -reserved for traces (Besides the tracethe buffer also stores some temporary data that is needed in the +reserved for traces (Besides the trace, the buffer also stores some temporary data that is needed in the processing). When the BigBuf buffer is full the function normally returns. A new function call from the client is needed to download the BigBuf contents to the computer. The BigBuf is especially useful for -ptocol investigation. Every single message is stored in this buffer. When a card is emulated or when the +protocol investigation. Every single message is stored in this buffer. When a card is emulated or when the Proxmark is used as a reader the BigBuf can be used to store status messages or protocol exceptions. ``` @@ -226,7 +226,7 @@ is the master). The ARM connects to the outside world over USB. ## FPGA purpose -Digtal signal processing. +Digital signal processing. In short, apply low pass / hi pass filtering, peak detect, correlate signal meaning IQ pair collecting. IQ means measure at In-phase and 90 phase shift later Quadrature-phase, with IQ samples you can plot the signal on a vector plan. diff --git a/doc/loclass_notes.md b/doc/loclass_notes.md index 2684ae433..643e0d84e 100644 --- a/doc/loclass_notes.md +++ b/doc/loclass_notes.md @@ -2,7 +2,7 @@ This document is primarily intended for understanding `hf iclass loclass` and files used with it. -LOCLASS aim is to recoved the used masterkey for that specific reader configued in Elite mode / High Security mode. +LOCLASS aim is to recover the used masterkey for that specific reader configured in Elite mode / High Security mode. LOCLASS, is a two part attack. First is the online part where you gather needed information from the reader by presenting a carefully selected CSN and save the responses to file. For the first part you run `hf iclass sim 2` and take notice of the saved filename. @@ -23,4 +23,4 @@ This test mode uses two files. - `iclass_dump.bin` this is a sample file from `hf iclass sim 2`, with complete keytable recovery, using 128 carefully selected CSN and the file contains the MAC results from reader. - `iclass_key.bin` - this is file shall contain the legacy masterkey, AA1 key. loclass uses it to verify that permution / reversing / generation of key is correct. \ No newline at end of file + this is file shall contain the legacy masterkey, AA1 key. loclass uses it to verify that permutation / reversing / generation of key is correct. \ No newline at end of file diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 9b71e52c0..23ab192a2 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -267,7 +267,7 @@ Android compatible * some cards use a fix "08" or "18" in anticollision, no matter the block0. Including all 7b. * BCC: * some cards play blindly the block0 BCC byte, beware! - * some cards compute a proper BCC in anticollision. Including all 7b comuting their BCC0 and BCC1. + * some cards compute a proper BCC in anticollision. Including all 7b computing their BCC0 and BCC1. * ATS: * some cards don't reply to RATS * some reply with an ATS @@ -363,7 +363,7 @@ Initial UID is AA55C396 ### Identify -Only possible before personalisation. +Only possible before personalization. ``` hf 14a info diff --git a/doc/md/Development/Coverity-Scan-Config-and-Run.md b/doc/md/Development/Coverity-Scan-Config-and-Run.md index 85e9cdbef..da510c022 100644 --- a/doc/md/Development/Coverity-Scan-Config-and-Run.md +++ b/doc/md/Development/Coverity-Scan-Config-and-Run.md @@ -1,6 +1,6 @@ ## Coverity Scan Config & Run -Download the Coverity Scan Self-buld and install it. +Download the Coverity Scan Self-build and install it. You will need to configure ARM-NON-EABI- Compiler for it to use: Configure diff --git a/doc/md/Installation_Instructions/Linux-Installation-Instructions.md b/doc/md/Installation_Instructions/Linux-Installation-Instructions.md index b39dc7eab..18164398a 100644 --- a/doc/md/Installation_Instructions/Linux-Installation-Instructions.md +++ b/doc/md/Installation_Instructions/Linux-Installation-Instructions.md @@ -73,7 +73,7 @@ git clone https://github.com/RfidResearchGroup/proxmark3.git # Check ModemManager ### ⚠️ Very important ⚠️ -make sure ModemManager will not interfer, otherwise it could brick your Proxmark3! +make sure ModemManager will not interfere, otherwise it could brick your Proxmark3! Read carefully [this page about ModemManager](ModemManager-Must-Be-Discarded.md) and follow its instructions. # Check connection diff --git a/doc/md/Installation_Instructions/ModemManager-Must-Be-Discarded.md b/doc/md/Installation_Instructions/ModemManager-Must-Be-Discarded.md index 23ae480cc..7025da4d3 100644 --- a/doc/md/Installation_Instructions/ModemManager-Must-Be-Discarded.md +++ b/doc/md/Installation_Instructions/ModemManager-Must-Be-Discarded.md @@ -8,7 +8,7 @@ ModemManager is pre-installed on many different Linux distributions, very probab It's intended to prepare and configure the mobile broadband (2G/3G/4G) devices, whether they are built-in or dongles. Some are serial, so when the Proxmark3 is plugged and a `/dev/ttyACM0` appears, ModemManager attempts to talk to it to see if it's a modem replying to AT commands. -Now imagine what happens when you're flashing your Proxmark3 and ModemManager suddently starts sending bytes to it at the same time... +Now imagine what happens when you're flashing your Proxmark3 and ModemManager suddenly starts sending bytes to it at the same time... Yes it makes the flashing failing. And if it happens while you're flashing the bootloader, it will require a JTAG device to unbrick the Proxmark3. ModemManager is a threat for the Proxmark3, but also for many other embedded devices, such as some Arduino platforms. @@ -35,7 +35,7 @@ sudo systemctl disable ModemManager # Solution 3: use filtering udev rules -If you *really* need ModemManager, e.g. for your 4G device, you'll have to use some filtering rules to make sure it doesn't interfer with the Proxmark3. +If you *really* need ModemManager, e.g. for your 4G device, you'll have to use some filtering rules to make sure it doesn't interfere with the Proxmark3. Once you have cloned the Proxmark3 repository, you can run `make udev` to install udev rules that will tell ModemManager to not look at your Proxmark3. @@ -89,7 +89,7 @@ sudo journalctl -f|grep "ModemManager.*\[filter\]" ``` Now plug in the Proxmark 3. -If ModemManager interfers, you'll get logs like this: +If ModemManager interferes, you'll get logs like this: ``` ModemManager[xxxxx]: [filter] (tty/ttyACM0): port allowed: cdc-acm interface reported AT-capable ``` @@ -108,7 +108,7 @@ sudo mmcli -G ERR # I didn't read carefully this page and now my Proxmark3 is not responding -First of all, follow the instructions above to make sure ModemManager will not interfer with the Proxmark3 anymore. +First of all, follow the instructions above to make sure ModemManager will not interfere with the Proxmark3 anymore. Now there are two possibilities: diff --git a/doc/md/Installation_Instructions/Troubleshooting.md b/doc/md/Installation_Instructions/Troubleshooting.md index 17161ed09..f70db78a8 100644 --- a/doc/md/Installation_Instructions/Troubleshooting.md +++ b/doc/md/Installation_Instructions/Troubleshooting.md @@ -66,7 +66,7 @@ Another possibility is if, when using the button for entering bootloader mode, t ### Determine if the bootloader was damaged or only the main OS image -Unplug, press the Proxmark3 button and keep it pressed when you plug it on USB. If the red LEDs show a "off/on/off/on" pattern, you're goot, you manually entered into the bootloader mode. +Unplug, press the Proxmark3 button and keep it pressed when you plug it on USB. If the red LEDs show a "off/on/off/on" pattern, you're good, you manually entered into the bootloader mode. On new bootloaders, you can release the button. If the pattern disappears, you're on an older bootloader and you've to do it again and keep the button pressed during all the flashing operation. Once in bootloader mode, flash the main image. @@ -200,7 +200,7 @@ brew remove proxmark3 brew reinstall proxmark3 ``` -On Ubuntu 16.04 (xenial) you should either conside a later release or you can install a later toolchain. +On Ubuntu 16.04 (xenial) you should either consider a later release or you can install a later toolchain. sample error output: diff --git a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md index bcef291cf..ea0505268 100644 --- a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md +++ b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md @@ -150,7 +150,7 @@ Note that it may take a quite long time for a freshly plugged Proxmark3 to be vi Now you're ready to follow the [compilation instructions](/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md). ## Color text on windows 10 -In later versions of windows 10 you may be able to get color to work by setting this registery key +In later versions of windows 10 you may be able to get color to work by setting this registry key ``` [HKEY_CURRENT_USER\Console] "VirtualTerminalLevel"=dword:00000001 diff --git a/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md b/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md index b1c79e27d..a5d9b2975 100644 --- a/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md +++ b/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md @@ -25,7 +25,7 @@ Set all t55xx settings to defaults (will set all 4 at once) To make sure you got the latest sim module firmware. -_Lastest version is v3.11_ +_Latest version is v3.11_ ``` [usb] pm3 --> hw status diff --git a/doc/new_frame_format.md b/doc/new_frame_format.md index c16aee939..6075fb2c9 100644 --- a/doc/new_frame_format.md +++ b/doc/new_frame_format.md @@ -190,7 +190,7 @@ Meanwhile, a fast transition to MIX frames can be done with: ## Bootrom Bootrom code will still use the old frame format to remain compatible with other repos supporting the old format and because it would hardly gain anything from the new format: -* almost all frames convey 512b of payload, so difference in overhead is neglictible +* almost all frames convey 512b of payload, so difference in overhead is negligible * bringing flash over usart sounds risky and would be terribly slow anyway (115200 bauds vs. 7M bauds). `SendCommandBL` is the same as `SendCommandOLD` with a different name to be sure not to migrate it. diff --git a/doc/path_notes.md b/doc/path_notes.md index 556780f54..76c3f7a1a 100644 --- a/doc/path_notes.md +++ b/doc/path_notes.md @@ -67,7 +67,7 @@ Dictionaries used by the client will be copied to Here you find the default dictionaries used for commands like `hf mf chk`, `hf mf fchk`, `lf t55xx chk` A dictionary file is a text based file with one key per line in hexdecimal form. The length of the key is decided by the Proxmark3 client for the different commands. All chars afterwards on line is ignored. -if key isn't a hex number, the key is igonored. +if key isn't a hex number, the key is ignored. - t55xx, Mifare Ultralight/NTAG - uses 4 hexbytes (11223344) - Mifare classic uses 6 hexbytes (112233445566) diff --git a/doc/termux_notes.md b/doc/termux_notes.md index c90e60e32..77d542eac 100644 --- a/doc/termux_notes.md +++ b/doc/termux_notes.md @@ -181,7 +181,7 @@ Install [this free app](https://play.google.com/store/apps/details?id=masar.bb) ^[Top](#top) You need to pair the proxmark3 in the Android settings. -In the app choose your registred PM3 device as 'device A'. +In the app choose your registered PM3 device as 'device A'. Select TCP server as 'Device B' and choose an unused port (e.g. 4321). Ensure 'Retransmission' is set to 'both ways'. diff --git a/doc/trace_notes.md b/doc/trace_notes.md index a95285518..515255053 100644 --- a/doc/trace_notes.md +++ b/doc/trace_notes.md @@ -17,7 +17,7 @@ With `trace list` a table is shown which gives timing information, the src of th ### Timing ^[Top](#top) -The Start and the End coloumn lists timestamps when the transmission of the shown data started (time of first bit) and when it ended (end of last modulation). +The Start and the End column lists timestamps when the transmission of the shown data started (time of first bit) and when it ended (end of last modulation). The unit for this time information depends on the protocol in use: @@ -29,7 +29,7 @@ The unit for this time information depends on the protocol in use: * iClass, ISO15693, ISO18092 and FeliCa have no accurate timing information at the moment * For others timing is not available -By specifing the option ```f``` (e.g. ```trace list 14a f```) the frame delay times are shown. (So you don't have to do the math by your own). +By specifying the option ```f``` (e.g. ```trace list 14a f```) the frame delay times are shown. (So you don't have to do the math by your own). ### Sources ^[Top](#top) @@ -39,7 +39,7 @@ If the data is marked as a response the source is shown as Tag. Otherwise it is ### Data ^[Top](#top) -This coloumn show the raw bytes trasmitted over the air. With option ```c``` CRC bytes are marked in square brackets. +This column shows the raw bytes transmitted over the air. With option ```c``` CRC bytes are marked in square brackets. ### CRC ^[Top](#top) diff --git a/doc/uart_notes.md b/doc/uart_notes.md index 88b10a109..d34ed1a6d 100644 --- a/doc/uart_notes.md +++ b/doc/uart_notes.md @@ -28,7 +28,7 @@ USART support is in `common/usart.c`. There are mainly two ways to use this USART: * connect the host client to the Proxmark3 via this USART instead of USB-CDC, this is the `FPC_USART_HOST` option you can add to `PLATFORM_EXTRAS` in `Makefile.platform`. The most used way is through the BT add-on (blue shark) that we will cover later. Instead of BT add-on, we can also use e.g. a FTDI cable (mostly for internal development, it's much slower than USB-CDC anyway) or in the future other ways to connect the host such as a USART-to-Wi-Fi bridge. -* connect "slave" devices to the Proxmark3 to add functionnalities. In such case, the host client will use USB-CDC and the USART will be use to, e.g. connect the Proxmark3 to various daughterboards. These is no such example of daughterboard as of today, except when we're talking to the BT add-on in its AT configuration mode. +* connect "slave" devices to the Proxmark3 to add functionalities. In such case, the host client will use USB-CDC and the USART will be use to, e.g. connect the Proxmark3 to various daughterboards. These is no such example of daughterboard as of today, except when we're talking to the BT add-on in its AT configuration mode. This USART can be reached from the host client (if connected via USB-CDC) through the following commands, available when you add `FPC_USART_DEV` to `PLATFORM_EXTRAS` in `Makefile.platform`: * `usart config`, to configure the baudrate and the parity of the Proxmark3 USART @@ -63,7 +63,7 @@ The add-on acts as a bridge, between its UART and the BT communication channel, The Bluetooth RFCOMM protocol provides an emulation of serial ports over the L2CAP protocol ([ref](https://www.amd.e-technik.uni-rostock.de/ma/gol/lectures/wirlec/bluetooth_info/rfcomm.html)). -As for USB-CDC, the real speed of the link is unrelated to serial baudrate notion. Litterature mentions a maximal value of 360kbps for some implementations, but the HC-06 Bluetooth module within the BT add-on is limited as the vast majority of similar devices to 128kbps. +As for USB-CDC, the real speed of the link is unrelated to serial baudrate notion. Literature mentions a maximal value of 360kbps for some implementations, but the HC-06 Bluetooth module within the BT add-on is limited as the vast majority of similar devices to 128kbps. ### BT add-on baudrate From ceb709a5122e88c41d2aa832b14f8c5345da06b3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 23 Oct 2020 01:31:33 +0200 Subject: [PATCH 06/14] typos --- client/src/cmdhf.c | 4 ++-- client/src/cmdlf.c | 4 ++-- doc/bt_manual_v10.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index db456489e..7d462cb6b 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -57,7 +57,7 @@ static int usage_hf_search(void) { } static int usage_hf_sniff(void) { - PrintAndLogEx(NORMAL, "The high frequence sniffer will assign all available memory on device for sniffed data"); + PrintAndLogEx(NORMAL, "The high frequency sniffer will assign all available memory on device for sniffed data"); PrintAndLogEx(NORMAL, "Use " _YELLOW_("'data samples'")" command to download from device, and " _YELLOW_("'data plot'")" to look at it"); PrintAndLogEx(NORMAL, "Press button to quit the sniffing.\n"); PrintAndLogEx(NORMAL, "Usage: hf sniff "); @@ -357,7 +357,7 @@ static command_t CommandTable[] = { {"15", CmdHF15, AlwaysAvailable, "{ ISO15693 RFIDs... }"}, // {"cryptorf", CmdHFCryptoRF, AlwaysAvailable, "{ CryptoRF RFIDs... }"}, {"epa", CmdHFEPA, AlwaysAvailable, "{ German Identification Card... }"}, - {"felica", CmdHFFelica, AlwaysAvailable, "{ ISO18092 / Felica RFIDs... }"}, + {"felica", CmdHFFelica, AlwaysAvailable, "{ ISO18092 / FeliCa RFIDs... }"}, {"fido", CmdHFFido, AlwaysAvailable, "{ FIDO and FIDO2 authenticators... }"}, {"iclass", CmdHFiClass, AlwaysAvailable, "{ ICLASS RFIDs... }"}, {"legic", CmdHFLegic, AlwaysAvailable, "{ LEGIC RFIDs... }"}, diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 32d4567c6..77dda02f1 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -113,7 +113,7 @@ static int usage_lf_read(void) { return PM3_SUCCESS; } static int usage_lf_sim(void) { - PrintAndLogEx(NORMAL, "Simulate low frequence tag from graphbuffer."); + PrintAndLogEx(NORMAL, "Simulate low frequency tag from graphbuffer."); PrintAndLogEx(NORMAL, "Usage: lf sim [h] "); PrintAndLogEx(NORMAL, "Options:"); PrintAndLogEx(NORMAL, " h This help"); @@ -126,7 +126,7 @@ static int usage_lf_sim(void) { return PM3_SUCCESS; } static int usage_lf_sniff(void) { - PrintAndLogEx(NORMAL, "Sniff low frequence signal."); + PrintAndLogEx(NORMAL, "Sniff low frequency signal."); PrintAndLogEx(NORMAL, "Usage: lf sniff [h] [q] [s #samples] [@]"); PrintAndLogEx(NORMAL, "Options:"); PrintAndLogEx(NORMAL, " h This help"); diff --git a/doc/bt_manual_v10.md b/doc/bt_manual_v10.md index 22db91322..bdc371250 100644 --- a/doc/bt_manual_v10.md +++ b/doc/bt_manual_v10.md @@ -269,7 +269,7 @@ See instructions above (method 1) for initial pairing. #### 5.3.1 Connecting rdv4.0 with Bluetooth on MacOS ^[Top](#top) -With MacOS Mojave 10.14.5 you could experience some continuosly disconnecting and difficult to recconnect the device at the system wakeup, to avoid this problem do a PRAM reset before to add your Proxmark3 RDV4 Blue Shark: +With MacOS Mojave 10.14.5 you could experience some continuously disconnecting and difficult to reconnect the device at the system wakeup, to avoid this problem do a PRAM reset before to add your Proxmark3 RDV4 Blue Shark: 1. Open a Terminal and execute this command: sudo rm -R /Library/Preferences/com.apple.Bluetooth.plist. 2. Shut down your Mac. From 34148b0383c3ac1328356409d478c165f636236d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 23 Oct 2020 10:00:47 +0200 Subject: [PATCH 07/14] fix https://github.com/RfidResearchGroup/proxmark3/issues/1029 --- armsrc/iso15693.c | 5 +++++ client/src/cmdhf15.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index bacceb165..5861b3d17 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -1708,6 +1708,11 @@ void SimTagIso15693(uint8_t *uid) { bool exit_loop = false; while (exit_loop == false) { + + button_pressed = BUTTON_PRESS(); + if (button_pressed || data_available()) + break; + WDT_HIT(); // find reader field diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 6d276617c..0129dbaf5 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -1116,13 +1116,13 @@ static int CmdHF15Sim(const char *Cmd) { CLIGetHexWithReturn(ctx, 1, payload.uid, &uidlen); CLIParserFree(ctx); - if (uidlen != 9) { + if (uidlen != 8) { PrintAndLogEx(WARNING, "UID must include 16 HEX symbols"); return PM3_EINVARG; } PrintAndLogEx(SUCCESS, "Starting simulating UID " _YELLOW_("%s"), iso15693_sprintUID(NULL, payload.uid)); - PrintAndLogEx(INFO, "press " _YELLOW_("`enter`") " to cancel"); + PrintAndLogEx(INFO, "press " _YELLOW_("`Pm3 button`") " to cancel"); PacketResponseNG resp; clearCommandBuffer(); From f11bc85a344c58a5b7a788ac5abe69e9c49f1ed3 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 24 Oct 2020 00:23:05 +0200 Subject: [PATCH 08/14] no spaces --- client/src/cmdhflist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index dff2b6345..fb3cb3c97 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -419,7 +419,7 @@ void annotateIclass(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, bool uint8_t key[8]; if (check_known_default(csn, epurse, rmac, tmac, key)) { - snprintf(exp, size, "( " _GREEN_("%s") ")", sprint_hex(key, 8)); + snprintf(exp, size, "( " _GREEN_("%s") " )", sprint_hex_inrow(key, 8)); } curr_state = PICO_NONE; } From 21bc3b88227ea9e2c5be1e73d8c6279ca051d3a3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 24 Oct 2020 01:18:06 +0200 Subject: [PATCH 09/14] typos --- armsrc/em4x50.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/armsrc/em4x50.c b/armsrc/em4x50.c index 9ab8dcf35..27f5a08d9 100644 --- a/armsrc/em4x50.c +++ b/armsrc/em4x50.c @@ -476,7 +476,7 @@ static bool find_double_listen_window(bool bcommand) { // data transmission from card has to be stopped, because // a commamd shall be issued - // unfortunately the posititon in listen window (where + // unfortunately the position in listen window (where // command request has to be sent) has gone, so if a // second window follows - sync on this to issue a command @@ -522,7 +522,7 @@ static bool find_em4x50_tag(void) { static bool request_receive_mode(void) { // To issue a command we have to find a listen window first. - // Because identification and sychronization at the same time is not + // Because identification and synchronization at the same time is not // possible when using pulse lengths a double listen window is used. bool bcommand = true; return find_double_listen_window(bcommand); @@ -559,7 +559,7 @@ static bool check_ack(bool bliw) { // "bit" of listen window) wait_timer(FPGA_TIMER_0, T0 * 2 * EM4X50_T_TAG_FULL_PERIOD); - // check for listen window (if first bit cannot be inerpreted + // check for listen window (if first bit cannot be interpreted // as a valid bit it must belong to a listen window) if (get_next_bit() == EM4X50_BIT_OTHER) { @@ -730,7 +730,7 @@ static bool standard_read(int *now) { int fwr = *now; uint8_t bits[EM4X50_TAG_WORD] = {0}; - // start with the identification of two succsessive listening windows + // start with the identification of two successive listening windows if (find_double_listen_window(false)) { // read and save words until following double listen window is detected @@ -884,7 +884,7 @@ static int write(uint8_t word[4], uint8_t address) { // send data em4x50_send_word(word); - if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occured + if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occurred reply_ng(CMD_LF_EM4X50_WRITE, PM3_ETEAROFF, NULL, 0); return PM3_ETEAROFF; } else { @@ -923,7 +923,7 @@ static int write_password(uint8_t password[4], uint8_t new_password[4]) { // send address data em4x50_send_word(password); - if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occured + if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occurred reply_ng(CMD_LF_EM4X50_WRITE, PM3_ETEAROFF, NULL, 0); return PM3_ETEAROFF; } else { @@ -1021,7 +1021,7 @@ void em4x50_write(em4x50_data_t *etd) { void em4x50_write_password(em4x50_data_t *etd) { - // sinmple change of password + // simple change of password bool bsuccess = false; @@ -1073,7 +1073,7 @@ void em4x50_wipe(em4x50_data_t *etd) { // to verify result reset EM4x50 if (reset()) { - // login not necessary because protectd word has been set to 0 + // login not necessary because protected word has been set to 0 // -> no read protected words // -> selective read can be called immediately if (selective_read(addresses)) { From fcc70f7536900477351e12eeff357fe68c6e78d0 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 24 Oct 2020 01:18:45 +0200 Subject: [PATCH 10/14] Add continuous mode for hf 14a reader --- client/src/cmdhf14a.c | 146 +++++++++++++++++++++++++++--------------- 1 file changed, 95 insertions(+), 51 deletions(-) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 00b7d9484..981b4417b 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -27,6 +27,10 @@ #include "crc16.h" #include "util_posix.h" // msclock #include "aidsearch.h" +#include "proxgui.h" +#include "cmddata.h" +#include "graph.h" +#include "fpga.h" bool APDUInFramingEnable = true; @@ -265,6 +269,7 @@ static int usage_hf_14a_reader(void) { PrintAndLogEx(NORMAL, " s silent (no messages)"); PrintAndLogEx(NORMAL, " x just drop the signal field"); PrintAndLogEx(NORMAL, " 3 ISO14443-3 select only (skip RATS)"); + PrintAndLogEx(NORMAL, " @ continuous mode. Updates hf plot as well"); return PM3_SUCCESS; } @@ -475,9 +480,9 @@ int Hf14443_4aGetCardData(iso14a_card_select_t *card) { static int CmdHF14AReader(const char *Cmd) { uint32_t cm = ISO14A_CONNECT; - bool disconnectAfter = true, silent = false; + bool disconnectAfter = true, silent = false, continuous = false; int cmdp = 0; - + int res = PM3_SUCCESS; while (param_getchar(Cmd, cmdp) != 0x00) { switch (tolower(param_getchar(Cmd, cmdp))) { case 'h': @@ -494,6 +499,9 @@ static int CmdHF14AReader(const char *Cmd) { case 'x': cm &= ~ISO14A_CONNECT; break; + case '@': + continuous = true; + break; default: PrintAndLogEx(WARNING, "Unknown command."); return PM3_EINVARG; @@ -503,60 +511,96 @@ static int CmdHF14AReader(const char *Cmd) { if (!disconnectAfter) cm |= ISO14A_NO_DISCONNECT; - - clearCommandBuffer(); - SendCommandMIX(CMD_HF_ISO14443A_READER, cm, 0, 0, NULL, 0); - - if (ISO14A_CONNECT & cm) { - PacketResponseNG resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) { - if (!silent) PrintAndLogEx(WARNING, "iso14443a card select failed"); - DropField(); - return PM3_ESOFT; - } - - iso14a_card_select_t card; - memcpy(&card, (iso14a_card_select_t *)resp.data.asBytes, sizeof(iso14a_card_select_t)); - - /* - 0: couldn't read - 1: OK, with ATS - 2: OK, no ATS - 3: proprietary Anticollision - */ - uint64_t select_status = resp.oldarg[0]; - - if (select_status == 0) { - if (!silent) PrintAndLogEx(WARNING, "iso14443a card select failed"); - DropField(); - return PM3_ESOFT; - } - - if (select_status == 3) { - PrintAndLogEx(INFO, "Card doesn't support standard iso14443-3 anticollision"); - PrintAndLogEx(SUCCESS, "ATQA: %02x %02x", card.atqa[1], card.atqa[0]); - DropField(); - return PM3_ESOFT; - } - - PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(card.uid, card.uidlen)); - PrintAndLogEx(SUCCESS, "ATQA: " _GREEN_("%02x %02x"), card.atqa[1], card.atqa[0]); - PrintAndLogEx(SUCCESS, " SAK: " _GREEN_("%02x [%" PRIu64 "]"), card.sak, resp.oldarg[0]); - - if (card.ats_len >= 3) { // a valid ATS consists of at least the length byte (TL) and 2 CRC bytes - PrintAndLogEx(SUCCESS, " ATS: " _GREEN_("%s"), sprint_hex(card.ats, card.ats_len)); - } - - if (!disconnectAfter) { - if (!silent) PrintAndLogEx(SUCCESS, "Card is selected. You can now start sending commands"); - } + if (continuous) { + PrintAndLogEx(INFO, "Press " _GREEN_("Enter") " to exit"); } + do { + clearCommandBuffer(); + SendCommandMIX(CMD_HF_ISO14443A_READER, cm, 0, 0, NULL, 0); + if (ISO14A_CONNECT & cm) { + PacketResponseNG resp; + if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) { + if (!silent) PrintAndLogEx(WARNING, "iso14443a card select failed"); + DropField(); + res = PM3_ESOFT; + goto plot; + } + + iso14a_card_select_t card; + memcpy(&card, (iso14a_card_select_t *)resp.data.asBytes, sizeof(iso14a_card_select_t)); + + /* + 0: couldn't read + 1: OK, with ATS + 2: OK, no ATS + 3: proprietary Anticollision + */ + uint64_t select_status = resp.oldarg[0]; + + if (select_status == 0) { + if (!silent) PrintAndLogEx(WARNING, "iso14443a card select failed"); + DropField(); + res = PM3_ESOFT; + goto plot; + } + + if (select_status == 3) { + if (!(silent && continuous)) { + PrintAndLogEx(INFO, "Card doesn't support standard iso14443-3 anticollision"); + PrintAndLogEx(SUCCESS, "ATQA: %02x %02x", card.atqa[1], card.atqa[0]); + } + DropField(); + res = PM3_ESOFT; + goto plot; + } + if (!(silent && continuous)) { + PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(card.uid, card.uidlen)); + PrintAndLogEx(SUCCESS, "ATQA: " _GREEN_("%02x %02x"), card.atqa[1], card.atqa[0]); + PrintAndLogEx(SUCCESS, " SAK: " _GREEN_("%02x [%" PRIu64 "]"), card.sak, resp.oldarg[0]); + + if (card.ats_len >= 3) { // a valid ATS consists of at least the length byte (TL) and 2 CRC bytes + PrintAndLogEx(SUCCESS, " ATS: " _GREEN_("%s"), sprint_hex(card.ats, card.ats_len)); + } + } + if (!disconnectAfter) { + if (!silent) PrintAndLogEx(SUCCESS, "Card is selected. You can now start sending commands"); + } + } +plot: + if (continuous) { + uint8_t buf[FPGA_TRACE_SIZE]; + + PacketResponseNG response; + if (!GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &response, 4000, true)) { + PrintAndLogEx(WARNING, "timeout while waiting for reply."); + return PM3_ETIMEOUT; + } + + for (size_t i = 0; i < FPGA_TRACE_SIZE; i++) { + GraphBuffer[i] = ((int)buf[i]) - 127; + } + + GraphTraceLen = FPGA_TRACE_SIZE; + + // remove signal offset + CmdHpf(""); + + setClockGrid(0, 0); + DemodBufferLen = 0; + RepaintGraphWindow(); + } + if (kbd_enter_pressed()) { + break; + } + } while (continuous); if (disconnectAfter) { if (!silent) PrintAndLogEx(INFO, "field dropped."); } - - return PM3_SUCCESS; + if (continuous) + return PM3_SUCCESS; + else + return res; } static int CmdHF14AInfo(const char *Cmd) { From 8f954ebf9db810a7903990cad0e3caf700a16fea Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 24 Oct 2020 11:56:47 +0200 Subject: [PATCH 11/14] refactor continuous mode --- client/src/cmdhf.c | 33 +++++++++++++++++++-------------- client/src/cmdhf.h | 1 + client/src/cmdhf14a.c | 38 +++++++++++++------------------------- 3 files changed, 33 insertions(+), 39 deletions(-) diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index 7d462cb6b..8249c28af 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -311,19 +311,8 @@ int CmdHFSniff(const char *Cmd) { return PM3_SUCCESS; } -int CmdHFPlot(const char *Cmd) { - CLIParserContext *ctx; - CLIParserInit(&ctx, "hf plot", - "Plots HF signal after RF signal path and A/D conversion.", - "This can be used after any hf command and will show the last few milliseconds of the HF signal.\n" - "Note: If the last hf command terminated because of a timeout you will most probably see nothing.\n"); - void *argtable[] = { - arg_param_begin, - arg_param_end - }; - CLIExecWithReturn(ctx, Cmd, argtable, true); - CLIParserFree(ctx); - +int handle_hf_plot(void) { + uint8_t buf[FPGA_TRACE_SIZE]; PacketResponseNG response; @@ -333,7 +322,7 @@ int CmdHFPlot(const char *Cmd) { } for (size_t i = 0; i < FPGA_TRACE_SIZE; i++) { - GraphBuffer[i] = ((int)buf[i]) - 127; + GraphBuffer[i] = ((int)buf[i]) - 128; } GraphTraceLen = FPGA_TRACE_SIZE; @@ -349,6 +338,22 @@ int CmdHFPlot(const char *Cmd) { return PM3_SUCCESS; } +int CmdHFPlot(const char *Cmd) { + CLIParserContext *ctx; + CLIParserInit(&ctx, "hf plot", + "Plots HF signal after RF signal path and A/D conversion.", + "This can be used after any hf command and will show the last few milliseconds of the HF signal.\n" + "Note: If the last hf command terminated because of a timeout you will most probably see nothing.\n"); + void *argtable[] = { + arg_param_begin, + arg_param_end + }; + CLIExecWithReturn(ctx, Cmd, argtable, true); + CLIParserFree(ctx); + + return handle_hf_plot(); +} + static command_t CommandTable[] = { {"--------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("High Frequency") " -----------------------"}, diff --git a/client/src/cmdhf.h b/client/src/cmdhf.h index 09af16d5e..c54fd076c 100644 --- a/client/src/cmdhf.h +++ b/client/src/cmdhf.h @@ -19,4 +19,5 @@ int CmdHFSearch(const char *Cmd); int CmdHFSniff(const char *Cmd); int CmdHFPlot(const char *Cmd); +int handle_hf_plot(void); #endif diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 981b4417b..68a324952 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -27,10 +27,8 @@ #include "crc16.h" #include "util_posix.h" // msclock #include "aidsearch.h" -#include "proxgui.h" -#include "cmddata.h" -#include "graph.h" -#include "fpga.h" +#include "cmdhf.h" // handle HF plot + bool APDUInFramingEnable = true; @@ -568,35 +566,25 @@ static int CmdHF14AReader(const char *Cmd) { } } plot: - if (continuous) { - uint8_t buf[FPGA_TRACE_SIZE]; - - PacketResponseNG response; - if (!GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &response, 4000, true)) { - PrintAndLogEx(WARNING, "timeout while waiting for reply."); - return PM3_ETIMEOUT; + if (continuous) { + res = handle_hf_plot(); + if (res != PM3_SUCCESS) { + break; } - - for (size_t i = 0; i < FPGA_TRACE_SIZE; i++) { - GraphBuffer[i] = ((int)buf[i]) - 127; - } - - GraphTraceLen = FPGA_TRACE_SIZE; - - // remove signal offset - CmdHpf(""); - - setClockGrid(0, 0); - DemodBufferLen = 0; - RepaintGraphWindow(); } + if (kbd_enter_pressed()) { break; } + } while (continuous); + if (disconnectAfter) { - if (!silent) PrintAndLogEx(INFO, "field dropped."); + if (silent == false) { + PrintAndLogEx(INFO, "field dropped."); + } } + if (continuous) return PM3_SUCCESS; else From e9b55acd009de0d99ab9dafbf5f9646543899312 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 24 Oct 2020 19:50:10 +0200 Subject: [PATCH 12/14] typos --- client/src/cmdlfem4x05.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdlfem4x05.c b/client/src/cmdlfem4x05.c index fcecec161..1c7afae67 100644 --- a/client/src/cmdlfem4x05.c +++ b/client/src/cmdlfem4x05.c @@ -591,7 +591,7 @@ int CmdEM4x05Dump(const char *Cmd) { // To flag any blocks locked we need to read blocks 14 and 15 first - // dont swap endin until we get block lock flags. + // dont swap endian until we get block lock flags. status14 = em4x05_read_word_ext(EM4305_PROT1_BLOCK, pwd, usePwd, &word); if (status14 == PM3_SUCCESS) { if ((word & 0x00008000) != 0x00) { @@ -662,7 +662,7 @@ int CmdEM4x05Dump(const char *Cmd) { } else if (card_type == EM_4X69) { // To flag any blocks locked we need to read blocks 14 and 15 first - // dont swap endin until we get block lock flags. + // dont swap endian until we get block lock flags. status14 = em4x05_read_word_ext(EM4469_PROT_BLOCK, pwd, usePwd, &word); if (status14 == PM3_SUCCESS) { if ((word & 0x00008000) != 0x00) { @@ -1951,7 +1951,7 @@ int CmdEM4x05Sniff(const char *Cmd) { // Read Word 1001 => 4 + 7 => 11 // Protect 1100 => 4 + 45 => 49 // Disable 1010 => 4 + 45 => 49 - // -> disaable 1010 11111111 0 11111111 0 11111111 0 11111111 0 00000000 0 + // -> disable 1010 11111111 0 11111111 0 11111111 0 11111111 0 00000000 0 // Check to see if we got the leading 0 if (((strncmp (bits,"00011",5) == 0)&& (bitidx == 50)) || From bc4894195158b12cd4bbb178c1cfbfd00d4a9d97 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 25 Oct 2020 01:12:20 +0200 Subject: [PATCH 13/14] fix smart card --- armsrc/i2c.c | 15 +++++++++------ client/src/cmdsmartcard.c | 15 ++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/armsrc/i2c.c b/armsrc/i2c.c index 7b858dd36..92737214a 100644 --- a/armsrc/i2c.c +++ b/armsrc/i2c.c @@ -181,7 +181,7 @@ static bool WaitSCL_L(void) { // It timeout reading response from card // Which ever comes first static bool WaitSCL_L_timeout(void) { - volatile uint32_t delay = 18000; + volatile uint32_t delay = 1800; while (delay--) { // exit on SCL LOW if (!SCL_read) @@ -219,7 +219,7 @@ static bool I2C_WaitForSim(void) { // 8051 speaks with smart card. // 1000*50*3.07 = 153.5ms // 1byte transfer == 1ms with max frame being 256bytes - if (!WaitSCL_H_delay(30 * 1000 * 50)) + if (!WaitSCL_H_delay(20 * 1000 * 50)) return false; return true; @@ -634,6 +634,9 @@ bool sc_rx_bytes(uint8_t *dest, uint8_t *destlen) { len = I2C_BufferRead(dest, *destlen, I2C_DEVICE_CMD_READ, I2C_DEVICE_ADDRESS_MAIN); + + LED_C_ON(); + if (len > 1) { break; } else if (len == 1) { @@ -667,7 +670,7 @@ bool GetATR(smart_card_atr_t *card_ptr, bool verbose) { // 1byte = 1ms , max frame 256bytes. Should wait 256ms atleast just in case. if (I2C_WaitForSim() == false) return false; - + // read bytes from module uint8_t len = sizeof(card_ptr->atr); if (sc_rx_bytes(card_ptr->atr, &len) == false) @@ -706,12 +709,12 @@ bool GetATR(smart_card_atr_t *card_ptr, bool verbose) { } void SmartCardAtr(void) { - smart_card_atr_t card; LED_D_ON(); set_tracing(true); I2C_Reset_EnterMainProgram(); - bool isOK = GetATR(&card, true); - reply_mix(CMD_ACK, isOK, sizeof(smart_card_atr_t), 0, &card, sizeof(smart_card_atr_t)); + smart_card_atr_t card; + int res = GetATR(&card, true) ? PM3_SUCCESS : PM3_ETIMEOUT; + reply_ng(CMD_SMART_ATR, res, (uint8_t*)&card, sizeof(smart_card_atr_t)); set_tracing(false); LEDsoff(); } diff --git a/client/src/cmdsmartcard.c b/client/src/cmdsmartcard.c index c6b2e66e1..906a483e7 100644 --- a/client/src/cmdsmartcard.c +++ b/client/src/cmdsmartcard.c @@ -698,13 +698,12 @@ static int CmdSmartInfo(const char *Cmd) { clearCommandBuffer(); SendCommandNG(CMD_SMART_ATR, NULL, 0); PacketResponseNG resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) { + if (!WaitForResponseTimeout(CMD_SMART_ATR, &resp, 2500)) { if (!silent) PrintAndLogEx(WARNING, "smart card select failed"); return PM3_ETIMEOUT; } - uint8_t isok = resp.oldarg[0] & 0xFF; - if (!isok) { + if (resp.status != PM3_SUCCESS) { if (!silent) PrintAndLogEx(WARNING, "smart card select failed"); return PM3_ESOFT; } @@ -771,13 +770,12 @@ static int CmdSmartReader(const char *Cmd) { clearCommandBuffer(); SendCommandNG(CMD_SMART_ATR, NULL, 0); PacketResponseNG resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) { + if (!WaitForResponseTimeout(CMD_SMART_ATR, &resp, 2500)) { if (!silent) PrintAndLogEx(WARNING, "smart card select failed"); return PM3_ETIMEOUT; } - uint8_t isok = resp.oldarg[0] & 0xFF; - if (!isok) { + if (resp.status != PM3_SUCCESS) { if (!silent) PrintAndLogEx(WARNING, "smart card select failed"); return PM3_ESOFT; } @@ -1186,14 +1184,13 @@ bool smart_select(bool silent, smart_card_atr_t *atr) { clearCommandBuffer(); SendCommandNG(CMD_SMART_ATR, NULL, 0); PacketResponseNG resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) { + if (!WaitForResponseTimeout(CMD_SMART_ATR, &resp, 2500)) { if (!silent) PrintAndLogEx(WARNING, "smart card select failed"); return false; } - uint8_t isok = resp.oldarg[0] & 0xFF; - if (!isok) { + if (resp.status != PM3_SUCCESS) { if (!silent) PrintAndLogEx(WARNING, "smart card select failed"); return false; } From 4ff8c44d85d523460fd3e7520284ebbead4b8dc9 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 25 Oct 2020 11:23:56 +0100 Subject: [PATCH 14/14] Add warning if using 14a Transmit without setting HF field --- armsrc/iso14443a.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index cf0bce153..fe8831470 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -1778,9 +1778,10 @@ static void PrepareDelayedTransfer(uint16_t delay) { //------------------------------------------------------------------------------------- static void TransmitFor14443a(const uint8_t *cmd, uint16_t len, uint32_t *timing) { - if (!hf_field_active) + if (!hf_field_active) { + Dbprintf("Warning: HF field is off, ignoring TransmitFor14443a command"); return; - + } FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | FPGA_HF_ISO14443A_READER_MOD); if (timing) { @@ -2189,8 +2190,10 @@ bool EmLogTrace(uint8_t *reader_data, uint16_t reader_len, uint32_t reader_Start //----------------------------------------------------------------------------- bool GetIso14443aAnswerFromTag_Thinfilm(uint8_t *receivedResponse, uint8_t *received_len) { - if (!hf_field_active) + if (!hf_field_active) { + Dbprintf("Warning: HF field is off, ignoring GetIso14443aAnswerFromTag_Thinfilm command"); return false; + } // Set FPGA mode to "reader listen mode", no modulation (listen // only, since we are receiving, not transmitting).