Stripped down arduino host shield library

This commit is contained in:
2019-12-30 12:33:48 -05:00
parent fa6d1a2af1
commit 1c9e62fa54
17 changed files with 11 additions and 1642 deletions

View File

@@ -1,7 +1,7 @@
project(checkm8_remote C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_FLAGS -g)
set(CMAKE_C_FLAGS "-g -Wall")
include_directories(include)
add_executable(checkm8_remote main.c src/usb_helpers.c src/exploit.c src/payload.c src/command.c)

View File

@@ -291,7 +291,8 @@ struct pwned_device *exploit_device()
void free_device(struct pwned_device *dev)
{
close_device_session(dev);
checkm8_debug_indent("free_device(dev = %p)\n", dev);
if(is_device_session_open(dev)) close_device_session(dev);
#ifndef WITH_ARDUINO
free(dev->bundle);
#endif

View File

@@ -105,6 +105,12 @@ int open_device_session(struct pwned_device *dev)
close(ard_fd);
return CHECKM8_FAIL_NOTDONE;
}
else
{
checkm8_debug_indent("\tunexpected response %X\n", buf);
close(ard_fd);
return CHECKM8_FAIL_PROT;
}
#else
int i, usb_dev_count, ret = CHECKM8_FAIL_NODEV;
libusb_device **usb_device_list = NULL;