add a stripping tool and a random key experiment
This commit is contained in:
@@ -5,6 +5,7 @@ set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_FLAGS "-g -Wall")
|
||||
|
||||
include_directories(include)
|
||||
add_subdirectory(lib)
|
||||
|
||||
add_executable(checkm8_remote main.c src/usb_helpers.c src/exploit.c src/payload.c src/command.c)
|
||||
target_link_libraries(checkm8_remote usb-1.0 pthread udev m)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "dev/types.h"
|
||||
#include "util/experiments.h"
|
||||
@@ -106,12 +107,26 @@ void run_corr_exp(struct pwned_device *dev, char *fname)
|
||||
unsigned char key[16];
|
||||
unsigned char key_sched[176];
|
||||
|
||||
sprintf(fname, "KEY");
|
||||
outfile = fopen(fname, "w");
|
||||
if(outfile == NULL)
|
||||
{
|
||||
printf("failed to open key file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
srand(time(NULL));
|
||||
for(i = 0; i < 16; i++)
|
||||
{
|
||||
msg[i] = 0;
|
||||
key[i] = 0x0;
|
||||
key[i] = random();
|
||||
fprintf(outfile, "%02x", key[i]);
|
||||
}
|
||||
|
||||
fprintf(outfile, "\n");
|
||||
fflush(outfile);
|
||||
fclose(outfile);
|
||||
|
||||
expand_key(key, key_sched, 11, c);
|
||||
|
||||
addr_async_buf = setup_corr_exp(dev, key);
|
||||
|
||||
Reference in New Issue
Block a user