111
This commit is contained in:
175
test/dllmain.cpp
175
test/dllmain.cpp
@@ -5,6 +5,44 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int LbState = 0;
|
||||
int RbState = 0;
|
||||
int MbState = 0;
|
||||
@@ -18,23 +56,59 @@ void LenheartThread()
|
||||
static int 可开始执行判断;
|
||||
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 6)
|
||||
{
|
||||
//imguiC* ImguiObj = new imguiC();
|
||||
//ImguiObj->Run();
|
||||
可开始执行判断 = 1;
|
||||
}
|
||||
if (可开始执行判断 == 1)
|
||||
{
|
||||
//获取验证服务器ip
|
||||
std::string Rqip = DNFTOOL::GetIP();
|
||||
//std::string Rqip = "192.168.200.13";
|
||||
//std::cout << "验证服务器IP:" << Rqip << std::endl;
|
||||
|
||||
//获取用户IP
|
||||
std::string ippack = DNFTOOL::GetUserIp();
|
||||
/*
|
||||
//韩国客户VPN
|
||||
std::ifstream inFile;
|
||||
inFile.open("ImagePacks2/anton-ui.npk"); // 默认当方式打开文件
|
||||
if (!inFile.is_open()) {
|
||||
int a = 10;
|
||||
int b[2] = { 1,2 };
|
||||
while (true)
|
||||
{
|
||||
b[a] = -999999;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
std::string Ip;
|
||||
while (1) {
|
||||
// 从文件中读取第一个数据,并将其打印出来
|
||||
inFile >> Ip;
|
||||
if (inFile.eof()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
char* uncode = (char*)Ip.c_str();
|
||||
int skey[] = Skey;//定义解密数组
|
||||
|
||||
Cutecode(uncode, skey);//解密
|
||||
|
||||
Ip = uncode;
|
||||
|
||||
std::string ippack = Ip;
|
||||
*/
|
||||
//std::cout << "验证IP:" << ippack << std::endl;
|
||||
|
||||
//验证并请求加载脚本
|
||||
DNFTOOL::ReqIpLicense(ippack, Rqip);
|
||||
std::vector<std::string> IpArr;
|
||||
DNFTOOL::Split(Rqip, IpArr, "->");
|
||||
|
||||
for (auto it = IpArr.begin(); it != IpArr.end(); ++it) {
|
||||
//验证并请求加载脚本
|
||||
std::string Iname = *it;
|
||||
bool In = DNFTOOL::ReqIpLicense(ippack, Iname);
|
||||
if (In)return;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -42,10 +116,12 @@ void LenheartThread()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MouseEvent()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Sleep(10);
|
||||
if (KEY_DOWN(VK_LBUTTON))LbState = 1;
|
||||
else LbState = 0;
|
||||
if (KEY_DOWN(VK_RBUTTON))RbState = 1;
|
||||
@@ -55,6 +131,7 @@ void MouseEvent()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__declspec(dllexport) void Lenheart()
|
||||
{
|
||||
|
||||
@@ -65,8 +142,8 @@ __declspec(dllexport) void Lenheart()
|
||||
DWORD threadID2;
|
||||
HANDLE Thand2 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MouseEvent, NULL, 0, &threadID2);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//修改ui
|
||||
@@ -81,18 +158,18 @@ void HookHudUi()
|
||||
DNFTOOL::WriteByteArr(5007018, M, 1); //识别区域高度
|
||||
|
||||
////lv 等级贴图
|
||||
DNFTOOL::WriteInt(4953915, 588);
|
||||
DNFTOOL::WriteInt(4953931, 588);
|
||||
DNFTOOL::WriteInt(4953879, 44 + 170 + 170);
|
||||
DNFTOOL::WriteInt(4953915, 1587);
|
||||
DNFTOOL::WriteInt(4953931, 1587);
|
||||
DNFTOOL::WriteInt(4953879, 44 + 170 + 172);
|
||||
////PK 等级贴图
|
||||
DNFTOOL::WriteInt(4954030, 44 + 170 + 170);
|
||||
DNFTOOL::WriteInt(4954109, 44 + 170 + 170);
|
||||
DNFTOOL::WriteInt(4954079, 588);
|
||||
DNFTOOL::WriteInt(4954006, 588);
|
||||
DNFTOOL::WriteInt(4954030, 44 + 170 + 172);
|
||||
DNFTOOL::WriteInt(4954109, 44 + 170 + 172);
|
||||
DNFTOOL::WriteInt(4954079, 1587);
|
||||
DNFTOOL::WriteInt(4954006, 1587);
|
||||
|
||||
|
||||
////SP点坐标
|
||||
DNFTOOL::WriteInt(5022550, 588);
|
||||
DNFTOOL::WriteInt(5022550, 1588);
|
||||
DNFTOOL::WriteInt(5022555, 574);
|
||||
|
||||
////SP点 提示标识
|
||||
@@ -107,14 +184,14 @@ void HookHudUi()
|
||||
////疲劳条
|
||||
DNFTOOL::WriteInt(4962645, 150);
|
||||
|
||||
DNFTOOL::WriteInt(4962678, 539 + 115);
|
||||
DNFTOOL::WriteInt(4962768, 539 + 115);
|
||||
DNFTOOL::WriteInt(4962667, 539 + 115);
|
||||
DNFTOOL::WriteInt(4962582, 539 + 115);
|
||||
DNFTOOL::WriteInt(4962678, 539 + 116);
|
||||
DNFTOOL::WriteInt(4962768, 539 + 116);
|
||||
DNFTOOL::WriteInt(4962667, 539 + 116);
|
||||
DNFTOOL::WriteInt(4962582, 539 + 116);
|
||||
|
||||
DNFTOOL::WriteInt(4962763, 593);
|
||||
DNFTOOL::WriteInt(4962673, 593);
|
||||
DNFTOOL::WriteInt(4962577, 593);
|
||||
DNFTOOL::WriteInt(4962763, 591);
|
||||
DNFTOOL::WriteInt(4962673, 591);
|
||||
DNFTOOL::WriteInt(4962577, 591);
|
||||
|
||||
DNFTOOL::WriteInt(5008389, 413 + 305); //疲劳值文字标识 X轴
|
||||
DNFTOOL::WriteInt(5008384, 550 + 41); //疲劳值文字标识 Y轴
|
||||
@@ -133,16 +210,16 @@ void HookHudUi()
|
||||
////物品栏坐标
|
||||
BYTE WPL[] = { 31 };
|
||||
DNFTOOL::WriteByteArr(5037196, WPL, 1);
|
||||
DNFTOOL::WriteInt(5037103, 1);
|
||||
DNFTOOL::WriteInt(5037173, 570);
|
||||
DNFTOOL::WriteInt(5037103, 3);
|
||||
DNFTOOL::WriteInt(5037173, 569);
|
||||
DNFTOOL::WriteInt(5037202, 271);
|
||||
|
||||
|
||||
////扩展技能栏坐标
|
||||
BYTE SPL[] = { 31 };
|
||||
DNFTOOL::WriteByteArr(5037480, WPL, 1);
|
||||
DNFTOOL::WriteInt(5037374, 298);
|
||||
DNFTOOL::WriteInt(5037444, 535);
|
||||
DNFTOOL::WriteInt(5037374, 300);
|
||||
DNFTOOL::WriteInt(5037444, 534);
|
||||
DNFTOOL::WriteInt(5037486, 478);
|
||||
|
||||
BYTE buf[] = { 194, 12, 0 };
|
||||
@@ -152,8 +229,8 @@ void HookHudUi()
|
||||
////基础技能栏坐标
|
||||
BYTE SSPL[] = { 31 };
|
||||
DNFTOOL::WriteByteArr(5037302, WPL, 1);
|
||||
DNFTOOL::WriteInt(5037209, 298);
|
||||
DNFTOOL::WriteInt(5037279, 566);
|
||||
DNFTOOL::WriteInt(5037209, 300);
|
||||
DNFTOOL::WriteInt(5037279, 565);
|
||||
DNFTOOL::WriteInt(5037308, 478);
|
||||
|
||||
////支援兵
|
||||
@@ -168,16 +245,18 @@ void HookHudUi()
|
||||
////buff图标及提示文字坐标
|
||||
BYTE K[] = { 0 };
|
||||
DNFTOOL::WriteByteArr(5016598, K, 1);
|
||||
DNFTOOL::WriteInt(5016565, 546);
|
||||
DNFTOOL::WriteInt(5016565, 538);
|
||||
DNFTOOL::WriteByteArr(4978018, K, 1);
|
||||
DNFTOOL::WriteInt(4978010, 546);
|
||||
DNFTOOL::WriteInt(4978010, 538);
|
||||
|
||||
////被动技能栏
|
||||
DNFTOOL::WriteInt(5037996, 284);
|
||||
DNFTOOL::WriteInt(5037996, 286);
|
||||
DNFTOOL::WriteInt(5037991, 532);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
@@ -186,15 +265,21 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
|
||||
{
|
||||
|
||||
#ifdef HUDUI_100
|
||||
HookHudUi();
|
||||
#endif
|
||||
|
||||
|
||||
//LoadLibrary(L"ksfp.dll");
|
||||
//memcpy((void*)0x00F4AA66, "\xE9\xFA\x02\x00\x00\x90", 6);
|
||||
FILE* file = fopen("ImagePacks2/!HUD_Yosin百级UI.NPK", "rb");
|
||||
if (file)
|
||||
{
|
||||
HookHudUi();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//是否开启控制台
|
||||
#ifdef COUTWINDOWS_SWITCH
|
||||
|
||||
AllocConsole();
|
||||
SetConsoleTitleA("Lenheart");
|
||||
//SetConsoleOutputCP(65001);
|
||||
@@ -202,17 +287,27 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
freopen(("CONOUT$"), ("w"), stderr);
|
||||
freopen(("CONIN$"), ("r"), stdin);
|
||||
|
||||
*(BYTE*)0x006FCC7D = 0xEB;//双开jmp
|
||||
*(BYTE*)0x006FCC7E = 0x09;
|
||||
*(BYTE*)0x006FCC7F = 0x90;//双开nop
|
||||
*(BYTE*)0x01122DA1 = 0xEB;//双开jmp
|
||||
*(BYTE*)0x01162ACC = 0xEB;//双开jmp
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//getchar();
|
||||
hook::RegisterHook();
|
||||
Lenheart();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user