mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-16 02:03:00 -07:00
2. Mifare read sector (via 1) 3. Mifare write block 4. fixed several bugs in iso 14443 select added Issue 23 Issue 26
32 lines
858 B
C
32 lines
858 B
C
//-----------------------------------------------------------------------------
|
|
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
|
|
//
|
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
|
// the license.
|
|
//-----------------------------------------------------------------------------
|
|
// utilities
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#include "util.h"
|
|
|
|
void print_hex(const uint8_t * data, const size_t len)
|
|
{
|
|
size_t i;
|
|
|
|
for (i=0; i < len; i++)
|
|
printf("%02x ", data[i]);
|
|
|
|
printf("\n");
|
|
}
|
|
|
|
char * sprint_hex(const uint8_t * data, const size_t len) {
|
|
static char buf[1024];
|
|
char * tmp = buf;
|
|
size_t i;
|
|
|
|
for (i=0; i < len && i < 1024/3; i++, tmp += 3)
|
|
sprintf(tmp, "%02x ", data[i]);
|
|
|
|
return buf;
|
|
}
|