From 76d4d6b2bafada7b790e817b7324d53f3d3a0c7f Mon Sep 17 00:00:00 2001 From: David Timber Date: Thu, 20 Aug 2020 12:23:35 +0930 Subject: Progress ... * Move DVault out of executable. Dynamically load it on startup * Improved testing scheme * Tidy up prne_*assert* macro series * Protocol: store host credentials in base64 string. No mask * Use the lock shm as a shared_global so the stats can persist * mmap() the executable read-only for later use --- src/proone-print-all-data.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/proone-print-all-data.c (limited to 'src/proone-print-all-data.c') diff --git a/src/proone-print-all-data.c b/src/proone-print-all-data.c deleted file mode 100644 index c22ff68..0000000 --- a/src/proone-print-all-data.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include - -#include "dvault.h" - -#define TYPE_STR_PADDING "4" - - -int main (void) { - prne_data_key_t i = PRNE_DATA_KEY_NONE + 1; - prne_data_type_t type; - - prne_init_dvault(); - - for (i = PRNE_DATA_KEY_NONE + 1; i < NB_PRNE_DATA_KEY; i += 1) { - type = (prne_data_type_t)PRNE_DATA_DICT[i][0]; - - printf("%10lld(%" TYPE_STR_PADDING "s): ", (long long)i, prne_data_type_tostr(type)); - switch (type) { - case PRNE_DATA_TYPE_CSTR: - printf("%s", prne_dvault_unmask_entry_cstr(i, NULL)); - break; - case PRNE_DATA_TYPE_BIN: { - const uint8_t *p; - size_t size, it; - - prne_dvault_unmask_entry_bin(i, &p, &size); - - for (it = 0; it < size; it += 1) { - printf("%02X ", p[it]); - } - break; - } - default: - fprintf(stderr, "Error: unknown data type (%d)'%s'\n", (int)type, prne_data_type_tostr(type)); - abort(); - } - - printf("\n"); - } - - prne_deinit_dvault(); - return 0; -} -- cgit