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/DyForgeCommunication.h
Hermes / DyForge / include / DyForgeCommunication.h
1#pragma once
2 
3#include "DyForgeConfig.h"
4#include <memory>
5#include <mutex>
6#include <condition_variable>
7#include <queue>
8#include <thread>
9#include <atomic>
10 
11namespace DyForge {
12 
13class CommunicationManager {
14public:
15 CommunicationManager(const CommunicationConfig& config);
16 ~CommunicationManager();
17
18 // Communication methods
19 bool SendCommand(const Command& command);
20 bool ReceiveResponse(Response& response);
21 bool WaitForResponse(Response& response, std::chrono::milliseconds timeout);
22
23 // Analysis methods
24 bool StartAnalysis(const AnalysisConfig& config);
25 bool StopAnalysis();
26 bool GetAnalysisData(std::string& data);
27
28 // Process methods
29 bool GetProcessInfo(std::string& info);
30 bool GetMemoryInfo(std::string& info);
31 bool GetThreadInfo(std::string& info);
32 bool GetModuleInfo(std::string& info);
33 bool GetHookInfo(std::string& info);
34 bool GetModInfo(std::string& info);
35 bool GetWebServerInfo(std::string& info);
36
37 // Custom commands
38 bool SendCustomCommand(const std::string& command, std::string& response);
39
40private:
41 // Internal methods
42 void CommunicationThread();
43 bool ProcessCommand(const Command& command);
44 bool ProcessResponse(const Response& response);
45 void HandleTimeout();
46 void HandleError(ResponseType errorType, const std::string& errorMessage);
47
48 // Configuration
49 CommunicationConfig m_config;
50
51 // Communication state
52 std::atomic<bool> m_running;
53 std::thread m_communicationThread;
54 std::mutex m_commandMutex;
55 std::mutex m_responseMutex;
56 std::condition_variable m_commandCondition;
57 std::condition_variable m_responseCondition;
58 std::queue<Command> m_commandQueue;
59 std::queue<Response> m_responseQueue;
60
61 // Analysis state
62 std::atomic<bool> m_analysisRunning;
63 AnalysisConfig m_analysisConfig;
64
65 // Error handling
66 std::mutex m_errorMutex;
67 std::string m_lastError;
68 ResponseType m_lastErrorType;
69};
70 
71} // namespace DyForge