-
Notifications
You must be signed in to change notification settings - Fork 8
/
NetLogger.hpp
71 lines (55 loc) · 1.48 KB
/
NetLogger.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
#include <Windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <queue>
#include <string>
#include "Blowfish.hpp"
typedef struct ItemEntry
{
USHORT ID;
USHORT StackCount;
BYTE Tier;
std::wstring ItemPath;
std::wstring ReadableName;
}LoggedItems;
class NetLogger //make sure no asshole thieves
{
private:
SOCKET Socket;
USHORT Port;
char* IPAddress;
BYTE ConnectionType; //WSATCP, TCP2, TCP1, UDP
const UINT TimeBetweenHeartbeat = 3; //minutes
std::string HardwareID;
LPBYTE Heartbeat;
std::queue<ItemEntry> LoggedItems;
std::vector<char>* CryptoKey;
//Blowfish* Fish;
LPBYTE CryptoBuffer;
LPBYTE ResponseBuffer;
BYTE IsCompromised;
public:
NetLogger();
struct IPv4
{
unsigned char b1, b2, b3, b4;
};
SOCKET GetSocket() { return this->Socket; }
USHORT GetPort() { return this->Port; }
char* GetIP() { return this->IPAddress; }
UINT GetTimeBetweenSends() { return this->TimeBetweenHeartbeat; }
BOOL SetSocket(SOCKET S);
BOOL SetSocketPort(USHORT Port);
BOOL SetIP(char* IP);
ItemEntry* GetItemEntries(LPWSTR PathName);
INT SendData(LPBYTE Buffer);
VOID EncryptData(LPBYTE Data, LPBYTE Key);
std::string FillHardwareID();
std::string GetHWIDFromWebsite(char* url);
std::string NetLogger::PostItemToLogger(char* dataBuffer);
BOOL CompareHardwareID();
BOOL GetClientIPv4(IPv4 & myIP);
BOOL SendItemData(wchar_t* dataBuffer);
BOOL SendItemData(char* ItemName, int Quantity);
};