From: AeonLucid Date: Fri, 25 Sep 2020 16:40:18 +0000 (+0200) Subject: Remove unused Agent project X-Git-Tag: v1.1.0~1^2~49 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=c1458c0943ab1f85428ae63982f55678895d3ae4;p=rhonda%2Fimpostor.git Remove unused Agent project --- diff --git a/src/Impostor.Agent/Impostor.Agent.vcxproj b/src/Impostor.Agent/Impostor.Agent.vcxproj deleted file mode 100644 index 9350e62..0000000 --- a/src/Impostor.Agent/Impostor.Agent.vcxproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - 16.0 - Win32Proj - {097be795-88e9-4e7b-92f3-f6dddbe3f012} - AmongUsAgent - 10.0 - - - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - true - $(ProjectDir)build\$(Platform)\$(Configuration)\ - $(ProjectDir)build\$(Platform)\$(Configuration)\Intermediate\ - - - false - $(ProjectDir)build\$(Platform)\$(Configuration)\ - $(ProjectDir)build\$(Platform)\$(Configuration)\Intermediate\ - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Impostor.Agent/Impostor.Agent.vcxproj.filters b/src/Impostor.Agent/Impostor.Agent.vcxproj.filters deleted file mode 100644 index 85ba1c7..0000000 --- a/src/Impostor.Agent/Impostor.Agent.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/src/Impostor.Agent/logger.cpp b/src/Impostor.Agent/logger.cpp deleted file mode 100644 index 4b45c1d..0000000 --- a/src/Impostor.Agent/logger.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include "logger.h" -#include -#include - -HANDLE h_out = nullptr, h_old_out = nullptr; -HANDLE h_err = nullptr, h_old_err = nullptr; -HANDLE h_in = nullptr, h_old_in = nullptr; - -namespace Logger -{ - void Attach() - { - h_old_out = GetStdHandle(STD_OUTPUT_HANDLE); - h_old_err = GetStdHandle(STD_ERROR_HANDLE); - h_old_in = GetStdHandle(STD_INPUT_HANDLE); - - AllocConsole() && AttachConsole(GetCurrentProcessId()); - - h_out = GetStdHandle(STD_OUTPUT_HANDLE); - h_err = GetStdHandle(STD_ERROR_HANDLE); - h_in = GetStdHandle(STD_INPUT_HANDLE); - - SetConsoleMode(h_out, - ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT); - - SetConsoleMode(h_in, - ENABLE_INSERT_MODE | ENABLE_EXTENDED_FLAGS | - ENABLE_PROCESSED_INPUT | ENABLE_QUICK_EDIT_MODE); - } - - void Detach() - { - if (h_out && h_err && h_in) { - FreeConsole(); - - if (h_old_out) - { - SetStdHandle(STD_OUTPUT_HANDLE, h_old_out); - } - - if (h_old_err) - { - SetStdHandle(STD_ERROR_HANDLE, h_old_err); - } - - if (h_old_in) - { - SetStdHandle(STD_INPUT_HANDLE, h_old_in); - } - } - } - - bool Print(const char* fmt, ...) - { - if (!h_out) - { - return false; - } - - char buf[1024]; - va_list va; - - va_start(va, fmt); - _vsnprintf_s(buf, 1024, fmt, va); - va_end(va); - - return !!WriteConsoleA(h_out, buf, static_cast(strlen(buf)), nullptr, nullptr); - } - - char ReadKey() - { - if (!h_in) - { - return -1; - } - - auto key = char{ 0 }; - auto keysread = DWORD{ 0 }; - - ReadConsoleA(h_in, &key, 1, &keysread, nullptr); - - return key; - } -}; \ No newline at end of file diff --git a/src/Impostor.Agent/logger.h b/src/Impostor.Agent/logger.h deleted file mode 100644 index fc22e15..0000000 --- a/src/Impostor.Agent/logger.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -namespace Logger -{ - void Attach(); - void Detach(); - bool Print(const char* fmt, ...); - char ReadKey(); -}; \ No newline at end of file diff --git a/src/Impostor.Agent/main.cpp b/src/Impostor.Agent/main.cpp deleted file mode 100644 index 40b5ff0..0000000 --- a/src/Impostor.Agent/main.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "logger.h" - -DWORD WINAPI OnDllAttach(LPVOID base) -{ - Logger::Attach(); - Logger::Print("[AmongUs.Agent] DLL Attached\n"); - - FreeLibraryAndExitThread(static_cast(base), 1); -} - -BOOL WINAPI OnDllDetach() -{ - Logger::Print("[AmongUs.Agent] DLL Detached\n"); - Logger::Detach(); - - return true; -} - -BOOL WINAPI DllMain( - const _In_ HINSTANCE hinstDll, - const _In_ DWORD fdwReason, - const _In_opt_ LPVOID lpvReserved -) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDll); - CreateThread(nullptr, 0, OnDllAttach, hinstDll, 0, nullptr); - return true; - - case DLL_PROCESS_DETACH: - if (lpvReserved == nullptr) - return OnDllDetach(); - return true; - default: - return true; - } -} \ No newline at end of file diff --git a/src/Impostor.sln b/src/Impostor.sln index 66996b2..2f22fe9 100644 --- a/src/Impostor.sln +++ b/src/Impostor.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30503.244 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Impostor.Agent", "Impostor.Agent\Impostor.Agent.vcxproj", "{097BE795-88E9-4E7B-92F3-F6DDDBE3F012}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Impostor.Server", "Impostor.Server\Impostor.Server.csproj", "{1B0390AF-A4F3-4FE4-B093-708B0135C0B3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Impostor.Client", "Impostor.Client\Impostor.Client.csproj", "{24F07173-D4A7-41C6-BA51-4516AB68343C}" @@ -29,12 +27,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {097BE795-88E9-4E7B-92F3-F6DDDBE3F012}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {097BE795-88E9-4E7B-92F3-F6DDDBE3F012}.Debug|x86.ActiveCfg = Debug|Win32 - {097BE795-88E9-4E7B-92F3-F6DDDBE3F012}.Debug|x86.Build.0 = Debug|Win32 - {097BE795-88E9-4E7B-92F3-F6DDDBE3F012}.Release|Any CPU.ActiveCfg = Release|Win32 - {097BE795-88E9-4E7B-92F3-F6DDDBE3F012}.Release|x86.ActiveCfg = Release|Win32 - {097BE795-88E9-4E7B-92F3-F6DDDBE3F012}.Release|x86.Build.0 = Release|Win32 {1B0390AF-A4F3-4FE4-B093-708B0135C0B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B0390AF-A4F3-4FE4-B093-708B0135C0B3}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B0390AF-A4F3-4FE4-B093-708B0135C0B3}.Debug|x86.ActiveCfg = Debug|Any CPU