#ifndef WOODY_H #define WOODY_H #include "../ft_printf/includes/ft_printf.h" #include #include #include #include #include #include #include #include #include #include #include #define JUMP "\xe9" #define WOODY "....WOODY...." #define JUMP_VALUE "\xda\xda\xda" #define TEXT_OFFSET "\xba\xba\xba\xba\xba\xba\xba\xba" #define SECTION_SIZE "\xca\xca\xca\xca\xca\xca\xca\xca" typedef struct payload { char *payload; int len; } t_payload; typedef struct elf_content { long unsigned int file_size; char *file_path; char *file; Elf64_Ehdr *Ehdr; Elf64_Phdr *Phdr; Elf64_Shdr *Shdr; Elf64_Shdr *symbols_table; int num_symbols; Elf64_Shdr *text_section; Elf64_Sym *symbols; char *Sshstrtab; } t_elf_content; // utils.c void *fetch(char *file, unsigned long file_size, unsigned long offset_to_data, unsigned long supposed_data_size); int ft_put_error(char *str); char *get_string(char *str, char *end_file); int get_symbols_count(int sh_size, int sh_entsize); char *get_section_name(t_elf_content *woody, int section_index); // woody.c int inject(t_elf_content *woody); int get_elf_sections(t_elf_content *woody); // encrypt.c void encrypt(char *file, unsigned long int offset, unsigned long int size); #endif