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
| 1 | #pragma once |
| 2 | |
| 3 | #include "DyForgeConfig.h" |
| 4 | #include "DyHexInject.h" |
| 5 | #include <memory> |
| 6 | #include <string> |
| 7 | #include <mutex> |
| 8 | #include <condition_variable> |
| 9 | #include <queue> |
| 10 | #include <thread> |
| 11 | |
| 12 | namespace DyForge { |
| 13 | |
| 14 | class InjectionManager { |
| 15 | public: |
| 16 | InjectionManager(); |
| 17 | ~InjectionManager(); |
| 18 | |
| 19 | // Inizializzazione e pulizia |
| 20 | bool Initialize(); |
| 21 | void Cleanup(); |
| 22 | |
| 23 | // Gestione processo |
| 24 | bool OpenProcess(DWORD processId); |
| 25 | void CloseProcess(); |
| 26 | bool IsProcessOpen() const; |
| 27 | |
| 28 | // Iniezione DLL |
| 29 | bool InjectDyMain(const std::wstring& dllPath); |
| 30 | bool EjectDyMain(); |
| 31 | bool IsDyMainInjected() const; |
| 32 | |
| 33 | // Comunicazione |
| 34 | bool StartCommunication(); |
| 35 | void StopCommunication(); |
| 36 | bool SendCommand(const Command& command); |
| 37 | bool ReceiveResponse(Response& response); |
| 38 | bool WaitForResponse(Response& response, DWORD timeout); |
| 39 | |
| 40 | // Utility |
| 41 | const char* GetLastError() const; |
| 42 | void EnableDebugLogging(bool enable); |
| 43 | const DyHexInjectProcessInfo& GetProcessInfo() const { return m_processInfo; } |
| 44 | |
| 45 | private: |
| 46 | // Stato interno |
| 47 | bool m_initialized; |
| 48 | bool m_processOpen; |
| 49 | bool m_dllInjected; |
| 50 | bool m_communicationStarted; |
| 51 | std::string m_lastError; |
| 52 | |
| 53 | // Gestione processo |
| 54 | DyHexInjectProcessInfo m_processInfo; |
| 55 | DyHexInjectConfig m_injectionConfig; |
| 56 | DyHexInjectCommunication m_communication; |
| 57 | |
| 58 | // Thread di comunicazione |
| 59 | std::thread m_communicationThread; |
| 60 | std::mutex m_commandMutex; |
| 61 | std::condition_variable m_commandCondition; |
| 62 | std::queue<Command> m_commandQueue; |
| 63 | std::queue<Response> m_responseQueue; |
| 64 | |
| 65 | // Funzioni private |
| 66 | void CommunicationThread(); |
| 67 | bool ProcessCommand(const Command& command); |
| 68 | void HandleError(const char* error); |
| 69 | void LogDebug(const char* format, ...); |
| 70 | bool InitializeSharedMemory(); |
| 71 | void CleanupSharedMemory(); |
| 72 | }; |
| 73 | |
| 74 | } // namespace DyForge |