Truxton identify bytes
Jump to navigation
Jump to search
Given file contents, this function will determine the type the file.
Syntax
uint32_t truxton_identify_bytes(uint8_t const* buffer, uint64_t buffer_size);
Return value
The type of the file in buffer.
Sample
void main()
{
uint8_t * file_buffer = nullptr;
uint64_t file_size = 0;
uint32_t file_type = Type_64bit_Windows_Executable;
get_file_contents( "KERNEL32.DLL", &file_buffer, &file_size );
uint32_t file_type = truxton_identify_bytes( file_buffer, file_size );
printf( "%u\n", file_type );
free( file_buffer );
}