mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-12 18:25:07 +08:00
textual
This commit is contained in:
parent
e56f14fe4d
commit
004b4ae3c9
2 changed files with 5 additions and 5 deletions
|
@ -160,12 +160,12 @@ void printarr(const char *name, uint8_t *arr, int len) {
|
|||
cx += snprintf(output + cx, outsize - cx, "0x%02x,", *(arr + i)); //5 bytes per byte
|
||||
}
|
||||
snprintf(output + cx, outsize - cx, "};");
|
||||
PrintAndLogEx(NORMAL, output);
|
||||
PrintAndLogEx(INFO, output);
|
||||
free(output);
|
||||
}
|
||||
|
||||
void printvar(const char *name, uint8_t *arr, int len) {
|
||||
PrintAndLogEx(NORMAL, "%s = " _YELLOW_("%s"), name, sprint_hex(arr, len));
|
||||
PrintAndLogEx(INFO, "%s = " _YELLOW_("%s"), name, sprint_hex(arr, len));
|
||||
}
|
||||
|
||||
void printarr_human_readable(const char *title, uint8_t *arr, int len) {
|
||||
|
@ -175,13 +175,13 @@ void printarr_human_readable(const char *title, uint8_t *arr, int len) {
|
|||
int cx = 0, i;
|
||||
size_t outsize = 100 + strlen(title) + len * 4;
|
||||
char *output = calloc(outsize, sizeof(char));
|
||||
PrintAndLogEx(NORMAL, "\n %s", title);
|
||||
PrintAndLogEx(INFO, "%s", title);
|
||||
for (i = 0; i < len; i++) {
|
||||
if (i % 16 == 0)
|
||||
cx += snprintf(output + cx, outsize - cx, "\n%02x| ", i);
|
||||
cx += snprintf(output + cx, outsize - cx, "%02x ", *(arr + i));
|
||||
}
|
||||
PrintAndLogEx(NORMAL, output);
|
||||
PrintAndLogEx(INFO, output);
|
||||
free(output);
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,6 @@ static uint64_t check(uint64_t z) {
|
|||
ck2 &= 0x00000000FFFFFF000000;
|
||||
|
||||
return ck1 | ck2 >> 24;
|
||||
|
||||
}
|
||||
|
||||
static void permute(BitstreamIn *p_in, uint64_t z, int l, int r, BitstreamOut *out) {
|
||||
|
@ -219,6 +218,7 @@ static void permute(BitstreamIn *p_in, uint64_t z, int l, int r, BitstreamOut *o
|
|||
permute(p_in, z, l, r + 1, out);
|
||||
}
|
||||
}
|
||||
|
||||
static void printbegin() {
|
||||
if (debug_print < 2)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue