diff --git a/error.cc b/error.cc index ce56202..af38042 100644 --- a/error.cc +++ b/error.cc @@ -1,6 +1,7 @@ /** * error.c: Generic error/debug routines * author: Vassil Roussev + * from sdhash -- sdhash.org */ #include @@ -46,21 +47,3 @@ void *realloc_check( void *buffer, uint64_t new_size) { return mem_chunk; } -/** - * Print a 256-byte buffer - */ -void print256( const uint8_t *buffer) { - uint16_t i; - fprintf( stderr, " "); - for( i=0; i<32; i++) - fprintf( stderr, "%02x ", i); - fprintf( stderr, "\n"); - - for( i=0; i<256; i++) { - if( i % 32 == 0) - fprintf( stderr, "%04x: ", i); - fprintf( stderr, "%02x ", buffer[i]); - if( i % 32 == 31) - fprintf( stderr, "\n"); - } -} diff --git a/map_file.cc b/map_file.cc index 2a1d602..a9a580c 100644 --- a/map_file.cc +++ b/map_file.cc @@ -1,3 +1,7 @@ +/** + sdhash file processing code via sdhash.org under apache license + lightly modified by @candicenonsense +*/ #include #include #include diff --git a/nullfinder.cc b/nullfinder.cc index 5b4eb14..a0d99bf 100644 --- a/nullfinder.cc +++ b/nullfinder.cc @@ -1,12 +1,12 @@ /** File: nullfinder.cc Author: Candice Quates - Program: gpunullfinder + Program: nullfinder Takes argument of a file of dumped gpu memory, attempts to divine structure by searching for blocks of nulls which have been added for padding. - Default block of nulls to search for is 8. extracting is only working - for 8-null blocks. Not reporting really really short (1-2 byte blocks) + Default block of nulls to search for is 8. Much larger blocks are + sometimes helpful File parsing code lifted from sdhash, apache license (Roussev/Quates 2013) General structure and command line arguments lifted from zsniff. (apache license) @@ -26,7 +26,7 @@ g++ -std=c++0x -o nullf nullfinder.cc map_file.cc error.cc -#define VERSION "nullfind 0.2 by Candice Quates July 2015" +#define VERSION "nullfinder 0.2 by Candice Quates July 2015" #include "util.h" diff --git a/util.h b/util.h index 58cd21b..8a33208 100644 --- a/util.h +++ b/util.h @@ -1,3 +1,8 @@ +/** +utilities file from sdhash, used for file reading, +under apache license sdhash.org +*/ + /* * General definitions (Vassil Roussev) */ @@ -29,7 +34,6 @@ typedef struct { processed_file_t *process_file(const char *fname); -void print256( const uint8_t *buffer); void *alloc_check( uint32_t alloc_type, uint64_t mem_bytes, const char *fun_name, const char *var_name, uint32_t error_action); void *realloc_check( void *buffer, uint64_t new_size);