Use HID path for Location on Ducky Keyboard controller

This commit is contained in:
Adam Honse 2020-10-04 17:26:46 -05:00
parent 1618de46b9
commit 96da5d5181
4 changed files with 16 additions and 6 deletions

View file

@ -10,9 +10,10 @@
#include <cstring>
#include "DuckyKeyboardController.h"
DuckyKeyboardController::DuckyKeyboardController(hid_device* dev_handle)
DuckyKeyboardController::DuckyKeyboardController(hid_device* dev_handle, const char* path)
{
dev = dev_handle;
dev = dev_handle;
location = path;
SendInitialize();
}
@ -22,6 +23,11 @@ DuckyKeyboardController::~DuckyKeyboardController()
}
std::string DuckyKeyboardController::GetDeviceLocation()
{
return(location);
}
void DuckyKeyboardController::SendColors
(
unsigned char* color_data,
@ -184,4 +190,4 @@ void DuckyKeyboardController::SendTerminateColorPacket()
| Send packet |
\*-----------------------------------------------------*/
hid_write(dev, (unsigned char *)usb_buf, 65);
}
}