Some tests for payloads on the remote end
This commit is contained in:
@@ -2,6 +2,6 @@ set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_FLAGS -g)
|
||||
|
||||
include_directories(include)
|
||||
add_executable(checkm8_remote main.c src/libusb_helpers.c src/commands.c src/exploit.c)
|
||||
add_executable(checkm8_remote main.c src/libusb_helpers.c src/commands.c src/exploit.c src/payload.c)
|
||||
|
||||
target_link_libraries(checkm8_remote checkm8_libusb pthread udev)
|
||||
4
checkm8_remote/include/payload.h
Normal file
4
checkm8_remote/include/payload.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef IPWNDFU_REWRITE_C_PAYLOAD_H
|
||||
#define IPWNDFU_REWRITE_C_PAYLOAD_H
|
||||
|
||||
#endif //IPWNDFU_REWRITE_C_PAYLOAD_H
|
||||
@@ -2,7 +2,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "checkm8.h"
|
||||
#include "libusb_helpers.h"
|
||||
|
||||
int complete_stage(int stage_function(struct libusb_device_bundle *bundle))
|
||||
|
||||
14
checkm8_remote/src/payload.c
Normal file
14
checkm8_remote/src/payload.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "../include/payload.h"
|
||||
|
||||
#include <elf.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void read_elf_header(const char *filename)
|
||||
{
|
||||
Elf64_Ehdr header;
|
||||
FILE *file = fopen(filename, "rb");
|
||||
if(file)
|
||||
{
|
||||
fread(&header, 1, sizeof(header), file);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user