Stripped down arduino host shield library
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user