Store name in DuckyKeyboardController to avoid setting it in detector
This commit is contained in:
parent
a8500a2a8a
commit
a73a879238
4 changed files with 16 additions and 8 deletions
|
|
@ -13,10 +13,11 @@
|
|||
#include "DuckyKeyboardController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
DuckyKeyboardController::DuckyKeyboardController(hid_device* dev_handle, const char* path, const unsigned short pid)
|
||||
DuckyKeyboardController::DuckyKeyboardController(hid_device* dev_handle, const char* path, const unsigned short pid, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
usb_pid = pid;
|
||||
|
||||
SendInitialize();
|
||||
|
|
@ -27,11 +28,16 @@ DuckyKeyboardController::~DuckyKeyboardController()
|
|||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string DuckyKeyboardController::GetDeviceLocation()
|
||||
std::string DuckyKeyboardController::GetLocationString()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string DuckyKeyboardController::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string DuckyKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue