Talk:Serial Database
Jump to navigation
Jump to search
NOR PROGRAM[edit source]
#include <stdio.h> #include <string.h> #include <stdio.h> void hexdump(const void *data, size_t size) { size_t i; for (i = 0; i < size; i++) { printf("%02hhX%c", ((unsigned char *)data)[i], (i + 1) % 16 ? ' ' : '\n'); } } int main(int argc, char** argv){ FILE *fp = fopen (argv[1],"rb"); unsigned char model [17]; unsigned char idps[9]; memset(model, 0, 17); fseek(fp,0x3F088,SEEK_SET); fread(model,16,1,fp); printf("| %s || ",model); fseek(fp, 0x2F070, SEEK_SET); fread(idps,9,1,fp); hexdump(idps,9); printf ("|| N.A. || N.A \n|-\n"); return 0; }
- use with find . -name "Dump.bin" -exec nor_program {} >> results.txt