+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <VCProjectVersion>16.0</VCProjectVersion>
- <Keyword>Win32Proj</Keyword>
- <ProjectGuid>{097be795-88e9-4e7b-92f3-f6dddbe3f012}</ProjectGuid>
- <RootNamespace>AmongUsAgent</RootNamespace>
- <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="Shared">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(ProjectDir)build\$(Platform)\$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)build\$(Platform)\$(Configuration)\Intermediate\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <OutDir>$(ProjectDir)build\$(Platform)\$(Configuration)\</OutDir>
- <IntDir>$(ProjectDir)build\$(Platform)\$(Configuration)\Intermediate\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ConformanceMode>true</ConformanceMode>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <SDLCheck>true</SDLCheck>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ConformanceMode>true</ConformanceMode>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="logger.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="logger.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="logger.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="logger.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-#include "logger.h"
-#include <cstdio>
-#include <Windows.h>
-
-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<DWORD>(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
+++ /dev/null
-#pragma once
-
-namespace Logger
-{
- void Attach();
- void Detach();
- bool Print(const char* fmt, ...);
- char ReadKey();
-};
\ No newline at end of file
+++ /dev/null
-#include <Windows.h>
-#include "logger.h"
-
-DWORD WINAPI OnDllAttach(LPVOID base)
-{
- Logger::Attach();
- Logger::Print("[AmongUs.Agent] DLL Attached\n");
-
- FreeLibraryAndExitThread(static_cast<HMODULE>(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
# 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}"
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