This commit is contained in:
iceman1001 2018-02-21 17:56:09 +01:00
parent b5500c3e54
commit 65a4253e7e
4 changed files with 8 additions and 12 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -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");

View file

@ -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<len; i++)
PrintAndLog(" %02d | 0x%08X", i, data[i]);
PrintAndLogEx(NORMAL, "%02d | 0x%08X", i, data[i]);
}
}