Skip to content

Commit

Permalink
v3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
XY0797 committed Aug 21, 2024
0 parents commit 4f49702
Show file tree
Hide file tree
Showing 110 changed files with 22,558 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.e linguist-language=E
*.c linguist-language=C
*.js linguist-language=JavaScript
*.cpp linguist-language=C++
Binary file added BDS启动器.e
Binary file not shown.
Binary file added BDS启动器API.e
Binary file not shown.
82 changes: 82 additions & 0 deletions BDS启动器通讯协议.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
BDS������(αwebsoket)��
ע�⣺����ʹ��HP-Socket��TCPPack�ͻ�������������
*----------------------------------------------------------*
Э�����ͣ�TCP
����ʽ(���ֽڿ�)��
xx 00 00 00 aa aa ... 00 00 00 bb bb ... 00 00 00 cc cc ...
*----------------------------------------------------------*
����ʽ��˵����
xx��ID����ʾ�ð�������
aa��bb��cc��ʾ���ǰ�����������
���Ľ�β����� 00 00 00
��IDΪANSI�ı��������������δ˵��ҲΪANSI�ı�
*----------------------------------------------------------*
���ӣ�
���ÿ���API
·��ΪC:\bedrock-server-1.14.60.5\bedrock_server.exe
����ֵΪ11
��ô������Ϊ��
49 00 00 00 49 49 00 00 00 43 3A 5C 62 65 64 72 6F 63
6B 2D 73 65 72 76 65 72 2D 31 2E 31 34 2E 36 30 2E 35
5C 62 65 64 72 6F 63 6B 5F 73 65 72 76 65 72 2E 65 78
65
ANSIת������ǣ�
1 . . . 1 1 . . . C : \ b e d r o c k - s e r v e r - 1 . 1 4 . 6 0
. 5 \ b e d r o c k _ s e r v e r . e x e
*----------------------------------------------------------*
���ڸ���ֵ��˵����
��Ϊ�������첽�ģ�Ϊ�˷����д������������븽��ֵ��
�����������ʱ���Դ���һ���ض��ĸ���ֵ���������ڴ�
�����ͷ���ֵ��ʱ������·��ͽ��յ����������ֵ����
�����ڽ��պ�ȷ�����ںδ����õġ�
����ֵ���ݿ����Զ��壬����Ҫע����ǣ������������ġ�
�����ֽ����ϵ�00����Ȼ�ᱻ���ɷָ�����������³���
�������ݡ�
ijЩָ��û�лص������DZ���д����ֵ���������{1}ռλ��
*----------------------------------------------------------*
������Ϣ�ĸ�ʽ��
ID��1���������ṹ��ID+����ֵ+�Ƿ�����EQbase64���[ANSIGBK������]+BDS·����������ص�
ID��2���ط����ṹ��ID+����ֵ��������ص�
ID��3��ִ��ָ��ṹ��ID+����ֵ+ָ�����ݣ��������
��
ID��4����ȡ״̬���ṹ��ID+����ֵ��������ص�
ID��5��ˢ�¸��ٺ�������״̬���ṹ��ID+����ֵ��������
�ص�
ID��6���ر����������ṹ��ID+����ֵ��������ص������
BDS�������У����ȷ���IDΪ5�ı��ֶ��ط���Ϣ�ٹر�
ID��7����ʾ���������ṹ��ID+����ֵ��������ص�
ID��8���������������ṹ��ID+����ֵ��������ص�
*----------------------------------------------------------*
������Ϣ�ĸ�ʽ��
ID��1������ص���������Ϣ���£�
1.�������ط����ṹ��ID+����ֵ+ANSI_GBK���������
���壺���ط��Ƿ�ɹ����ط���Ȼ�����棬���ҹط����ȷ�
��IDΪ5�ı��ֶ��ط���Ϣ
2.��ȡ״̬���ṹ��ID+����ֵ+ANSI_GBK���������
���壺BDS�����з����棬�������з��ؼ�
ID��2����������ṹ��ID+�����
���з�������������������з����������ID��˵���ǿ���
ID��3��������־���ṹ��ID+��־����+�Ƿ�ת��������Ⱥ
[ANSI_GBK���������]
ע�⣺���е�BDS�������رա��������ᷢ��������־���������Ⱥ����
ID��4���������ṹ��ID+����ֵ
�������رղ�һ�����ͱ���Ϣ����ҪID4��ID5��������
ID��5�����ֶ��ط����ṹ��ID
�������رղ�һ�����ͱ���Ϣ����ҪID4��ID5��������
ID��6�������ɹ����ṹ��ID
������ֻҪ������һ���ᷢ��ID6
ID��7���ȱ��ݳɹ����ṹ��ID+�ļ���(���硰2022��7��3��10ʱ36��23��.zip��)
һ����⵽�ȱ���ָ����������ӹ��ȱ������ˣ����浵�Զ�����ѹ�������浵����\

������ص���ͬ���ǣ�����������п��Ƶ����������ɹ���
Ҳ�ᷢ��ID6����ID1����������²��ᷢ�ͣ�����ֻ�гɹ�
�Żᷢ�ͱ���Ϣ��ʧ�ܲ��ᷢ�͡���Ȼ����������ǰ������
��������tcp�����������յõ����������ղ���������ġ�
*----------------------------------------------------------*
EQ����ڲ�����ֵ�������
1���ֶ��������������
2������p2�ط�
3�����_����
4�����������ѯ״̬
5���ص��ط�
6�������ط�
31 changes: 31 additions & 0 deletions DLL注入/DLL注入.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30225.117
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DLL注入", "DLL注入\DLL注入.vcxproj", "{1CC3DABE-8789-483B-8E06-81DE2C303CD4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Debug|x64.ActiveCfg = Debug|x64
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Debug|x64.Build.0 = Debug|x64
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Debug|x86.ActiveCfg = Debug|Win32
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Debug|x86.Build.0 = Debug|Win32
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Release|x64.ActiveCfg = Release|x64
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Release|x64.Build.0 = Release|x64
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Release|x86.ActiveCfg = Release|Win32
{1CC3DABE-8789-483B-8E06-81DE2C303CD4}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4EA09BA5-F1D4-471F-97B1-E17C035BA7D3}
EndGlobalSection
EndGlobal
82 changes: 82 additions & 0 deletions DLL注入/DLL注入/DLL注入.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#include <windows.h>
#include <iostream>
#include <stdlib.h>

int EnableDebugPriv(const char* name)
{
HANDLE hToken;
TOKEN_PRIVILEGES tp;
LUID luid;
//打开进程令牌环
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
//获得进程本地唯一ID
LookupPrivilegeValueA(NULL, name, &luid);

tp.PrivilegeCount = 1;
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
tp.Privileges[0].Luid = luid;
//调整权限
AdjustTokenPrivileges(hToken, 0, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL);
return 0;
}

//*****************************************************************************************************************************

BOOL InjectDll(const char* DllFullPath, const DWORD dwRemoteProcessId)
{
HANDLE hRemoteProcess;
EnableDebugPriv("SeDebugPrivilege");
//打开远程线程
hRemoteProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwRemoteProcessId);

char* pszLibFileRemote;

//使用VirtualAllocEx函数在远程进程的内存地址空间分配DLL文件名空间
pszLibFileRemote = (char*)VirtualAllocEx(hRemoteProcess, NULL, lstrlenA(DllFullPath) + 1, MEM_COMMIT, PAGE_READWRITE);


//使用WriteProcessMemory函数将DLL的路径名写入到远程进程的内存空间
WriteProcessMemory(hRemoteProcess, pszLibFileRemote, (void*)DllFullPath, lstrlenA(DllFullPath) + 1, NULL);

//##############################################################################
//计算LoadLibraryA的入口地址
PTHREAD_START_ROUTINE pfnStartAddr = (PTHREAD_START_ROUTINE)
GetProcAddress(GetModuleHandleA("Kernel32"), "LoadLibraryA");
//(关于GetModuleHandle函数和GetProcAddress函数)

//启动远程线程LoadLibraryA,通过远程线程调用创建新的线程
HANDLE hRemoteThread;
if ((hRemoteThread = CreateRemoteThread(hRemoteProcess, NULL, 0, pfnStartAddr, pszLibFileRemote, 0, NULL)) == NULL)
{
std::cout << "注入失败";
return FALSE;
}
//##############################################################################

/*
// 在//###.....//###里的语句也可以用如下的语句代替:
DWORD dwID;
LPVOID pFunc = LoadLibraryA;
HANDLE hRemoteThread = CreateRemoteThread(hRemoteProcess, NULL, 0, (LPTHREAD_START_ROUTINE)pFunc, pszLibFileRemote, 0, &dwID );
//是不是感觉简单了很多
*/

// 释放句柄

CloseHandle(hRemoteProcess);
CloseHandle(hRemoteThread);
std::cout << "注入成功";
return TRUE;
}

//*****************************************************************************************************************************

int main(int argc, char** argv)
{
if (argc == 3)
{
InjectDll(argv[1], atoi(argv[2]));//这个数字是你想注入的进程的ID号
return 0;
}
return 0;
}
149 changes: 149 additions & 0 deletions DLL注入/DLL注入/DLL注入.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<?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>{1cc3dabe-8789-483b-8e06-81de2c303cd4}</ProjectGuid>
<RootNamespace>DLL注入</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</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>MultiByte</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>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</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>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="DLL注入.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
22 changes: 22 additions & 0 deletions DLL注入/DLL注入/DLL注入.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<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="DLL注入.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions DLL注入/DLL注入/DLL注入.vcxproj.user
Original file line number Diff line number Diff line change
@@ -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 added EQ-BDSDtonsole.webp
Binary file not shown.
Loading

0 comments on commit 4f49702

Please sign in to comment.