Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- void hexDump(const void *data, size_t size) {
- size_t i;
- for (i = 0; i < size; i++) {
- printf("%02hhX%c", ((char *)data)[i], (i + 1) % 16 ? ' ' : '\n');
- }
- printf("\n");
- }
- int main (int argc, char** argv){
- FILE * fp = fopen (argv[1],"rb");
- unsigned short offset;
- unsigned char hash [0x20];
- fseek(fp, 0x0C, SEEK_SET);
- fread(&offset,2,1,fp);
- //printf("%04X\n", offset);
- fseek(fp, offset - 0x20, SEEK_SET);
- fread(hash,0x20,1,fp);
- printf("%s\n" , argv[1]);
- hexDump(hash,0x20);
- fclose(fp);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement