Tag: find

hex查找和替换

如何在二进制文件中更改二进制文件hex字符? #include #include #include #define BUFFER_SIZE 4096 int main(void) { uint8_t *buffer; // Explicit 8 bit unsigned, but should equal “unsigned char” FILE *file; char filename[512] = “test.bin”; // We could also have used buffer[BUFFER_SIZE], but this shows memory alloc if (NULL == (buffer = malloc(BUFFER_SIZE))) { fprintf(stderr, “out of memory\n”); return -1; } // […]