mirror of
https://github.com/Obfuscator-Collections/VMProtect.git
synced 2026-09-01 03:34:42 +03:00
first commit
Version 3.x.x
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#ifndef HWID_H
|
||||
#define HWID_H
|
||||
|
||||
class CryptoContainer;
|
||||
|
||||
class HardwareID
|
||||
{
|
||||
public:
|
||||
HardwareID();
|
||||
~HardwareID();
|
||||
|
||||
size_t Copy(void *dest, size_t size) const;
|
||||
int GetCurrent(char *buffer, int size);
|
||||
bool IsCorrect(uint8_t *p, size_t s) const;
|
||||
bool IsCorrect(CryptoContainer &cont, size_t offset, size_t size) const;
|
||||
private:
|
||||
enum {
|
||||
MAX_BLOCKS = 16,
|
||||
TYPE_MASK = 3
|
||||
};
|
||||
enum BlockType {
|
||||
BLOCK_CPU,
|
||||
BLOCK_HOST,
|
||||
BLOCK_MAC,
|
||||
BLOCK_HDD,
|
||||
};
|
||||
uint32_t block_count_;
|
||||
uint32_t start_block_;
|
||||
CryptoContainer *blocks_;
|
||||
|
||||
void AddBlock(const void *p, size_t size, BlockType type);
|
||||
void ProcessMAC(const uint8_t *p, size_t size);
|
||||
void ProcessCPU(uint8_t method);
|
||||
|
||||
void GetCPU(uint8_t method);
|
||||
void GetMacAddresses();
|
||||
void GetMachineName();
|
||||
void GetHDD();
|
||||
|
||||
// no copy ctr or assignment op
|
||||
HardwareID(const HardwareID &);
|
||||
HardwareID &operator =(const HardwareID &);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user