From 5233e9c855e53c1525a88fe1b030599cfb703525 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 17 Oct 2020 10:34:31 +0200 Subject: [PATCH 1/3] fix #1016 (thanks @mwalker33!) --- client/src/cmdlfindala.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/client/src/cmdlfindala.c b/client/src/cmdlfindala.c index 58256dbc2..c9693422d 100644 --- a/client/src/cmdlfindala.c +++ b/client/src/cmdlfindala.c @@ -567,13 +567,9 @@ static int CmdIndalaSim(const char *Cmd) { static int CmdIndalaClone(const char *Cmd) { - bool is_long_uid = false, got_cn = false, got_26 = false; - bool is_t5555 = false; int32_t cardnumber; uint32_t blocks[8] = {0}; uint8_t max = 0; - uint8_t data[7 * 4]; - int datalen = 0; uint8_t fc = 0; uint16_t cn = 0; @@ -597,13 +593,16 @@ static int CmdIndalaClone(const char *Cmd) { }; CLIExecWithReturn(ctx, Cmd, argtable, false); - is_long_uid = arg_get_lit(ctx, 1); + bool is_long_uid = arg_get_lit(ctx, 1); // raw param + int datalen = 0; + uint8_t data[(7 * 4) + 1 ]; CLIGetHexWithReturn(ctx, 3, data, &datalen); - is_t5555 = arg_get_lit(ctx, 4); - + bool is_t5555 = arg_get_lit(ctx, 4); + + bool got_cn = false, got_26 = false; if (is_long_uid == false) { // Heden param From 076372425c1e857ed542fe1a865b7f9a48ccdeca Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 17 Oct 2020 10:39:15 +0200 Subject: [PATCH 2/3] lf indala clone - textual --- client/src/cmdlfindala.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/cmdlfindala.c b/client/src/cmdlfindala.c index c9693422d..9ed08d557 100644 --- a/client/src/cmdlfindala.c +++ b/client/src/cmdlfindala.c @@ -616,12 +616,14 @@ static int CmdIndalaClone(const char *Cmd) { } CLIParserFree(ctx); + + PrintAndLogEx(INFO, "Target chip " _YELLOW_("%s"), (is_t5555) ? "Q5/T5555" : "T55x7"); if (is_long_uid) { // 224 BIT UID // config for Indala (RF/32;PSK2 with RF/2;Maxblock=7) PrintAndLogEx(INFO, "Preparing to clone Indala 224bit tag"); - PrintAndLogEx(INFO, "RawID %s", sprint_hex(data, datalen)); + PrintAndLogEx(INFO, "Using raw " _GREEN_("%s"), sprint_hex_inrow(data, datalen)); if (is_t5555) blocks[0] = T5555_FIXED | T5555_SET_BITRATE(32) | T5555_MODULATION_PSK2 | (7 << T5555_MAXBLOCK_SHIFT); @@ -674,7 +676,7 @@ static int CmdIndalaClone(const char *Cmd) { // config for Indala 64 format (RF/32;PSK1 with RF/2;Maxblock=2) PrintAndLogEx(INFO, "Preparing to clone Indala 64bit tag"); - PrintAndLogEx(INFO, "RawID %s", sprint_hex(data, datalen)); + PrintAndLogEx(INFO, "Using raw " _GREEN_("%s"), sprint_hex_inrow(data, datalen)); if (is_t5555) blocks[0] = T5555_FIXED | T5555_SET_BITRATE(32) | T5555_MODULATION_PSK1 | (2 << T5555_MAXBLOCK_SHIFT); From ab749f3d2999a3bd0b14d50d8b077e19608d5f8c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 17 Oct 2020 11:48:23 +0200 Subject: [PATCH 3/3] unsetenv -> qunsetenv (thanks @libin-ka) --- client/src/proxgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/proxgui.cpp b/client/src/proxgui.cpp index cda746b9a..cec64d8be 100644 --- a/client/src/proxgui.cpp +++ b/client/src/proxgui.cpp @@ -60,7 +60,7 @@ extern "C" void InitGraphics(int argc, char **argv, char *script_cmds_file, char if (getenv("DISPLAY") == NULL) return; #endif - unsetenv("SESSION_MANAGER"); + qunsetenv("SESSION_MANAGER"); main_loop_thread = new WorkerThread(script_cmds_file, script_cmd, stayInCommandLoop); gui = new ProxGuiQT(argc, argv, main_loop_thread); }