elfhash icon indicating copy to clipboard operation
elfhash copied to clipboard

Let elfhash modify elf type EXECUTABLE as well as SHARED / DYNAMIC

Open alaford opened this issue 10 years ago • 0 comments

Hi there. First thanks for writing this great tool! It has certainly helped me out of a spot of bother.

Can I suggest modifying elfhash so that it can manipulate EXECUTABLE (ET_EXEC) as well as SHARED (ET_DYN)?

The diffs would be as follows...

*************** int is_valid_elf64(char base) ** 355,361 **** ehdr->e_ident[EI_MAG3] == 'F') ) { return 0; } ! if(ehdr->e_type != ET_DYN) { return 0; } return 1; --- 355,361 ---- ehdr->e_ident[EI_MAG3] == 'F') ) { return 0; } ! if((ehdr->e_type != ET_DYN) && (ehdr->e_type != ET_EXEC)) { return 0; } return 1;

Thanks so much!

alaford avatar Feb 01 '16 05:02 alaford