woody-woodpacker/includes/woody.h

34 lines
667 B
C
Raw Normal View History

2024-02-14 10:37:05 +00:00
#ifndef WOODY_H
# define WOODY_H
#include "../ft_printf/includes/ft_printf.h"
2024-02-19 10:35:40 +00:00
#include <stdbool.h>
2024-02-14 10:37:05 +00:00
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <elf.h>
typedef struct efl_content
{
long unsigned int file_size;
char *file_path;
char *file;
2024-02-19 10:35:40 +00:00
Elf64_Ehdr *Ehdr;
Elf64_Phdr *Phdr;
2024-02-14 11:31:18 +00:00
char *extra_data;
2024-02-14 10:37:05 +00:00
} t_efl_content;
// utils.c
2024-02-19 10:35:40 +00:00
void *secure_jump(char *file, unsigned long file_size, unsigned long offset_to_data, unsigned long supposed_data_size);
2024-02-14 10:37:05 +00:00
int ft_put_error(char *str);
// woody.c
2024-02-19 10:35:40 +00:00
int inject(t_efl_content *woody);
2024-02-14 10:37:05 +00:00
#endif