2023-08-22 19:32:25 +02:00
|
|
|
#ifndef PIPE_H
|
|
|
|
#define PIPE_H
|
|
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
|
2023-12-25 16:54:35 +01:00
|
|
|
#define MESSAGE_TYPE_CLIENT_REPORT 1
|
|
|
|
#define MESSAGE_TYPE_CLIENT_SEND 2
|
2023-09-08 20:41:11 +02:00
|
|
|
#define MESSAGE_TYPE_CLIENT_REQUEST 3
|
2023-08-22 19:32:25 +02:00
|
|
|
|
2023-12-25 16:54:35 +01:00
|
|
|
#define MOTHERBOARD_SERIAL_CODE_LENGTH 64
|
2023-09-11 06:53:46 +02:00
|
|
|
#define DEVICE_DRIVE_0_SERIAL_CODE_LENGTH 64
|
2023-09-07 19:49:36 +02:00
|
|
|
|
2023-12-25 16:54:35 +01:00
|
|
|
namespace global {
|
|
|
|
class Pipe
|
2023-08-22 19:32:25 +02:00
|
|
|
{
|
2023-12-25 16:54:35 +01:00
|
|
|
HANDLE pipe_handle;
|
|
|
|
LPTSTR pipe_name;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Pipe(LPTSTR PipeName);
|
|
|
|
|
|
|
|
void WriteToPipe(PVOID Buffer, SIZE_T Size);
|
|
|
|
void ReadPipe(PVOID Buffer, SIZE_T Size);
|
|
|
|
};
|
|
|
|
|
|
|
|
namespace headers {
|
2023-12-27 04:35:46 +01:00
|
|
|
typedef enum _ENVIRONMENT_TYPE
|
|
|
|
{
|
|
|
|
NativeWindows = 0,
|
|
|
|
Vmware,
|
|
|
|
VirtualBox
|
|
|
|
|
|
|
|
} ENVIRONMENT_TYPE;
|
|
|
|
|
|
|
|
typedef enum _PROCESSOR_TYPE
|
|
|
|
{
|
|
|
|
Unknown = 0,
|
|
|
|
GenuineIntel,
|
|
|
|
AuthenticAmd
|
|
|
|
|
|
|
|
} PROCESSOR_TYPE;
|
|
|
|
|
|
|
|
#define VENDOR_STRING_MAX_LENGTH 256
|
2023-12-25 16:54:35 +01:00
|
|
|
struct SYSTEM_INFORMATION
|
|
|
|
{
|
2023-12-27 04:35:46 +01:00
|
|
|
CHAR motherboard_serial[MOTHERBOARD_SERIAL_CODE_LENGTH];
|
|
|
|
CHAR drive_0_serial[DEVICE_DRIVE_0_SERIAL_CODE_LENGTH];
|
|
|
|
CHAR vendor[VENDOR_STRING_MAX_LENGTH];
|
|
|
|
BOOLEAN virtualised_environment;
|
|
|
|
ENVIRONMENT_TYPE environment;
|
|
|
|
PROCESSOR_TYPE processor;
|
|
|
|
RTL_OSVERSIONINFOW os_information;
|
2023-12-25 16:54:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PIPE_PACKET_HEADER
|
|
|
|
{
|
|
|
|
INT message_type;
|
|
|
|
UINT64 steam64_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PIPE_PACKET_REQUEST_EXTENSION_HEADER
|
|
|
|
{
|
|
|
|
INT request_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CLIENT_SEND_PACKET_HEADER
|
|
|
|
{
|
|
|
|
INT request_id;
|
|
|
|
LONG packet_size;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2023-08-22 19:32:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|