Add files via upload

This commit is contained in:
Bluzume 2020-07-28 20:55:30 +12:00 committed by GitHub
parent d97a6cde94
commit 066b77f109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 586 additions and 0 deletions

View File

@ -0,0 +1,35 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinecraftEducationEdition", "MinecraftEducationEdition\MinecraftEducationEdition.vcxproj", "{917B2AEB-964D-4499-8108-4E356C91D5E9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Debug|Any CPU.ActiveCfg = Debug|Win32
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Debug|x64.ActiveCfg = Debug|x64
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Debug|x64.Build.0 = Debug|x64
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Debug|x86.ActiveCfg = Debug|Win32
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Debug|x86.Build.0 = Debug|Win32
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Release|Any CPU.ActiveCfg = Release|Win32
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Release|x64.ActiveCfg = Release|x64
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Release|x64.Build.0 = Release|x64
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Release|x86.ActiveCfg = Release|Win32
{917B2AEB-964D-4499-8108-4E356C91D5E9}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CBDDD1CF-AD3F-4107-B580-BFACEB76CBFF}
EndGlobalSection
EndGlobal

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -0,0 +1,251 @@
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <psapi.h>
#include <TlHelp32.h>
int* pointer_path;
int num_ptr;
HMODULE* GetProcessBaseAddress(HANDLE process) // from stackoverflow
{
DWORD_PTR baseAddress = 0;
HANDLE processHandle = OpenProcess(PROCESS_ALL_ACCESS,TRUE,process);
HMODULE* moduleArray;
LPBYTE moduleArrayBytes;
DWORD bytesRequired;
if (processHandle)
{
if (EnumProcessModules(processHandle, NULL, 0, &bytesRequired))
{
if (bytesRequired)
{
moduleArrayBytes = (LPBYTE)LocalAlloc(LPTR, bytesRequired);
if (moduleArrayBytes)
{
int moduleCount;
moduleCount = bytesRequired / sizeof(HMODULE);
moduleArray = (HMODULE*)moduleArrayBytes;
if (EnumProcessModules(processHandle, moduleArray, bytesRequired, &bytesRequired))
{
baseAddress = moduleArray[0];
}
LocalFree(moduleArrayBytes);
}
}
}
CloseHandle(processHandle);
}
return baseAddress;
}
int main(int argc, char* argv[])
{
HWND hWnd = NULL;
FILE* ptr_file;
char MEE_POINTER_FILE[0x2048];
#ifdef _WIN64
printf_s("!!! x64 Version can ONLY be used for the 64 Bit Versions of the game!\n");
#else
printf_s("!!! x86 Version can ONLY be used for the 32 Bit Versions of the game!\n");
#endif
if (argc == 1)
{
strncpy_s(MEE_POINTER_FILE, 0x2048, "mee.ptr", 0x2048);
}
else
{
strncpy_s(MEE_POINTER_FILE, 0x2048, argv[1], 0x2048);
}
// Read text file
printf_s("Loading %s\n", MEE_POINTER_FILE);
if ((access(MEE_POINTER_FILE, 0)) != -1)
{
fopen_s(&ptr_file, MEE_POINTER_FILE, "r");
fseek(ptr_file, 0, SEEK_END);
int sz = ftell(ptr_file)+1;
fseek(ptr_file, 0, SEEK_SET);
char* file_contents = (char*)malloc(sz);
memset(file_contents, 0x00, sz);
fread(file_contents, sz, 1, ptr_file);
char* work_buf = (char*)malloc(sz);
memcpy_s(work_buf, sz, file_contents, sz);
num_ptr = 0;
char* next_token1 = NULL;
char* token = strtok_s(work_buf, " > ", &next_token1);
// Count number of ptrs
while (token != NULL) {
token = strtok_s(NULL, " > ",&next_token1);
num_ptr += 1;
}
pointer_path = (int*)malloc(num_ptr * sizeof(int));
work_buf = (char*)malloc(sz);
memcpy_s(work_buf, sz, file_contents, sz);
char* next_token2 = NULL;
char* tmp;
char* ptrs = strtok_s(work_buf, " > ",&next_token2);
pointer_path[0] = (int)strtol(ptrs, &tmp, 16);
// Use ptr
for(int i = 1; i < num_ptr; i++){
ptrs = strtok_s(NULL, " > ", &next_token2);
pointer_path[i] = (int)strtol(ptrs, &tmp, 16);
}
fclose(ptr_file);
printf_s("Loaded %s!\n", MEE_POINTER_FILE);
}
else
{
printf_s("Failed, using default pointer path (MCEE 1.12.60 UWP x64)\n");
num_ptr = 8;
pointer_path = (int*)malloc(num_ptr * sizeof(int));
pointer_path[0] = 0x025949E0;
pointer_path[1] = 0x120;
pointer_path[2] = 0x08;
pointer_path[3] = 0x38;
pointer_path[4] = 0x30;
pointer_path[5] = 0x58;
pointer_path[6] = 0x480;
pointer_path[7] = 0x0;
}
printf_s("\nPointer Path: ");
for (int i = 0; i < num_ptr; i++)
{
printf_s("%x", pointer_path[i]);
if (i != num_ptr - 1)
{
printf_s(" > ");
}
}
printf_s("\n");
// Hack the universe.
printf_s("\n\nPlease open Minecraft Education Edition\n");
while (hWnd == NULL)
{
hWnd = FindWindow(0, L"Minecraft: Education Edition");
}
printf_s("MCEE Window Handle: %x\n", hWnd);
DWORD proc_id;
GetWindowThreadProcessId(hWnd, &proc_id);
printf_s("MCEE Process ID: %x\n", proc_id);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, proc_id);
printf_s("MCEE Process Handle: %x\n", hProcess);
#ifdef _WIN64
long long int baseAddress = (long long int)GetProcessBaseAddress(proc_id);
printf_s("MCEE Base Addr: %llx\n", baseAddress);
#else
int baseAddress = (int)GetProcessBaseAddress(hProcess);
printf_s("MCEE Base Addr: %x\n", baseAddress);
#endif
if (!hProcess)
{
MessageBox(NULL, L"Cannot open process!\r\nTry \"Run as administrator\"", L"Error!", MB_OK + MB_ICONERROR);
}
else
{
// Read first ptr
printf_s("Waiting for game to Initalize.\n");
#ifdef _WIN64
long long int cur_ptr = baseAddress + pointer_path[0];
long long int ptr = 0;
#else
int cur_ptr = baseAddress + pointer_path[0];
int ptr = 0;
#endif
while (ptr == 0)
{
#ifdef _WIN64
ReadProcessMemory(hProcess, cur_ptr, &ptr, sizeof(long long int), 0);
#else
ReadProcessMemory(hProcess, cur_ptr, &ptr, sizeof(int), 0);
#endif
}
printf_s("Pointer 1: %x == %x\n", cur_ptr, ptr);
for (int i = 1; i < num_ptr-1; i++) // Follow path...
{
#ifdef _WIN64
long long int new_ptr = 0;
#else
int new_ptr = 0;
#endif
cur_ptr = ptr + pointer_path[i];
#ifdef _WIN64
ReadProcessMemory(hProcess, cur_ptr, &new_ptr, sizeof(long long int), 0);
#else
ReadProcessMemory(hProcess, cur_ptr, &new_ptr, sizeof(int), 0);
#endif
if (new_ptr == 0) {
i -= 1;
continue;
}
else
{
ptr = new_ptr;
}
printf_s("Pointer %i: %x == %x\n", i, cur_ptr, ptr);
}
// Wait for 0x1
printf_s("Waiting for login screen.\n");
int login_stage = 0;
while (1)
{
ReadProcessMemory(hProcess, (void*)ptr, &login_stage, sizeof(int), 0);
if (login_stage == 0x1 || login_stage == 0x4)
{
printf_s("Trying login stage 6...\n"); // Backwards Comp (1.9 and lower)
int login_success = 6;
WriteProcessMemory(hProcess, (void*)ptr, &login_success, sizeof(int), 0);
Sleep(1 * 500);
printf_s("Trying login stage 8...\n");
login_success = 8;
WriteProcessMemory(hProcess, (void*)ptr, &login_success, sizeof(int), 0);
break;
}
}
CloseHandle(hProcess);
printf_s("\nBlessed Be!\n");
Sleep(5 * 1000);
return 0;
}
}

View File

@ -0,0 +1,162 @@
<?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>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{917b2aeb-964d-4499-8108-4e356c91d5e9}</ProjectGuid>
<RootNamespace>MinecraftEducationEdition</RootNamespace>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<ProjectName>MinecraftEducationEdition</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</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>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<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|x64'">
<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>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(ProjectName)_32Bit</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(ProjectName)_64bit</TargetName>
</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>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>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="MinecraftEducationEdition.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc">
<DeploymentContent>false</DeploymentContent>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="ICON1.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,37 @@
<?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++;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="MinecraftEducationEdition.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="ICON1.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

Binary file not shown.

View File

@ -0,0 +1,81 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United Kingdom) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (United Kingdom) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (New Zealand) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENZ)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_NZ
#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
ICON1 ICON "ICON1.ico"
#endif // English (New Zealand) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Resource.rc
//
#define ICON1 100
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif