From 65a4253e7e3dc7fa36fd1d88cada9b2c8aa66b18 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 21 Feb 2018 17:56:09 +0100 Subject: [PATCH] print.. --- client/cmdhflist.c | 4 +--- client/emv/test/cryptotest.c | 6 +++--- client/scripting.c | 2 -- client/util.c | 8 ++++---- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/client/cmdhflist.c b/client/cmdhflist.c index 9f32fc1ad..b8ecc381d 100644 --- a/client/cmdhflist.c +++ b/client/cmdhflist.c @@ -353,8 +353,6 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t* cmd, uint8_t cmdsize){ // it's basically a ISO14443a tag, so try annotation from there if (!applyIso14443a(exp, size, cmd, cmdsize)){ - //PrintAndLog("rest"); - //PrintAndLog("(%d)",cmd[0]); // S-block 11xxx010 if ( (cmd[0] & 0xC0) && (cmdsize == 3) ) { switch ( (cmd[0] & 0x30) ) { @@ -378,7 +376,7 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t* cmd, uint8_t cmdsize){ pos = pos + 1; if ( (cmd[0] & 0x04) == 0x04) // nad byte following pos = pos + 1; - //PrintAndLog("[%d]",pos); + switch ( cmd[pos] ){ case MFDES_CREATE_APPLICATION :snprintf(exp, size, "CREATE APPLICATION");break; case MFDES_DELETE_APPLICATION :snprintf(exp, size, "DELETE APPLICATION");break; diff --git a/client/emv/test/cryptotest.c b/client/emv/test/cryptotest.c index a6d06e689..8cc3812c1 100644 --- a/client/emv/test/cryptotest.c +++ b/client/emv/test/cryptotest.c @@ -54,11 +54,11 @@ int ExecuteCryptoTests(bool verbose) { res = exec_crypto_test(verbose); if (res) TestFail = true; - PrintAndLog("\n--------------------------"); + PrintAndLogEx(NORMAL, "\n--------------------------"); if (TestFail) - PrintAndLog("Test(s) [ERROR]."); + PrintAndLogEx(ERR, "Test(s) [ERROR]."); else - PrintAndLog("Tests [OK]."); + PrintAndLogEx(SUCCESS, "Tests [OK]."); return TestFail; } diff --git a/client/scripting.c b/client/scripting.c index db864aebe..e475d38c4 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -499,8 +499,6 @@ static int l_reveng_RunModel(lua_State *L){ bool reverse = lua_toboolean(L, 3); const char endian = luaL_checkstring(L, 4)[0]; - //PrintAndLog("mod: %s, hex: %s, rev %d", inModel, inHexStr, reverse); - // int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *result) int ans = RunModel( (char *)inModel, (char *)inHexStr, reverse, endian, result); if (!ans) return returnToLuaWithError(L,"Reveng failed"); diff --git a/client/util.c b/client/util.c index 4f6984dcc..e2ab9d85d 100644 --- a/client/util.c +++ b/client/util.c @@ -310,14 +310,14 @@ char *sprint_ascii(const uint8_t *data, const size_t len) { } void print_blocks(uint32_t *data, size_t len) { - PrintAndLog("Blk | Data "); - PrintAndLog("----+------------"); + PrintAndLogEx(NORMAL, "Blk | Data "); + PrintAndLogEx(NORMAL, "----+------------"); if ( !data ) { - PrintAndLog("..empty data"); + PrintAndLogEx(ERR, "..empty data"); } else { for (uint8_t i=0; i