Seregon/Hermes

Hermes/Dyforge is a program written in c++ allows you to inject a dll that can analyze all processes in a program, can be used for mod and reverse engeneering

C/3.8 KB/No license
DyForge/include/DyForgeConfig.h
Hermes / DyForge / include / DyForgeConfig.h
1#pragma once
2 
3#include <windows.h>
4#include <string>
5#include <vector>
6#include <memory>
7#include <functional>
8#include <chrono>
9#include <mutex>
10#include <condition_variable>
11#include <queue>
12#include <map>
13#include <unordered_map>
14#include <atomic>
15#include <thread>
16#include <future>
17#include <stdexcept>
18#include <system_error>
19#include <filesystem>
20#include <fstream>
21#include <sstream>
22#include <iomanip>
23#include <ctime>
24#include <regex>
25#include <algorithm>
26#include <numeric>
27#include <random>
28#include <limits>
29#include <cstdint>
30#include <cstring>
31#include <cassert>
32#include <cstdio>
33#include <cstdlib>
34#include <cstddef>
35#include <cstdbool>
36#include <cstdarg>
37#include <cctype>
38#include <clocale>
39#include <climits>
40#include <cfloat>
41#include <cmath>
42#include <csetjmp>
43#include <csignal>
44#include <cstdalign>
45#include <ctgmath>
46#include <cuchar>
47#include <cwchar>
48#include <cwctype>
49 
50namespace DyForge {
51 
52// Configurazione comunicazione
53struct CommunicationConfig {
54 // Timeout
55 std::chrono::milliseconds commandTimeout{5000};
56 std::chrono::milliseconds responseTimeout{5000};
57 std::chrono::milliseconds analysisTimeout{30000};
58 std::chrono::milliseconds retryDelay{1000};
59
60 // Buffer
61 size_t commandBufferSize{1024};
62 size_t responseBufferSize{1024};
63 size_t sharedMemorySize{1024 * 1024}; // 1MB
64
65 // Retry
66 uint32_t maxRetries{3};
67 bool enableRetry{true};
68
69 // Logging
70 bool enableLogging{true};
71 std::string logFile{"dyforge.log"};
72 bool logToConsole{true};
73};
74 
75// Configurazione iniezione
76struct InjectionConfig {
77 bool waitForInjection = true;
78 bool hideInjection = true;
79 bool enableDebugLogging = true;
80 bool enableSharedMemory = true;
81 int sharedMemorySize = 4096;
82 std::wstring dllPath;
83};
84 
85// Tipi di comando
86enum class CommandType {
87 NONE,
88 START_ANALYSIS,
89 STOP_ANALYSIS,
90 GET_PROCESS_INFO,
91 GET_MEMORY_INFO,
92 GET_THREAD_INFO,
93 GET_MODULE_INFO,
94 GET_HOOK_INFO,
95 GET_MOD_INFO,
96 GET_WEB_SERVER_INFO,
97 CUSTOM
98};
99 
100// Tipi di risposta
101enum class ResponseType {
102 NONE,
103 SUCCESS,
104 RESPONSE_ERROR,
105 PROCESS_INFO,
106 MEMORY_INFO,
107 THREAD_INFO,
108 MODULE_INFO,
109 HOOK_INFO,
110 MOD_INFO,
111 WEB_SERVER_INFO,
112 CUSTOM
113};
114 
115// Struttura comando
116struct Command {
117 CommandType type{CommandType::NONE};
118 std::vector<uint8_t> data;
119 std::chrono::system_clock::time_point timestamp;
120 uint32_t id{0};
121 bool requiresResponse{true};
122};
123 
124// Struttura risposta
125struct Response {
126 ResponseType type{ResponseType::NONE};
127 std::vector<uint8_t> data;
128 std::chrono::system_clock::time_point timestamp;
129 uint32_t commandId{0};
130 bool success{false};
131 std::string errorMessage;
132};
133 
134// Configurazione analisi
135struct AnalysisConfig {
136 // Opzioni di scansione
137 bool scanMemory{true};
138 bool scanThreads{true};
139 bool scanModules{true};
140 bool scanHooks{true};
141 bool scanMods{true};
142 bool scanWebServer{true};
143
144 // Configurazione web server
145 std::string webServerHost{"localhost"};
146 uint16_t webServerPort{8080};
147 bool enableWebServer{true};
148
149 // Timeout
150 std::chrono::milliseconds scanTimeout{30000};
151 std::chrono::milliseconds webServerTimeout{5000};
152
153 // Logging
154 bool enableLogging{true};
155 std::string logFile{"analysis.log"};
156 bool logToConsole{true};
157};
158 
159// Configurazione report
160struct ReportConfig {
161 // Formato
162 enum class Format {
163 JSON,
164 CSV,
165 HTML,
166 XML
167 } format{Format::JSON};
168
169 // Opzioni
170 bool includeTimestamps{true};
171 bool includeStackTraces{true};
172 bool includeMemoryDumps{false};
173 bool includeThreadInfo{true};
174 bool includeModuleInfo{true};
175 bool includeHookInfo{true};
176 bool includeModInfo{true};
177 bool includeWebServerInfo{true};
178
179 // Output
180 std::string outputFile{"report"};
181 bool compressOutput{false};
182 std::string compressionFormat{"zip"};
183
184 // Logging
185 bool enableLogging{true};
186 std::string logFile{"report.log"};
187 bool logToConsole{true};
188};
189 
190// Configurazione web server
191struct WebServerConfig {
192 int port = 8080;
193 bool enableWebSocket = true;
194 bool enableSSL = false;
195 std::string sslCert;
196 std::string sslKey;
197 std::string rootPath = "web";
198};
199 
200// Configurazione globale
201struct GlobalConfig {
202 CommunicationConfig communication;
203 InjectionConfig injection;
204 AnalysisConfig analysis;
205 ReportConfig report;
206 WebServerConfig webServer;
207 bool enableDebugLogging = true;
208 std::string logFile = "DyForge.log";
209};
210 
211} // namespace DyForge