Added some more functionality to payload installation
This commit is contained in:
@@ -10,20 +10,14 @@
|
||||
#define IS_CHECKM8_FAIL(code) code < 0
|
||||
|
||||
#if CHECKM8_PLATFORM == 8010
|
||||
#define DEV_IDVENDOR 0x05AC
|
||||
#define DEV_IDPRODUCT 0x1227
|
||||
|
||||
#define DEV_IDVENDOR 0x05AC
|
||||
#define DEV_IDPRODUCT 0x1227
|
||||
|
||||
#else
|
||||
#error "Unspported checkm8 platform"
|
||||
#endif
|
||||
|
||||
struct libusb_device_bundle
|
||||
{
|
||||
struct libusb_context *ctx;
|
||||
struct libusb_device *device;
|
||||
struct libusb_device_handle *handle;
|
||||
struct libusb_device_descriptor *descriptor;
|
||||
};
|
||||
|
||||
struct pwned_device
|
||||
{
|
||||
enum
|
||||
@@ -34,7 +28,9 @@ struct pwned_device
|
||||
|
||||
unsigned int idVendor;
|
||||
unsigned int idProduct;
|
||||
|
||||
struct libusb_device_bundle *bundle;
|
||||
struct payload *installed;
|
||||
};
|
||||
|
||||
struct pwned_device *exploit_device();
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
|
||||
#define LIBUSB_MAX_PACKET_SIZE 0x800
|
||||
|
||||
struct libusb_device_bundle
|
||||
{
|
||||
struct libusb_context *ctx;
|
||||
struct libusb_device *device;
|
||||
struct libusb_device_handle *handle;
|
||||
struct libusb_device_descriptor *descriptor;
|
||||
};
|
||||
|
||||
int get_device_bundle(struct pwned_device *dev);
|
||||
int release_device_bundle(struct pwned_device *dev);
|
||||
|
||||
|
||||
@@ -1,11 +1,29 @@
|
||||
#ifndef IPWNDFU_REWRITE_C_PAYLOAD_H
|
||||
#define IPWNDFU_REWRITE_C_PAYLOAD_H
|
||||
|
||||
#include "checkm8.h"
|
||||
|
||||
#define PAYLOAD_SUCCESS 0
|
||||
#define PAYLOAD_FAIL_DUP -1
|
||||
|
||||
#define PAYLOAD_FOUND 0
|
||||
#define PAYLOAD_NOT_FOUND -1
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PAYLOAD_AES
|
||||
PAYLOAD_AES,
|
||||
PAYLOAD_SYSREG
|
||||
} PAYLOAD_T;
|
||||
|
||||
struct payload *get_payload(PAYLOAD_T p);
|
||||
typedef enum
|
||||
{
|
||||
SRAM,
|
||||
DRAM
|
||||
} LOCATION_T;
|
||||
|
||||
int install_payload(struct pwned_device *dev, PAYLOAD_T p, LOCATION_T loc);
|
||||
int uninstall_payload(struct pwned_device *dev, PAYLOAD_T p);
|
||||
|
||||
int execute_payload(struct pwned_device *dev, PAYLOAD_T p, ...);
|
||||
|
||||
#endif //IPWNDFU_REWRITE_C_PAYLOAD_H
|
||||
|
||||
Reference in New Issue
Block a user