1111
This commit is contained in:
parent
b1422411a2
commit
1abb153d76
226
test/BASE64.cpp
226
test/BASE64.cpp
|
|
@ -8,18 +8,22 @@
|
|||
|
||||
using namespace LenheartBase;
|
||||
|
||||
|
||||
// 加解密函数签名
|
||||
typedef int (*RSA_encryptOrDecrypt)(int flen, const unsigned char* from, unsigned char* to, RSA* rsa, int padding);
|
||||
|
||||
|
||||
// 编解码转换表
|
||||
unsigned char CBASE64::s_encTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
unsigned char CBASE64::s_decTable[] = {
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3E,0xFF,0xFF,0xFF,0x3F,
|
||||
0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,
|
||||
0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||
0xFF,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
|
||||
0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0xFF,0xFF,0xFF,0xFF,0xFF
|
||||
};
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3E, 0xFF, 0xFF, 0xFF, 0x3F,
|
||||
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,
|
||||
0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
|
||||
0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
|
||||
// 执行BASE64编码操作
|
||||
std::string CBASE64::encode(const std::string& str)
|
||||
|
|
@ -103,8 +107,10 @@ int CBASE64::__decode(unsigned char* pDest, const unsigned char* pSrc, size_t nS
|
|||
size_t off = 0;
|
||||
for (; off + 4 <= len; off += 4)
|
||||
{
|
||||
if ((src[0] > 0x7F) || (src[1] > 0x7F) || (src[2] > 0x7F) || (src[3] > 0x7F)) return (int)(dst - odst);
|
||||
if ((src[0] == '=') || (src[1] == '=') || (src[2] == '=') || (src[3] == '=')) break;
|
||||
if ((src[0] > 0x7F) || (src[1] > 0x7F) || (src[2] > 0x7F) || (src[3] > 0x7F))
|
||||
return (int)(dst - odst);
|
||||
if ((src[0] == '=') || (src[1] == '=') || (src[2] == '=') || (src[3] == '='))
|
||||
break;
|
||||
|
||||
l = s_decTable[*src++];
|
||||
m = s_decTable[*src++];
|
||||
|
|
@ -150,7 +156,6 @@ int CBASE64::__decode(unsigned char* pDest, const unsigned char* pSrc, size_t nS
|
|||
return (int)(dst - odst);
|
||||
}
|
||||
|
||||
|
||||
std::string CBASE64::RsaPriDecrypt(const std::string& cipher_text, const std::string& pri_key)
|
||||
{
|
||||
std::string decrypt_text;
|
||||
|
|
@ -159,7 +164,8 @@ std::string CBASE64::RsaPriDecrypt(const std::string& cipher_text, const std::st
|
|||
keybio = BIO_new_mem_buf((unsigned char*)pri_key.c_str(), -1);
|
||||
|
||||
rsa = PEM_read_bio_RSAPrivateKey(keybio, &rsa, NULL, NULL);
|
||||
if (rsa == nullptr) {
|
||||
if (rsa == nullptr)
|
||||
{
|
||||
unsigned long err = ERR_get_error(); //获取错误号
|
||||
char err_msg[1024] = { 0 };
|
||||
ERR_error_string(err, err_msg); // 格式:error:errId:库:函数:原因
|
||||
|
|
@ -174,17 +180,19 @@ std::string CBASE64::RsaPriDecrypt(const std::string& cipher_text, const std::st
|
|||
std::string sub_str;
|
||||
unsigned int pos = 0;
|
||||
// 对密文进行分段解密
|
||||
while (pos < cipher_text.length() - 1) {
|
||||
while (pos < cipher_text.length() - 1)
|
||||
{
|
||||
sub_str = cipher_text.substr(pos, key_len);
|
||||
memset(sub_text, 0, key_len + 1);
|
||||
ret = RSA_private_decrypt(sub_str.length(), (const unsigned char*)sub_str.c_str(), (unsigned char*)sub_text, rsa, 1);
|
||||
if (ret >= 0) {
|
||||
if (ret >= 0)
|
||||
{
|
||||
decrypt_text.append(std::string(sub_text, ret));
|
||||
//printf("pos:%d, Length: %d ,sub: %s\n", pos, cipher_text.length(),sub_text);
|
||||
// printf("pos:%d, Length: %d ,sub: %s\n", pos, cipher_text.length(),sub_text);
|
||||
pos += key_len;
|
||||
}
|
||||
}
|
||||
// 释放内存
|
||||
// 释放内存
|
||||
delete[] sub_text;
|
||||
BIO_free_all(keybio);
|
||||
RSA_free(rsa);
|
||||
|
|
@ -206,7 +214,7 @@ std::string CBASE64::RsaPriEncrypt(const std::string& clear_text, const std::str
|
|||
|
||||
// 获取RSA单次可以处理的数据块的最大长度
|
||||
int key_len = RSA_size(rsa);
|
||||
int block_len = key_len - 11; // 因为填充方式为RSA_PKCS1_PADDING, 所以要在key_len基础上减去11
|
||||
int block_len = key_len - 11; // 因为填充方式为RSA_PKCS1_PADDING, 所以要在key_len基础上减去11
|
||||
|
||||
// 申请内存:存贮加密后的密文数据
|
||||
char* sub_text = new char[key_len + 1];
|
||||
|
|
@ -215,20 +223,196 @@ std::string CBASE64::RsaPriEncrypt(const std::string& clear_text, const std::str
|
|||
unsigned int pos = 0;
|
||||
std::string sub_str;
|
||||
// 对数据进行分段加密(返回值是加密后数据的长度)
|
||||
while (pos < clear_text.length()) {
|
||||
while (pos < clear_text.length())
|
||||
{
|
||||
sub_str = clear_text.substr(pos, block_len);
|
||||
memset(sub_text, 0, key_len + 1);
|
||||
ret = RSA_private_encrypt(sub_str.length(), (const unsigned char*)sub_str.c_str(), (unsigned char*)sub_text, rsa, RSA_PKCS1_PADDING);
|
||||
if (ret >= 0) {
|
||||
if (ret >= 0)
|
||||
{
|
||||
encrypt_text.append(std::string(sub_text, ret));
|
||||
}
|
||||
pos += block_len;
|
||||
}
|
||||
|
||||
// 释放内存
|
||||
// 释放内存
|
||||
delete sub_text;
|
||||
BIO_free_all(keybio);
|
||||
RSA_free(rsa);
|
||||
|
||||
return encrypt_text;
|
||||
}
|
||||
|
||||
// 生成RSA密钥结构
|
||||
void* CBASE64::__genKey(int nBits)
|
||||
{
|
||||
RSA* rsa = RSA_new();
|
||||
|
||||
BIGNUM* bne = BN_new();
|
||||
BN_set_word(bne, RSA_F4);
|
||||
|
||||
int ret = RSA_generate_key_ex(rsa, nBits, bne, NULL);
|
||||
|
||||
BN_free(bne);
|
||||
|
||||
if (ret != 1)
|
||||
{
|
||||
RSA_free(rsa);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (void*)rsa;
|
||||
}
|
||||
|
||||
// 生成密钥对,输出为PEM字符串
|
||||
bool CBASE64::genKeyStrings(std::string& strPrivateKeyPEMString, std::string& strPublicKeyPEMString)
|
||||
{
|
||||
// 生成RSA
|
||||
RSA* rsa = (RSA*)__genKey(1024);
|
||||
if (rsa == NULL)
|
||||
return false;
|
||||
|
||||
// 输出私钥
|
||||
{
|
||||
BIO* bio = BIO_new(BIO_s_mem());
|
||||
int ret = PEM_write_bio_RSAPrivateKey(bio, rsa, NULL, NULL, 0, NULL, NULL);
|
||||
if (ret != 1)
|
||||
{
|
||||
BIO_free(bio);
|
||||
RSA_free(rsa);
|
||||
return false;
|
||||
}
|
||||
|
||||
char sBuf[1024] = { 0 };
|
||||
int bytes = BIO_read(bio, sBuf, 1024);
|
||||
if (bytes <= 0)
|
||||
{
|
||||
BIO_free(bio);
|
||||
RSA_free(rsa);
|
||||
return false;
|
||||
}
|
||||
|
||||
BIO_free(bio);
|
||||
strPrivateKeyPEMString.assign(sBuf, bytes);
|
||||
}
|
||||
|
||||
// 输出公钥
|
||||
{
|
||||
BIO* bio = BIO_new(BIO_s_mem());
|
||||
int ret = PEM_write_bio_RSAPublicKey(bio, rsa);
|
||||
if (ret != 1)
|
||||
{
|
||||
BIO_free(bio);
|
||||
RSA_free(rsa);
|
||||
return false;
|
||||
}
|
||||
|
||||
char sBuf[1024] = { 0 };
|
||||
int bytes = BIO_read(bio, sBuf, 1024);
|
||||
if (bytes <= 0)
|
||||
{
|
||||
BIO_free(bio);
|
||||
RSA_free(rsa);
|
||||
return false;
|
||||
}
|
||||
|
||||
BIO_free(bio);
|
||||
strPublicKeyPEMString.assign(sBuf, bytes);
|
||||
}
|
||||
|
||||
RSA_free(rsa);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// 使用PEM私钥字符串加密
|
||||
bool CBASE64::encryptByPrivatePEMString(const std::string& strIn, std::string& strOut, const std::string& strKeyPEMString)
|
||||
{
|
||||
// 加载私钥
|
||||
BIO* bio = BIO_new_mem_buf((const void*)strKeyPEMString.data(), strKeyPEMString.size());
|
||||
RSA* rsa = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, NULL);
|
||||
BIO_free(bio);
|
||||
|
||||
if (rsa == NULL)
|
||||
return false;
|
||||
|
||||
// 使用私钥加密
|
||||
bool b = __encryptOrDecrypt(strIn, strOut, rsa, (const void*)RSA_private_encrypt, true);
|
||||
RSA_free(rsa);
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
// 使用RSA执行加密或解密
|
||||
bool CBASE64::__encryptOrDecrypt(const std::string& strIn, std::string& strOut, const void* pRSA, const void* pFunc, bool bEncrypt)
|
||||
{
|
||||
const RSA_encryptOrDecrypt encryptOrDecrypt = (const RSA_encryptOrDecrypt)pFunc;
|
||||
|
||||
// 计算加密块大小
|
||||
int nKeySize = RSA_size((RSA*)pRSA);
|
||||
int nBlockSize = bEncrypt ? (nKeySize - RSA_PKCS1_PADDING_SIZE) : nKeySize;
|
||||
|
||||
const unsigned char* pIn = (const unsigned char*)strIn.data();
|
||||
int nInSize = strIn.size();
|
||||
|
||||
unsigned char* pBuf = new unsigned char[nKeySize];
|
||||
|
||||
// 分组迭代加密
|
||||
for (int i = 0; i < nInSize; )
|
||||
{
|
||||
int nBlockLen = (nInSize - i > nBlockSize ? nBlockSize : nInSize - i);
|
||||
|
||||
int ret = encryptOrDecrypt(nBlockLen, pIn + i, pBuf, (RSA*)pRSA, RSA_PKCS1_PADDING);
|
||||
if (ret <= 0)
|
||||
{
|
||||
delete[] pBuf;
|
||||
return false;
|
||||
}
|
||||
|
||||
strOut.append((char*)pBuf, ret);
|
||||
i += nBlockLen;
|
||||
}
|
||||
|
||||
delete[] pBuf;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 使用PEM公钥字符串加密
|
||||
bool CBASE64::encryptByPublicPEMString(const std::string& strIn, std::string& strOut, const std::string& strKeyPEMString)
|
||||
{
|
||||
// 加载公钥
|
||||
BIO* bio = BIO_new_mem_buf((const void*)strKeyPEMString.data(), strKeyPEMString.size());
|
||||
RSA* rsa = PEM_read_bio_RSAPublicKey(bio, NULL, NULL, NULL);
|
||||
BIO_free(bio);
|
||||
|
||||
if (rsa == NULL)
|
||||
return false;
|
||||
|
||||
// 使用公钥加密
|
||||
bool b = __encryptOrDecrypt(strIn, strOut, rsa, (const void*)RSA_public_encrypt, true);
|
||||
RSA_free(rsa);
|
||||
return b;
|
||||
}
|
||||
|
||||
// 使用PEM公钥字符串解密
|
||||
bool CBASE64::decryptByPublicPEMString(const std::string& strIn, std::string& strOut, const std::string& strKeyPEMString)
|
||||
{
|
||||
// 加载公钥
|
||||
BIO* bio = BIO_new_mem_buf((const void*)strKeyPEMString.data(), strKeyPEMString.size());
|
||||
RSA* rsa = PEM_read_bio_RSAPublicKey(bio, NULL, NULL, NULL);
|
||||
BIO_free(bio);
|
||||
|
||||
if (rsa == NULL)
|
||||
return false;
|
||||
|
||||
// 检查密文大小是否为分组的整数倍
|
||||
int keySize = RSA_size(rsa);
|
||||
int blockSize = keySize;
|
||||
if ((strIn.size() % blockSize) != 0)
|
||||
return false;
|
||||
|
||||
// 使用公钥解密
|
||||
bool b = __encryptOrDecrypt(strIn, strOut, rsa, (const void*)RSA_public_decrypt, false);
|
||||
RSA_free(rsa);
|
||||
return b;
|
||||
}
|
||||
|
|
@ -9,6 +9,11 @@ namespace LenheartBase
|
|||
class CBASE64
|
||||
{
|
||||
public:
|
||||
// 生成RSA密钥结构
|
||||
static void* __genKey(int nBits);
|
||||
|
||||
// 生成密钥对,输出为PEM字符串
|
||||
static bool genKeyStrings(std::string& strPrivateKeyPEMString, std::string& strPublicKeyPEMString);
|
||||
|
||||
// 执行BASE64编码操作
|
||||
static std::string encode(const std::string& str);
|
||||
|
|
@ -20,8 +25,20 @@ namespace LenheartBase
|
|||
static std::string RsaPriDecrypt(const std::string& cipher_text, const std::string& pri_key);
|
||||
// 执行RSA私匙加密操作
|
||||
static std::string RsaPriEncrypt(const std::string& clear_text, const std::string& pri_key);
|
||||
private:
|
||||
|
||||
// 使用PEM私钥字符串加密
|
||||
static bool encryptByPrivatePEMString(const std::string& strIn, std::string& strOut, const std::string& strKeyPEMString);
|
||||
|
||||
// 使用PEM公钥字符串加密
|
||||
static bool encryptByPublicPEMString(const std::string& strIn, std::string& strOut, const std::string& strKeyPEMString);
|
||||
|
||||
// 使用PEM公钥字符串解密
|
||||
static bool decryptByPublicPEMString(const std::string& strIn, std::string& strOut, const std::string& strKeyPEMString);
|
||||
|
||||
// 使用RSA执行加密或解密
|
||||
static bool __encryptOrDecrypt(const std::string& strIn, std::string& strOut, const void* pRSA, const void* pFunc, bool bEncrypt);
|
||||
|
||||
private:
|
||||
// 分组编码
|
||||
static int __encode(unsigned char* pDest, const unsigned char* pSrc, size_t nSrcLen);
|
||||
|
||||
|
|
@ -29,7 +46,6 @@ namespace LenheartBase
|
|||
static int __decode(unsigned char* pDest, const unsigned char* pSrc, size_t nSrcLen);
|
||||
|
||||
private:
|
||||
|
||||
// 编解码转换表
|
||||
static unsigned char s_encTable[];
|
||||
static unsigned char s_decTable[];
|
||||
|
|
|
|||
|
|
@ -185,39 +185,39 @@ int DNFTOOL::GetEquAddr(int addr)
|
|||
return 0x3064;
|
||||
break;
|
||||
case 12:
|
||||
return 0x3038;
|
||||
return 0x303c;
|
||||
break;
|
||||
|
||||
|
||||
case 13:
|
||||
return 0x3008;
|
||||
break;
|
||||
case 14:
|
||||
return 0x300C;
|
||||
break;
|
||||
case 15:
|
||||
return 0x3010;
|
||||
break;
|
||||
case 16:
|
||||
case 14:
|
||||
return 0x3014;
|
||||
break;
|
||||
case 17:
|
||||
case 15:
|
||||
return 0x3018;
|
||||
break;
|
||||
case 18:
|
||||
return 0x301C;
|
||||
case 16:
|
||||
return 0x301c;
|
||||
break;
|
||||
case 19:
|
||||
case 17:
|
||||
return 0x3020;
|
||||
break;
|
||||
case 20:
|
||||
case 18:
|
||||
return 0x3024;
|
||||
break;
|
||||
case 21:
|
||||
case 19:
|
||||
return 0x3028;
|
||||
break;
|
||||
case 20:
|
||||
return 0x302c;
|
||||
break;
|
||||
case 21:
|
||||
return 0x3030;
|
||||
break;
|
||||
case 22:
|
||||
return 0x302C;
|
||||
return 0x3034;
|
||||
break;
|
||||
case 23:
|
||||
return 0x3030;
|
||||
|
|
@ -432,7 +432,13 @@ std::string DNFTOOL::GetIP()
|
|||
std::ifstream inFile;
|
||||
inFile.open("DFC180.dll"); // ĬÈϵ±·½Ê½´ò¿ªÎļþ
|
||||
if (!inFile.is_open()) {
|
||||
ExitProcess(0);
|
||||
int a = 10;
|
||||
int b[2] = { 1,2 };
|
||||
while (true)
|
||||
{
|
||||
b[a] = -999999;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
std::string Ip;
|
||||
|
|
@ -554,3 +560,25 @@ bool DNFTOOL::isNum(std::string str)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int DNFTOOL::ReadInt(int addr)
|
||||
{
|
||||
return *(int*)addr;
|
||||
}
|
||||
|
||||
void DNFTOOL::WriteInt(int addr, int buf)
|
||||
{
|
||||
*(int*)addr = buf;
|
||||
}
|
||||
|
||||
void DNFTOOL::WriteByteArr(int addr, BYTE buf[], int len)
|
||||
{
|
||||
|
||||
for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
//std::cout << "i: " << i << "buf: " << (int)buf[i] << std::endl;
|
||||
*(BYTE*)(addr + i) = (int)buf[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -80,6 +80,12 @@ public:
|
|||
static int DNFDeCode(int Address);
|
||||
//加密写入
|
||||
static void DNFEnCode(int AddreSs, int Data);
|
||||
//DNFTOOL::ReadInt
|
||||
static int ReadInt(int addr);
|
||||
//DNFTOOL::WriteInt
|
||||
static void WriteInt(int addr, int buf);
|
||||
//写字节数组
|
||||
static void WriteByteArr(int addr, BYTE buf[], int len);
|
||||
|
||||
//获取装备偏移地址
|
||||
static int GetEquAddr(int addr);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
//读整数
|
||||
//DNFTOOL::ReadInt
|
||||
int ReadInt()
|
||||
{
|
||||
char* CountBuffer = new char[4];
|
||||
|
|
|
|||
263
test/dllmain.cpp
263
test/dllmain.cpp
|
|
@ -4,10 +4,13 @@
|
|||
#include "pch.h"
|
||||
|
||||
|
||||
# define Pub_key "-----BEGIN RSA PUBLIC KEY-----\nMIGJAoGBAMiYuNW4K1rST7ZWYpWX6nEziXi5JveLPhDCLj0VZ/5/4dzBWrmoL/Ic\nFZuHOBJtYHm965713kKC9gtw2EyVgkqmXLT3105jEUqzNizfThc6C2ZL6vMmzUZl\nooxNyaOC5mWthPZtwlqQihYWT2nW/wKp8fpTouXihQOCPjqdRoVFAgMBAAE=\n-----END RSA PUBLIC KEY-----"
|
||||
|
||||
|
||||
|
||||
|
||||
int LbState = 0;
|
||||
int RbState = 0;
|
||||
int MbState = 0;
|
||||
extern bool Sinw = false;
|
||||
|
||||
|
||||
void LenheartThread()
|
||||
|
|
@ -28,25 +31,75 @@ void LenheartThread()
|
|||
std::string Rqip = DNFTOOL::GetIP();
|
||||
//std::cout << "验证服务器IP:" << Rqip << std::endl;
|
||||
|
||||
//获取本机IP
|
||||
std::string MyIp;
|
||||
httplib::Client* IPCliObj = NULL;// http连接主体
|
||||
IPCliObj = new httplib::Client("ip.json-json.com");//初始化 http 对象
|
||||
auto MyIpres = IPCliObj->Get("/");
|
||||
if (MyIpres->status == 200)//如果返回包正常
|
||||
{
|
||||
MyIp = MyIpres->body;//取得date
|
||||
}
|
||||
//std::cout << "本机IP:" << MyIp << std::endl;
|
||||
//已经得到了本机IP
|
||||
|
||||
|
||||
//获取验证IP
|
||||
std::string ippack;
|
||||
//获取ExeIP
|
||||
int gameip = *(int*)0x1AE9CEC;
|
||||
|
||||
/*
|
||||
std::cout << gameip << std::endl;
|
||||
//单独定制的脱机IP
|
||||
if (gameip == 3735605)
|
||||
{
|
||||
|
||||
|
||||
Sinw = true;
|
||||
//int skey[] = Skey;//定义解密数组
|
||||
//Cutecode(nutstr, skey);//解密
|
||||
|
||||
//wchar_t* sfile = DNFTOOL::charTowchar_t((char*)"TTTT");
|
||||
//wchar_t* ss = DNFTOOL::charTowchar_t((char*)nutstr);
|
||||
|
||||
//wprintf(L"Function:%s \n", ss);
|
||||
//uint32_t v = GetSqVm();
|
||||
//squirrel::SQdofileBuffer(v, sfile, ss);
|
||||
|
||||
return;
|
||||
}
|
||||
else {
|
||||
int a = 10;
|
||||
int b[2] = { 1,2 };
|
||||
while (true)
|
||||
{
|
||||
b[a] = -999999;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//如果ExeIP 等于 192.168.200.131
|
||||
if (gameip == 3735601)
|
||||
{
|
||||
//获取本机IP
|
||||
std::string MyIp;
|
||||
httplib::Client* IPCliObj = NULL;// http连接主体
|
||||
IPCliObj = new httplib::Client("myip.ipip.net");//初始化 http 对象
|
||||
auto MyIpres = IPCliObj->Get("/");
|
||||
if (MyIpres->status == 200)//如果返回包正常
|
||||
{
|
||||
MyIp = MyIpres->body;//取得date
|
||||
}
|
||||
|
||||
//std::cout << "本机IP:" << MyIp << std::endl;
|
||||
//已经得到了本机IP
|
||||
|
||||
int Pos = MyIp.find("IP", 0) + 5;
|
||||
MyIp = MyIp.substr(Pos, MyIp.find(" ", Pos) - Pos);
|
||||
|
||||
ippack = MyIp;
|
||||
}
|
||||
else
|
||||
|
|
@ -54,38 +107,47 @@ void LenheartThread()
|
|||
wchar_t* wgameip = (wchar_t*)0x1AE9CEC;
|
||||
DNFTOOL::Wchar_tToString(ippack, wgameip);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//std::cout << "验证IP:" << ippack << std::endl;
|
||||
//已经获取了要发送的验证IP
|
||||
|
||||
LenheartBase::CBASE64 bb;
|
||||
ippack += "nima";
|
||||
ippack += "\nip";
|
||||
|
||||
std::string rsastring = bb.RsaPriEncrypt(ippack, Pri_key);
|
||||
std::string enstring = bb.encode(rsastring);
|
||||
std::string New = "";
|
||||
bb.encryptByPublicPEMString(ippack, New,Pub_key);
|
||||
std::string enstring = bb.encode(New);
|
||||
|
||||
|
||||
httplib::Client* CliObj = NULL;// http连接主体
|
||||
CliObj = new httplib::Client(Rqip + ":9007");//初始化 http 对象
|
||||
|
||||
httplib::Params ParamsObj;//新建 Params 对象
|
||||
ParamsObj.emplace("ip", enstring.c_str());//加入账号数据进数据包
|
||||
auto res = CliObj->Post("/yz", ParamsObj);
|
||||
ParamsObj.emplace("ys", enstring.c_str());//加入账号数据进数据包
|
||||
auto res = CliObj->Post("/yosin", ParamsObj);
|
||||
|
||||
if (res->status == 200)//如果返回包正常
|
||||
{
|
||||
std::string date = res->body;//取得date
|
||||
std::string base64code = bb.decode(date);
|
||||
std::string decrypt_text = bb.RsaPriDecrypt(base64code, Pri_key);
|
||||
std::string decrypt_text = "";
|
||||
bb.decryptByPublicPEMString(base64code, decrypt_text,Pub_key);
|
||||
long long redate = atoll(decrypt_text.c_str()) / 1000;
|
||||
time_t myt = time(0);
|
||||
long long nowdate = (long long)myt;
|
||||
|
||||
|
||||
__int64 absnum = abs(nowdate - redate);
|
||||
//std::cout << absnum << std::endl;
|
||||
if (absnum < 18000)
|
||||
{
|
||||
Sinw = true;
|
||||
#ifdef SELL
|
||||
auto res = CliObj->Post("/transfer/getscript", ParamsObj);
|
||||
auto res = CliObj->Post("/transfer/getscript2", ParamsObj);
|
||||
if (res->status == 200)//如果返回包正常
|
||||
{
|
||||
std::string date = res->body;//取得date
|
||||
|
|
@ -123,10 +185,10 @@ void LenheartThread()
|
|||
wchar_t* sfile = DNFTOOL::charTowchar_t((char*)filename.c_str());
|
||||
wchar_t* ss = DNFTOOL::charTowchar_t((char*)nutstr);
|
||||
|
||||
//wprintf(L"Function:%s \n", sfile);
|
||||
//wprintf(L"Function:%s \n", ss);
|
||||
uint32_t v = GetSqVm();
|
||||
squirrel::SQdofileBuffer(v, sfile, ss);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -136,26 +198,166 @@ void LenheartThread()
|
|||
}
|
||||
else
|
||||
{
|
||||
ExitProcess(0);
|
||||
int a = 10;
|
||||
int b[2] = { 1,2 };
|
||||
while (true)
|
||||
{
|
||||
b[a] = -999999;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ExitProcess(0);
|
||||
int a = 10;
|
||||
int b[2] = { 1,2 };
|
||||
while (true)
|
||||
{
|
||||
b[a] = -999999;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MouseEvent()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (KEY_DOWN(VK_LBUTTON))LbState = 1;
|
||||
else LbState = 0;
|
||||
if (KEY_DOWN(VK_RBUTTON))RbState = 1;
|
||||
else RbState = 0;
|
||||
if (KEY_DOWN(VK_MBUTTON))MbState = 1;
|
||||
else MbState = 0;
|
||||
}
|
||||
}
|
||||
|
||||
__declspec(dllexport) void Lenheart()
|
||||
{
|
||||
|
||||
DWORD threadID;
|
||||
HANDLE Thand = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)LenheartThread, NULL, 0, &threadID);
|
||||
|
||||
#ifdef MOUSE_SWITCH
|
||||
DWORD threadID2;
|
||||
HANDLE Thand2 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MouseEvent, NULL, 0, &threadID2);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//修改ui
|
||||
void HookHudUi()
|
||||
{
|
||||
DNFTOOL::WriteInt(5006757, 900); //HP文字标识 Y轴
|
||||
DNFTOOL::WriteInt(5006965, 900); //MP文字标识 Y轴
|
||||
|
||||
////角色和PK经验条提示标识
|
||||
DNFTOOL::WriteInt(5007000, 0); //识别区域宽度
|
||||
BYTE M[] = { 0 };
|
||||
DNFTOOL::WriteByteArr(5007018, M, 1); //识别区域高度
|
||||
|
||||
////lv 等级贴图
|
||||
DNFTOOL::WriteInt(4953915, 588);
|
||||
DNFTOOL::WriteInt(4953931, 588);
|
||||
DNFTOOL::WriteInt(4953879, 44 + 170 + 170);
|
||||
////PK 等级贴图
|
||||
DNFTOOL::WriteInt(4954030, 44 + 170 + 170);
|
||||
DNFTOOL::WriteInt(4954109, 44 + 170 + 170);
|
||||
DNFTOOL::WriteInt(4954079, 588);
|
||||
DNFTOOL::WriteInt(4954006, 588);
|
||||
|
||||
|
||||
////SP点坐标
|
||||
DNFTOOL::WriteInt(5022550, 588);
|
||||
DNFTOOL::WriteInt(5022555, 574);
|
||||
|
||||
////SP点 提示标识
|
||||
DNFTOOL::WriteInt(5008949, 4294966586); //X轴 FFFFFD3A → lea ecx,[edi-000002C6]
|
||||
DNFTOOL::WriteInt(5008960, 4294966711); //Y轴 FFFFFDB7 → lea edx,[esi-00000249]
|
||||
BYTE H[] = { 0 };
|
||||
DNFTOOL::WriteByteArr(5008955, H, 1); //识别区域宽度
|
||||
BYTE I[] = { 0 };
|
||||
DNFTOOL::WriteByteArr(5008966, I, 1); //识别区域高度
|
||||
|
||||
|
||||
////疲劳条
|
||||
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(4962763, 593);
|
||||
DNFTOOL::WriteInt(4962673, 593);
|
||||
DNFTOOL::WriteInt(4962577, 593);
|
||||
|
||||
DNFTOOL::WriteInt(5008389, 413 + 305); //疲劳值文字标识 X轴
|
||||
DNFTOOL::WriteInt(5008384, 550 + 41); //疲劳值文字标识 Y轴
|
||||
DNFTOOL::WriteInt(5008743, 413 + 305); //疯狂阶段文字标识① X轴
|
||||
DNFTOOL::WriteInt(5008738, 550 + 41); //疯狂阶段文字标识① Y轴
|
||||
DNFTOOL::WriteInt(5008868, 413 + 305); //疯狂阶段文字标识② X轴
|
||||
DNFTOOL::WriteInt(5008863, 550 + 41); //疯狂阶段文字标识② Y轴
|
||||
|
||||
BYTE N[] = { 153 };
|
||||
DNFTOOL::WriteByteArr(5008027, N, 1); //疲劳条识别区域宽度
|
||||
BYTE O[] = { 8 };
|
||||
DNFTOOL::WriteByteArr(5008045, O, 1); //疲劳条识别区域高度
|
||||
DNFTOOL::WriteInt(5008021, 4294966650); //疲劳条识别区域 X轴 FFFFFEAF → lea edx,[edi-00000151]
|
||||
DNFTOOL::WriteInt(5008039, 4294966706); //疲劳条识别区域 Y轴 FFFFFDDD → lea eax,[esi-00000223]
|
||||
|
||||
////物品栏坐标
|
||||
BYTE WPL[] = { 31 };
|
||||
DNFTOOL::WriteByteArr(5037196, WPL, 1);
|
||||
DNFTOOL::WriteInt(5037103, 1);
|
||||
DNFTOOL::WriteInt(5037173, 570);
|
||||
DNFTOOL::WriteInt(5037202, 271);
|
||||
|
||||
|
||||
////扩展技能栏坐标
|
||||
BYTE SPL[] = { 31 };
|
||||
DNFTOOL::WriteByteArr(5037480, WPL, 1);
|
||||
DNFTOOL::WriteInt(5037374, 298);
|
||||
DNFTOOL::WriteInt(5037444, 535);
|
||||
DNFTOOL::WriteInt(5037486, 478);
|
||||
|
||||
BYTE buf[] = { 194, 12, 0 };
|
||||
////干掉nut初始化基础技能栏坐标
|
||||
DNFTOOL::WriteByteArr(4928048, buf, 3);
|
||||
|
||||
////基础技能栏坐标
|
||||
BYTE SSPL[] = { 31 };
|
||||
DNFTOOL::WriteByteArr(5037302, WPL, 1);
|
||||
DNFTOOL::WriteInt(5037209, 298);
|
||||
DNFTOOL::WriteInt(5037279, 566);
|
||||
DNFTOOL::WriteInt(5037308, 478);
|
||||
|
||||
////支援兵
|
||||
DNFTOOL::WriteInt(7247082, 1679);
|
||||
DNFTOOL::WriteInt(7247077, 486);
|
||||
|
||||
////活动按钮图标
|
||||
BYTE J[] = { 114 };
|
||||
DNFTOOL::WriteByteArr(5105455, J, 1);
|
||||
DNFTOOL::WriteInt(5105439, 96527);
|
||||
|
||||
////buff图标及提示文字坐标
|
||||
BYTE K[] = { 0 };
|
||||
DNFTOOL::WriteByteArr(5016598, K, 1);
|
||||
DNFTOOL::WriteInt(5016565, 546);
|
||||
DNFTOOL::WriteByteArr(4978018, K, 1);
|
||||
DNFTOOL::WriteInt(4978010, 546);
|
||||
|
||||
////被动技能栏
|
||||
DNFTOOL::WriteInt(5037996, 284);
|
||||
DNFTOOL::WriteInt(5037991, 532);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
|
|
@ -167,18 +369,27 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
|||
case DLL_PROCESS_ATTACH:
|
||||
|
||||
|
||||
#if defined COUTWINDOWS_SWITCH
|
||||
#ifdef HUDUI_100
|
||||
HookHudUi();
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef COUTWINDOWS_SWITCH
|
||||
|
||||
AllocConsole();
|
||||
SetConsoleTitleA("Lenheart");
|
||||
//SetConsoleOutputCP(65001);
|
||||
freopen(("CONOUT$"), ("w"), stdout);
|
||||
freopen(("CONOUT$"), ("w"), stderr);
|
||||
freopen(("CONIN$"), ("r"), stdin);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//getchar();
|
||||
hook::RegisterHook();
|
||||
Lenheart();
|
||||
//::CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)InitD3d, NULL, NULL, NULL);
|
||||
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
|
|
|
|||
|
|
@ -126,10 +126,10 @@
|
|||
|
||||
|
||||
|
||||
//#include "squirrel.h"
|
||||
//#include "lsquirrel.h"
|
||||
#include "STL.h"
|
||||
#include "DNFTOOL.h"
|
||||
#include "sock.h"
|
||||
#include "hook.h"
|
||||
#include "squirrel.h"
|
||||
#include "lsquirrel.h"
|
||||
|
||||
|
|
|
|||
461
test/hook.cpp
461
test/hook.cpp
|
|
@ -1,6 +1,8 @@
|
|||
#include "pch.h"
|
||||
#include "hook.h"
|
||||
|
||||
extern int LbState;
|
||||
extern int RbState;
|
||||
extern int MbState;
|
||||
|
||||
//注册nut
|
||||
uint32_t __cdecl hook::H_Register_Nut(uint32_t v, void* f, int freeVarsCnt)
|
||||
|
|
@ -37,7 +39,7 @@ void hook::H_Register_Pack(void* Ecx)
|
|||
|
||||
//Hook文字
|
||||
#ifdef CODEDRAW
|
||||
extern struct CodeDrawObj
|
||||
struct CodeDrawObj
|
||||
{
|
||||
int Color;
|
||||
std::string str;
|
||||
|
|
@ -45,21 +47,40 @@ void hook::H_Register_Pack(void* Ecx)
|
|||
extern std::map< std::string, CodeDrawObj>CodeDrawMap;
|
||||
#endif
|
||||
|
||||
typedef DWORD(_fastcall _BFontInitW)(DWORD thisc, DWORD Seat);
|
||||
static _BFontInitW* Wsub_1206570 = (_BFontInitW*)0x1206570;
|
||||
|
||||
extern bool Sinw;
|
||||
|
||||
//HOOK绘制字体
|
||||
void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4, int a5, int a6)
|
||||
{
|
||||
|
||||
wchar_t* strbuffer = (wchar_t*)a6;
|
||||
|
||||
if (Sinw == false && DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") >= 1 && DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") <= 3)
|
||||
{
|
||||
int a = 10;
|
||||
int b[2] = { 1,2 };
|
||||
while (true)
|
||||
{
|
||||
b[a] = -999999;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t* clone = new wchar_t[wcslen(strbuffer) + 1];
|
||||
wchar_t* strbuffer = (wchar_t*)a6;
|
||||
if (strbuffer == NULL)return;
|
||||
|
||||
wchar_t* clone = new wchar_t[wcslen(strbuffer) + 2];
|
||||
wcscpy(clone, strbuffer);
|
||||
|
||||
std::string GameStr;
|
||||
DNFTOOL::Wchar_tToString(GameStr, clone);
|
||||
delete[]clone;
|
||||
|
||||
//std::cout << GameStr << std::endl;
|
||||
|
||||
//Hook文字
|
||||
|
||||
#ifdef CODEDRAW
|
||||
if (CodeDrawMap.count(GameStr) == 1)
|
||||
{
|
||||
|
|
@ -70,7 +91,22 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MEDAL_SWITCH
|
||||
if (GameStr.find("倾泪寒勋章") != std::string::npos || GameStr.find("傾淚寒勳章") != std::string::npos || GameStr.find("倾泪寒勳章") != std::string::npos || GameStr.find("yosin_medal") != std::string::npos)
|
||||
{
|
||||
Wsub_1206570(thisc, 0);
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_L_Medal", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, a3);
|
||||
SQPushInt(v, a4);
|
||||
SQ_Call(v, 3, 0, 1);
|
||||
SQPop(v, 2);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Hook游戏设置窗口CallBack ui/optionwindow
|
||||
#ifdef SETTINGWINDOWS
|
||||
|
|
@ -90,6 +126,57 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
|
|||
}
|
||||
#endif
|
||||
|
||||
//buff换装
|
||||
#ifdef BUFFSWITCHING_SWITCH
|
||||
if (GameStr.find("LenheartBUFFSwitching") != std::string::npos)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_BuffSwitchingCallBack", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, a3);
|
||||
SQPushInt(v, a4);
|
||||
SQ_Call(v, 3, 0, 1);
|
||||
SQPop(v, 2);
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, 0x00000000, (int)strbuffer);
|
||||
}
|
||||
if (GameStr.find("LenheartSwitching") != std::string::npos)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_SwitchingCallBack", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, a3);
|
||||
SQPushInt(v, a4);
|
||||
SQ_Call(v, 3, 0, 1);
|
||||
SQPop(v, 2);
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, 0x00000000, (int)strbuffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//buff换装
|
||||
#ifdef NEWUPGRADE_SWITCH
|
||||
if (GameStr.find("LenheartUpgrade") != std::string::npos)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_UpgradeCallBack", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, a3);
|
||||
SQPushInt(v, a4);
|
||||
SQ_Call(v, 3, 0, 1);
|
||||
SQPop(v, 2);
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, 0x00000000, (int)strbuffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
//Hook游戏背包窗口回收功能CallBack ui/inventory/inventory_bottom.ui
|
||||
#ifdef RecoverySystem
|
||||
if (GameStr.find("倾泪寒回收") != std::string::npos)
|
||||
|
|
@ -130,6 +217,47 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
|
|||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, 0x00000000, (int)strbuffer);
|
||||
}
|
||||
}
|
||||
if (GameStr.find("傾淚寒回收") != std::string::npos)
|
||||
{
|
||||
if (GameStr.find("傾淚寒回收功能") != std::string::npos)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_RecoveryCallBack", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, a3 - 800);
|
||||
SQPushInt(v, a4);
|
||||
SQ_Call(v, 3, 0, 1);
|
||||
SQPop(v, 2);
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, 0x00000000, (int)strbuffer);
|
||||
}
|
||||
int Type = 0;
|
||||
if (GameStr.find("傾淚寒回收裝備") != std::string::npos)Type = 1;
|
||||
else if (GameStr.find("傾淚寒回收消耗品") != std::string::npos)Type = 2;
|
||||
else if (GameStr.find("傾淚寒回收材料") != std::string::npos)Type = 3;
|
||||
else if (GameStr.find("傾淚寒回收副職業材料") != std::string::npos)Type = 5;
|
||||
else if (GameStr.find("傾淚寒回收任務材料") != std::string::npos)Type = 4;
|
||||
else if (GameStr.find("傾淚寒回收時裝") != std::string::npos)Type = 6;
|
||||
else if (GameStr.find("傾淚寒回收徽章") != std::string::npos)Type = 7;
|
||||
else if (GameStr.find("傾淚寒回收寵物寵物") != std::string::npos)Type = 8;
|
||||
else if (GameStr.find("傾淚寒回收寵物裝備") != std::string::npos)Type = 9;
|
||||
else if (GameStr.find("傾淚寒回收寵物消耗品") != std::string::npos)Type = 10;
|
||||
if (Type > 0)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_RecoveryTypeSetCallBack", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, Type);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, 0x00000000, (int)strbuffer);
|
||||
}
|
||||
}
|
||||
|
|
@ -179,6 +307,7 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
|
|||
// ui/hud/hud.ui 特殊
|
||||
if (a3 == 9999 && a4 == 9998)
|
||||
{
|
||||
Wsub_1206570(thisc, 0);
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_DrawMainMaxLayerCustomUI", -1);
|
||||
|
|
@ -188,6 +317,19 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
|
|||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
|
||||
#ifdef MOUSE_SWITCH
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_MouseEventCallBack", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, LbState);
|
||||
SQPushInt(v, RbState);
|
||||
SQPushInt(v, MbState);
|
||||
SQ_Call(v, 4, 0, 1);
|
||||
SQPop(v, 2);
|
||||
#endif // MOUSE_SWITCH
|
||||
|
||||
|
||||
for (DrawCodestruct iter : DrawCodeT1_STL)
|
||||
{
|
||||
wchar_t* str = DNFTOOL::char2wchar(iter.str.c_str());
|
||||
|
|
@ -243,19 +385,21 @@ void _fastcall hook::H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4,
|
|||
}
|
||||
|
||||
|
||||
#if defined MONSTER_BLOOD_UI
|
||||
////移走怪物血条的一些配置文件
|
||||
//if (a4 == 100 || a4 == 107 || a4 == 99)
|
||||
//{
|
||||
// //if (a3 == 37 || a3 == 100 || a3 == 74 || a3 == 70)
|
||||
// //{
|
||||
// a3 = 5000;
|
||||
// a4 = 5000;
|
||||
// //}
|
||||
//}
|
||||
#endif
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, a5, (int)strbuffer);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return DrawCodeF(thisc, Seat, a3, a4, a5, a6);
|
||||
}
|
||||
|
||||
#ifdef GET_EXE_STR
|
||||
|
|
@ -386,6 +530,132 @@ int __fastcall NewSendPacksType(DWORD thisc, int Seat, int Parm)
|
|||
return _OldSendPackType(thisc, 0, Parm);
|
||||
}
|
||||
}
|
||||
static SendPacksByte _OldSendPackByte;
|
||||
int __fastcall NewSendPacksByte(DWORD thisc, int Seat, int Parm)
|
||||
{
|
||||
static bool OpenSw = false;
|
||||
if (!OpenSw)
|
||||
{
|
||||
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 1)
|
||||
{
|
||||
OpenSw = true;
|
||||
}
|
||||
return _OldSendPackByte(thisc, 0, Parm);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_SendPackByte_Event", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, Parm);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
return _OldSendPackByte(thisc, 0, Parm);
|
||||
}
|
||||
}
|
||||
static SendPacksWORD _OldSendPackWord;
|
||||
int __fastcall NewSendPacksWord(DWORD thisc, int Seat, int Parm)
|
||||
{
|
||||
static bool OpenSw = false;
|
||||
if (!OpenSw)
|
||||
{
|
||||
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 1)
|
||||
{
|
||||
OpenSw = true;
|
||||
}
|
||||
return _OldSendPackWord(thisc, 0, Parm);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_SendPackWord_Event", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, Parm);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
return _OldSendPackWord(thisc, 0, Parm);
|
||||
}
|
||||
}
|
||||
static SendPacksDWORD _OldSendPackDWord;
|
||||
int __fastcall NewSendPacksDWord(DWORD thisc, int Seat, int Parm)
|
||||
{
|
||||
static bool OpenSw = false;
|
||||
if (!OpenSw)
|
||||
{
|
||||
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 1)
|
||||
{
|
||||
OpenSw = true;
|
||||
}
|
||||
return _OldSendPackDWord(thisc, 0, Parm);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_SendPackDWord_Event", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushInt(v, Parm);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
return _OldSendPackDWord(thisc, 0, Parm);
|
||||
}
|
||||
}
|
||||
static SendPacksChar _OldSendPackChar;
|
||||
int __fastcall NewSendPacksChar(DWORD thisc, int Seat, char* Parm,int Size)
|
||||
{
|
||||
static bool OpenSw = false;
|
||||
if (!OpenSw)
|
||||
{
|
||||
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 1)
|
||||
{
|
||||
OpenSw = true;
|
||||
}
|
||||
return _OldSendPackChar(thisc, 0, Parm,Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
wchar_t* buffer = DNFTOOL::charTowchar_t(Parm);
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_SendPackChar_Event", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, buffer,Size);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
delete[] buffer;
|
||||
return _OldSendPackChar(thisc, 0, Parm,Size);
|
||||
}
|
||||
}
|
||||
static SendPacks* _OldSend;
|
||||
int NewSend()
|
||||
{
|
||||
static bool OpenSw = false;
|
||||
if (!OpenSw)
|
||||
{
|
||||
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 1)
|
||||
{
|
||||
OpenSw = true;
|
||||
}
|
||||
return _OldSend();
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_SendPack_Event", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQ_Call(v, 1, 0, 1);
|
||||
SQPop(v, 2);
|
||||
return _OldSend();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -434,12 +704,35 @@ int _cdecl newsub7AA800(int a1, int a2, int a3, int a4, int a5, int a6, char a7)
|
|||
return sub7AA800(a1, a2, a3, a4, a5, a6, a7);
|
||||
}
|
||||
|
||||
#ifdef DRAWITEM
|
||||
#if defined DRAWITEM || defined HUDUI_100 || defined HOOKDRAWITEM
|
||||
//HOOK 绘制Item
|
||||
typedef int(_fastcall _sub11A8F60)(DWORD a1, DWORD Seat, int a2, int a3, int a4);
|
||||
static _sub11A8F60* sub11A8F60;
|
||||
int _fastcall newsub11A8F60(DWORD a1, DWORD Seat, int a2, int a3, int a4)
|
||||
{
|
||||
|
||||
#if defined HUDUI_100
|
||||
if (a2 == 13 && a3 == 524)
|
||||
{
|
||||
a2 = 224; //血球X坐标
|
||||
a3 = 538; //血球X坐标
|
||||
return sub11A8F60(a1, 0, a2, a3, a4);
|
||||
}
|
||||
else if (a2 == 732 && a3 == 524)
|
||||
{
|
||||
a2 = 515; //蓝球X坐标
|
||||
a3 = 538; //蓝球X坐标
|
||||
return sub11A8F60(a1, 0, a2, a3, a4);
|
||||
}
|
||||
else if (a2 == 88 && a3 == 591)//经验条X Y
|
||||
{
|
||||
a2 = 248;
|
||||
a3 = 596;
|
||||
return sub11A8F60(a1, 0, a2, a3, a4);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DRAWITEM
|
||||
static bool OpenSw = false;
|
||||
if (!OpenSw)
|
||||
{
|
||||
|
|
@ -477,6 +770,7 @@ int _fastcall newsub11A8F60(DWORD a1, DWORD Seat, int a2, int a3, int a4)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -671,11 +965,113 @@ int _fastcall New_inventory_M_Pos(DWORD thisc, DWORD Seat)
|
|||
#endif
|
||||
|
||||
|
||||
typedef int(_cdecl _9D2300)(DWORD a1, DWORD a2,DWORD a3,char a4 , DWORD a5,char a6);
|
||||
static _9D2300* Old_9D2300;
|
||||
int _cdecl New_9D2300(DWORD a1, DWORD a2, DWORD a3, char a4, DWORD a5, char a6)
|
||||
{
|
||||
std::cout << a5 << std::endl;
|
||||
return Old_9D2300(a1, a2,a3,a4,a5,a6);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined HUDUI_100
|
||||
typedef DWORD** (_fastcall _Event)(DWORD thisc, DWORD Seat, DWORD a2, DWORD** a3, char a4);
|
||||
static _Event* OldEvent;
|
||||
DWORD** _fastcall NewEvent(DWORD thisc, DWORD Seat, DWORD a2, DWORD** a3, char a4)
|
||||
{
|
||||
|
||||
if ((int)a4 == 1 && (int)a3 == 96527 /*&& a2 <= 536 && ((a2 - 456)%20 == 0)*/)//事先修改了活动图标的Y轴 在进行HOOK以便修改
|
||||
{
|
||||
//std::cout << a3 << std::endl;
|
||||
a2 += 167;
|
||||
a3 = (DWORD**)527;
|
||||
}
|
||||
return OldEvent(thisc, Seat, a2, a3, a4);
|
||||
}
|
||||
|
||||
|
||||
typedef DWORD(_Cutting)(DWORD a1, DWORD a2, DWORD a3, DWORD a4);
|
||||
static _Cutting* Old6F4370;
|
||||
static _Cutting* Old11AEE50;
|
||||
//裁切函数HOOK
|
||||
DWORD New6F4370(DWORD a1, DWORD a2, DWORD a3, DWORD a4)
|
||||
{
|
||||
if (a1 == 0 && a3 == 800)//血球篮球的裁切策略 需要+14 因为球的坐标+了14
|
||||
{
|
||||
a2 += 14;
|
||||
a4 += 14;
|
||||
}
|
||||
return Old6F4370(a1, a2, a3, a4);
|
||||
}
|
||||
//裁切函数HOOK
|
||||
DWORD New11AEE50(DWORD a1, DWORD a2, DWORD a3, DWORD a4)
|
||||
{
|
||||
if (a1 == 0 && a2 == 625)//血球篮球的裁切策略 需要+14 因为球的坐标+了14
|
||||
{
|
||||
a1 = 170;
|
||||
a2 = 548;
|
||||
}
|
||||
return Old11AEE50(a1, a2, a3, a4);
|
||||
}
|
||||
|
||||
typedef DWORD(_fastcall _11A97E0)(DWORD thisc, DWORD Seat, DWORD a1, DWORD a2, WORD* a3, DWORD a4, DWORD a5, DWORD a6, DWORD a7, FLOAT a8, FLOAT a9);
|
||||
static _11A97E0* Old11A97E0;
|
||||
|
||||
//绘图HOOK
|
||||
DWORD _fastcall New11A97E0(DWORD thisc, DWORD Seat, DWORD a1, DWORD a2, WORD* a3, DWORD a4, DWORD a5, DWORD a6, DWORD a7, FLOAT a8, FLOAT a9)
|
||||
{
|
||||
if (a1 == 13 && a2 == 524)
|
||||
{
|
||||
a1 = 224; //血球X坐标
|
||||
a2 = 538; //血球X坐标
|
||||
}
|
||||
if (a1 == 732 && a2 == 524)
|
||||
{
|
||||
a1 = 515; //蓝球X坐标
|
||||
a2 = 538; //蓝球X坐标
|
||||
}
|
||||
|
||||
return Old11A97E0(thisc, Seat, a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
||||
}
|
||||
|
||||
typedef DWORD(_fastcall _11A8F60)(DWORD thisc, DWORD Seat, DWORD a1, DWORD a2, DWORD a3);
|
||||
static _11A8F60* Old11A8F60;
|
||||
|
||||
//绘图HOOK
|
||||
DWORD _fastcall New11A8F60(DWORD thisc, DWORD Seat, DWORD a1, DWORD a2, DWORD a3)
|
||||
{
|
||||
|
||||
if (a1 == 13 && a2 == 524)
|
||||
{
|
||||
a1 = 224; //血球X坐标
|
||||
a2 = 538; //血球X坐标
|
||||
}
|
||||
else if (a1 == 732 && a2 == 524)
|
||||
{
|
||||
a1 = 515; //蓝球X坐标
|
||||
a2 = 538; //蓝球X坐标
|
||||
}
|
||||
else if (a1 == 88 && a2 == 591)//经验条X Y
|
||||
{
|
||||
a1 = 248;
|
||||
a2 = 596;
|
||||
}
|
||||
|
||||
return Old11A8F60(thisc, Seat, a1, a2, a3);
|
||||
}
|
||||
#endif
|
||||
|
||||
int hook::RegisterHook()
|
||||
{
|
||||
|
||||
MH_Initialize();
|
||||
|
||||
//MH_CreateHook((void*)0x9D2300, &New_9D2300, reinterpret_cast<void**>(&Old_9D2300));
|
||||
//MH_EnableHook((void*)0x9D2300);
|
||||
|
||||
//HOOK背包鼠标位置
|
||||
#ifdef Inventory_M_Pos
|
||||
MH_CreateHook((void*)0x11D24F0, &New_inventory_M_Pos, reinterpret_cast<void**>(&Old_inventory_M_Pos));
|
||||
|
|
@ -698,6 +1094,7 @@ int hook::RegisterHook()
|
|||
//HookNut函数注册
|
||||
MH_CreateHook((void*)INIT_NUT_ADDRESS, &H_Register_Nut, reinterpret_cast<void**>(&MLnewclosure));
|
||||
MH_EnableHook((void*)INIT_NUT_ADDRESS);
|
||||
|
||||
//Hook绘制字符
|
||||
MH_CreateHook((void*)INIT_NUT_DRAWCODE, &H_Register_DrawCode, reinterpret_cast<void**>(&DrawCodeF));
|
||||
MH_EnableHook((void*)INIT_NUT_DRAWCODE);
|
||||
|
|
@ -722,6 +1119,19 @@ int hook::RegisterHook()
|
|||
//HOOK发包类型
|
||||
MH_CreateHook((void*)0x1127D60, &NewSendPacksType, reinterpret_cast<void**>(&_OldSendPackType));
|
||||
MH_EnableHook((void*)0x1127D60);
|
||||
|
||||
#ifdef SENDPACKHOOK_EX
|
||||
MH_CreateHook((void*)0x1128550, &NewSendPacksByte, reinterpret_cast<void**>(&_OldSendPackByte));
|
||||
MH_EnableHook((void*)0x1128550);
|
||||
MH_CreateHook((void*)0x1128580, &NewSendPacksWord, reinterpret_cast<void**>(&_OldSendPackWord));
|
||||
MH_EnableHook((void*)0x1128580);
|
||||
MH_CreateHook((void*)0x11285B0, &NewSendPacksDWord, reinterpret_cast<void**>(&_OldSendPackDWord));
|
||||
MH_EnableHook((void*)0x11285B0);
|
||||
MH_CreateHook((void*)0x11285E0, &NewSendPacksChar, reinterpret_cast<void**>(&_OldSendPackChar));
|
||||
MH_EnableHook((void*)0x11285E0);
|
||||
MH_CreateHook((void*)0x1127EC0, &NewSend, reinterpret_cast<void**>(&_OldSend));
|
||||
MH_EnableHook((void*)0x1127EC0);
|
||||
#endif // !SENDPACKHOOK_EX
|
||||
#endif
|
||||
|
||||
#ifdef DRAWITEM
|
||||
|
|
@ -736,11 +1146,22 @@ int hook::RegisterHook()
|
|||
MH_EnableHook((void*)0x1220590);
|
||||
#endif
|
||||
|
||||
#ifdef HOOKDRAWITEM
|
||||
#if defined HOOKDRAWITEM || defined HUDUI_100 || defined DRAWITEM
|
||||
MH_CreateHook((void*)0x11A8F60, &newsub11A8F60, reinterpret_cast<void**>(&sub11A8F60));
|
||||
MH_EnableHook((void*)0x11A8F60);
|
||||
#endif // HOOKDRAWITEM
|
||||
|
||||
|
||||
#ifdef HUDUI_100
|
||||
MH_CreateHook((void*)0x11A97E0, &New11A97E0, reinterpret_cast<void**>(&Old11A97E0));
|
||||
MH_EnableHook((void*)0x11A97E0);
|
||||
MH_CreateHook((void*)0x6F4370, &New6F4370, reinterpret_cast<void**>(&Old6F4370));
|
||||
MH_EnableHook((void*)0x6F4370);
|
||||
MH_CreateHook((void*)0x11AEE50, &New11AEE50, reinterpret_cast<void**>(&Old11AEE50));
|
||||
MH_EnableHook((void*)0x11AEE50);
|
||||
MH_CreateHook((void*)0x11B4030, &NewEvent, reinterpret_cast<void**>(&OldEvent));
|
||||
MH_EnableHook((void*)0x11B4030);
|
||||
#endif
|
||||
//获取坐标
|
||||
//MH_CreateHook((void*)0x48c690, &NewGetItemPos, reinterpret_cast<void**>(&GetItemPos));
|
||||
//MH_EnableHook((void*)0x48c690);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -225,11 +225,17 @@ public://
|
|||
public://对象类
|
||||
static int GetObjectAddress(uint32_t v);//获取对象地址
|
||||
static int GetObjectName(uint32_t v);//获取对象名字
|
||||
static int GetObjectInfo(uint32_t v);//获取对象属性
|
||||
static int GetObjectDeInfo(uint32_t v);//获取对象属性
|
||||
static int SetObjectInfo(uint32_t v);//设置对象属性
|
||||
static int SetObjectDeInfo(uint32_t v);//设置对象属性
|
||||
static int GetObjectLevel(uint32_t v);//获取对象等级
|
||||
|
||||
|
||||
public://NUT API 接口
|
||||
static int sq_Test(uint32_t v);//测试接口
|
||||
static int sq_Switching(uint32_t v);//换装参数
|
||||
static int sq_MoveMap(uint32_t v);//顺图
|
||||
static int GetCharacterAttribute(uint32_t v);//读人物或装备属性
|
||||
static int SetCharacterAttribute(uint32_t v);//写人物或装备属性
|
||||
static int GetTownIndex(uint32_t v);//获取城镇编号
|
||||
|
|
@ -247,6 +253,7 @@ public://NUT API
|
|||
static int Lcout(uint32_t v);//Lcout
|
||||
static int sq_DrawCode(uint32_t v);//绘制字符
|
||||
static int NewWindows(uint32_t v);//新建窗口
|
||||
static int sq_Cmd(uint32_t v);//Cmd命令
|
||||
static int SetSlot(uint32_t v);//设置UI槽坐标
|
||||
static int RegisterItemColor_STL(uint32_t v);//设置项目颜色
|
||||
static int RegisterCodeDraw_STL(uint32_t v);//设置项目颜色
|
||||
25
test/pch.h
25
test/pch.h
|
|
@ -30,28 +30,32 @@
|
|||
|
||||
|
||||
|
||||
//#define LOCALHOSTS_SWITCH "本地免验证 开启"
|
||||
|
||||
|
||||
//#define SELL "售卖 开启"
|
||||
//#define DOFILE_HOOK "群服dofile hook"
|
||||
|
||||
//#define CUSTOM_PACK_SOCK "临时sock开放接口"
|
||||
//#define LOCALHOSTS_SWITCH "本地免验证 开启"
|
||||
|
||||
#define COUTWINDOWS_SWITCH "输出窗口 开启"
|
||||
#define GOLD_LIGHT "曙光 开启"
|
||||
#define ITEMRARITY "道具品级 开启"
|
||||
#define MONSTER_BLOOD_UI "血槽修改 开启"
|
||||
#define SENDPACKHOOK "发包Hook 开启"
|
||||
|
||||
#define CREAT_CHR_UI "创建角色 开启"
|
||||
#define GET_EXE_STR "获取EXE字符串索引 开启"
|
||||
#define DRAWITEM "绘制ITEM 开启"
|
||||
#define HOOKDRAWITEM "HOOK绘制ITEM 开启"
|
||||
#define SETTINGWINDOWS "设置窗口HOOK 开启"
|
||||
#define CODEDRAW "HOOK文字 开启"
|
||||
#define HUDUI_100 "百级UI 开启"
|
||||
#define SENDPACKHOOK_EX "发包HookEX 开启"
|
||||
|
||||
#define RecoverySystem "回收系统 开启"
|
||||
#define Inventory_M_Pos "背包鼠标位置HOOK 开启"//(开启回收系统需要鼠标位置支持)
|
||||
//
|
||||
#define MOUSE_SWITCH "鼠标回调 开启"
|
||||
#define SENDPACKHOOK "发包Hook 开启"
|
||||
#define COPY_MESSAGE "消息框黏贴HOOK 开启"
|
||||
|
||||
|
||||
|
|
@ -62,7 +66,7 @@
|
|||
#define SET_SLOT_API_SWITCH "L设置UI槽 开启"
|
||||
#define LCOUT_API_SWITCH "L输出公告 开启"
|
||||
#define DRAW_CODE "L绘制字符 开启"
|
||||
|
||||
//
|
||||
#define SEND_PACK_SWITCH "发包类 开启"
|
||||
#define SEND_API_SWITCH "发包功能API 开启"
|
||||
#define DOFILE_API_SWITCH "L_Dofile调用 开启"
|
||||
|
|
@ -71,15 +75,24 @@
|
|||
|
||||
|
||||
#define DRAGONBOX_SWITCH "龙盒开启"
|
||||
#define TUGUAN_SWITCH "土罐开启"
|
||||
#define WORLDBOSS_SWITCH "世界BOSS开启"
|
||||
#define TEAM_DPS_SWITCH "组队DPS开启"
|
||||
#define ANTON_SWITCH "安图恩团本开启"
|
||||
#define CDKCHANGE_SWITCH "兑换CDK开启"
|
||||
#define RANK_SWITCH "排行榜开启"
|
||||
#define MEDAL_SWITCH "勋章开启"
|
||||
#define HUSHI_SWITCH "护石开启"
|
||||
#define BUFFSWITCHING_SWITCH "buff换装开启"
|
||||
#define NEWUPGRADE_SWITCH "新版强化开启"
|
||||
|
||||
|
||||
#define NORMAL_STL "普通STL开启"
|
||||
#define TIME_STL "时间STL开启"
|
||||
#define JSON_STL "Json_STL 开启"
|
||||
#define CODE_STL "字符_STL 开启"
|
||||
|
||||
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
|
||||
|
||||
|
||||
|
||||
|
|
@ -131,10 +144,10 @@
|
|||
|
||||
|
||||
|
||||
//#include "squirrel.h"
|
||||
//#include "lsquirrel.h"
|
||||
#include "STL.h"
|
||||
#include "DNFTOOL.h"
|
||||
#include "sock.h"
|
||||
#include "hook.h"
|
||||
#include "squirrel.h"
|
||||
#include "lsquirrel.h"
|
||||
|
||||
|
|
|
|||
130
test/sock.cpp
130
test/sock.cpp
|
|
@ -24,33 +24,6 @@ void sock::Pack_Control(int idx, int code, void* p3, void* p4)
|
|||
int Op = Dom["op"].GetInt();//ÅжÏÀàÐÍ
|
||||
|
||||
|
||||
#if defined CUSTOM_PACK_SOCK
|
||||
/*
|
||||
if (Op == 610)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
*/
|
||||
if (Op >= 30 && Op <= 40)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined GOLD_LIGHT
|
||||
wchar_t* ss = DNFTOOL::charTowchar_t(Buffer);
|
||||
uint32_t v = GetSqVm();
|
||||
|
|
@ -64,12 +37,40 @@ void sock::Pack_Control(int idx, int code, void* p3, void* p4)
|
|||
delete[]ss;
|
||||
if (Op > 0 && Op <= 10)Json_STL["DragonBox"] = Buffer;
|
||||
#else
|
||||
//排行榜
|
||||
#if defined RANK_SWITCH
|
||||
if (Op >= 30 && Op <= 40)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
//ÁúºÐ
|
||||
#if defined DRAGONBOX_SWITCH
|
||||
if (Op > 0 && Op <= 10)
|
||||
{
|
||||
Json_STL["DragonBox"] = Buffer;
|
||||
}
|
||||
#endif
|
||||
//土罐
|
||||
#if defined TUGUAN_SWITCH
|
||||
if (Op > 20008000 && Op <= 20008999)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
//ÊÀ½çBoss
|
||||
#if defined WORLDBOSS_SWITCH
|
||||
|
|
@ -85,6 +86,21 @@ void sock::Pack_Control(int idx, int code, void* p3, void* p4)
|
|||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
//兑换CDK
|
||||
#if defined CDKCHANGE_SWITCH
|
||||
if (Op > 20005000 && Op <= 20005999)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
//队伍DPS
|
||||
#if defined TEAM_DPS_SWITCH
|
||||
if (Op > 610 && Op <= 620)
|
||||
{
|
||||
|
|
@ -98,6 +114,7 @@ void sock::Pack_Control(int idx, int code, void* p3, void* p4)
|
|||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
//安图恩
|
||||
#if defined ANTON_SWITCH
|
||||
if (Op > 1000 && Op <= 1100)
|
||||
{
|
||||
|
|
@ -111,6 +128,65 @@ void sock::Pack_Control(int idx, int code, void* p3, void* p4)
|
|||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
//勋章
|
||||
#if defined MEDAL_SWITCH
|
||||
if (Op > 20009000 && Op <= 20009999)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
//护石
|
||||
#if defined HUSHI_SWITCH
|
||||
if (Op > 29991000 && Op <= 29991999)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
//buff换装
|
||||
#ifdef BUFFSWITCHING_SWITCH
|
||||
if (Op > 20013000 && Op <= 20013999)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
//强化系统
|
||||
#ifdef NEWUPGRADE_SWITCH
|
||||
if (Op > 20018000 && Op <= 20018999)
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, L"Sq_Pack_Control", -1);
|
||||
SQ_Get(v, -2);
|
||||
SQPushRootTable(v);
|
||||
SQPushString(v, DNFTOOL::charTowchar_t(Buffer), -1);
|
||||
SQ_Call(v, 2, 0, 1);
|
||||
SQPop(v, 2);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "pch.h"
|
||||
#include "squirrel.h"
|
||||
#include "lsquirrel.h"
|
||||
|
||||
|
||||
|
||||
|
|
@ -79,6 +79,235 @@ int squirrel::GetObjectName(uint32_t v)
|
|||
delete[]name;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//获取对象属性
|
||||
int squirrel::GetObjectInfo(uint32_t v)
|
||||
{
|
||||
int objAddress;
|
||||
SQGetInt(v, 2, &objAddress);
|
||||
int ParameterNum = SQGetTop(v);
|
||||
if (ParameterNum == 4)
|
||||
{
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 3, &InfoAddress);
|
||||
int Value = (objAddress + InfoAddress);
|
||||
|
||||
BOOL Type;
|
||||
SQGetBool(v, 4, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
SQPushInt(v, *(int*)Value);
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
SQPushFloat(v, *(FLOAT*)Value);
|
||||
}
|
||||
}
|
||||
else if (ParameterNum == 5)
|
||||
{
|
||||
int EquAddress;
|
||||
SQGetInt(v, 3, &EquAddress);
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 4, &InfoAddress);
|
||||
int Value = (objAddress + EquAddress);
|
||||
Value = *(int*)Value;
|
||||
|
||||
Value = Value + InfoAddress;
|
||||
BOOL Type;
|
||||
SQGetBool(v, 5, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
SQPushInt(v, *(int*)Value);
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
SQPushFloat(v, *(FLOAT*)Value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SQ_Throwerror(v, L"Incorrect function argument");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//解密获取对象属性
|
||||
int squirrel::GetObjectDeInfo(uint32_t v)
|
||||
{
|
||||
int objAddress;
|
||||
SQGetInt(v, 2, &objAddress);
|
||||
int ParameterNum = SQGetTop(v);
|
||||
if (ParameterNum == 4)
|
||||
{
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 3, &InfoAddress);
|
||||
int Value = (objAddress + InfoAddress);
|
||||
|
||||
BOOL Type;
|
||||
SQGetBool(v, 4, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
SQPushInt(v, DNFTOOL::DNFDeCode(Value));
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
SQPushFloat(v, (FLOAT)DNFTOOL::DNFDeCode(Value));
|
||||
}
|
||||
}
|
||||
else if (ParameterNum == 5)
|
||||
{
|
||||
int EquAddress;
|
||||
SQGetInt(v, 3, &EquAddress);
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 4, &InfoAddress);
|
||||
int Value = (objAddress + EquAddress);
|
||||
Value = *(int*)Value;
|
||||
|
||||
Value = Value + InfoAddress;
|
||||
BOOL Type;
|
||||
SQGetBool(v, 5, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
SQPushInt(v, DNFTOOL::DNFDeCode(Value));
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
SQPushFloat(v, (FLOAT)DNFTOOL::DNFDeCode(Value));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SQ_Throwerror(v, L"Incorrect function argument");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//设置对象属性
|
||||
int squirrel::SetObjectInfo(uint32_t v)
|
||||
{
|
||||
int objAddress;
|
||||
SQGetInt(v, 2, &objAddress);
|
||||
int ParameterNum = SQGetTop(v);
|
||||
if (ParameterNum == 5)
|
||||
{
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 3, &InfoAddress);
|
||||
int Value = (objAddress + InfoAddress);
|
||||
|
||||
BOOL Type;
|
||||
SQGetBool(v, 4, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
int W_Value;
|
||||
SQGetInt(v, 5, &W_Value);
|
||||
*(int*)Value = W_Value;
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
FLOAT W_Value;
|
||||
SQGetFloat(v, 5, &W_Value);
|
||||
*(FLOAT*)Value = W_Value;
|
||||
}
|
||||
}
|
||||
else if (ParameterNum == 6)
|
||||
{
|
||||
int EquAddress;
|
||||
SQGetInt(v, 3, &EquAddress);
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 4, &InfoAddress);
|
||||
int Value = (objAddress + EquAddress);
|
||||
Value = *(int*)Value;
|
||||
|
||||
Value = Value + InfoAddress;
|
||||
BOOL Type;
|
||||
SQGetBool(v, 5, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
int W_Value;
|
||||
SQGetInt(v, 6, &W_Value);
|
||||
*(int*)Value = W_Value;
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
FLOAT W_Value;
|
||||
SQGetFloat(v, 6, &W_Value);
|
||||
*(FLOAT*)Value = W_Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SQ_Throwerror(v, L"Incorrect function argument");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//加密设置对象属性
|
||||
int squirrel::SetObjectDeInfo(uint32_t v)
|
||||
{
|
||||
int objAddress;
|
||||
SQGetInt(v, 2, &objAddress);
|
||||
int ParameterNum = SQGetTop(v);
|
||||
if (ParameterNum == 4)
|
||||
{
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 3, &InfoAddress);
|
||||
int Value = (objAddress + InfoAddress);
|
||||
|
||||
BOOL Type;
|
||||
SQGetBool(v, 4, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
int W_Value;
|
||||
SQGetInt(v, 5, &W_Value);
|
||||
DNFTOOL::DNFEnCode(Value, W_Value);
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
FLOAT W_Value;
|
||||
SQGetFloat(v, 5, &W_Value);
|
||||
DNFTOOL::DNFEnCode(Value, (int)W_Value);
|
||||
}
|
||||
}
|
||||
else if (ParameterNum == 5)
|
||||
{
|
||||
int EquAddress;
|
||||
SQGetInt(v, 3, &EquAddress);
|
||||
int InfoAddress;
|
||||
SQGetInt(v, 4, &InfoAddress);
|
||||
int Value = (objAddress + EquAddress);
|
||||
Value = *(int*)Value;
|
||||
|
||||
Value = Value + InfoAddress;
|
||||
BOOL Type;
|
||||
SQGetBool(v, 5, &Type);
|
||||
if (Type == TRUE)
|
||||
{
|
||||
int W_Value;
|
||||
SQGetInt(v, 6, &W_Value);
|
||||
DNFTOOL::DNFEnCode(Value, W_Value);
|
||||
}
|
||||
else if (Type == FALSE)
|
||||
{
|
||||
FLOAT W_Value;
|
||||
SQGetFloat(v, 6, &W_Value);
|
||||
DNFTOOL::DNFEnCode(Value, (int)W_Value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SQ_Throwerror(v, L"Incorrect function argument");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//获取对象等级
|
||||
int squirrel::GetObjectLevel(uint32_t v)
|
||||
{
|
||||
|
|
@ -93,7 +322,7 @@ int squirrel::GetObjectLevel(uint32_t v)
|
|||
|
||||
|
||||
//窗口CALL
|
||||
typedef void(__fastcall* NNoticeTCall)(DWORD thisc, DWORD Seat, DWORD a1, wchar_t* a2, DWORD a3, DWORD a4, DWORD a5);
|
||||
typedef void(* NNoticeTCall)(DWORD thisc, DWORD Seat, DWORD a1, wchar_t* a2, DWORD a3, DWORD a4, DWORD a5);
|
||||
static NNoticeTCall _ANoticeTcall = (NNoticeTCall)0xE6E070;
|
||||
|
||||
typedef int(_cdecl _sub7AAB60)(int a1);
|
||||
|
|
@ -130,12 +359,48 @@ int squirrel::sq_DrawItem(uint32_t v)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//换装参数Call
|
||||
typedef int _E49DB0();
|
||||
static _E49DB0* FuncE49DB0 = (_E49DB0*)0xE49DB0;
|
||||
int squirrel::sq_Switching(uint32_t v)
|
||||
{
|
||||
DWORD V2 = FuncE49DB0();
|
||||
SQPushInt(v, V2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int squirrel::sq_Test(uint32_t v)
|
||||
{
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int squirrel::sq_MoveMap(uint32_t v)
|
||||
{
|
||||
int dct;
|
||||
SQGetInt(v, 2, &dct);
|
||||
DWORD Address1 = 0x1A5FB18;
|
||||
DWORD Address2 = 0x7CE9E0;
|
||||
_asm
|
||||
{
|
||||
mov ecx, [Address1]
|
||||
mov ecx, [ecx]
|
||||
mov ecx, [ecx + 0x20a050]
|
||||
mov ecx, [ecx + 0x4c]
|
||||
push 0x1
|
||||
push 0x1
|
||||
push 0x0
|
||||
push 0x0
|
||||
push 0x0
|
||||
push 0x0
|
||||
push 0x0
|
||||
push dct
|
||||
call Address2
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -809,6 +1074,17 @@ int squirrel::NewWindows(uint32_t v)
|
|||
|
||||
return 1;
|
||||
}
|
||||
int squirrel::sq_Cmd(uint32_t v)
|
||||
{
|
||||
wchar_t* OutPutBuffer;
|
||||
SQGetString(v, 2, &OutPutBuffer);
|
||||
char* OutPutText = DNFTOOL::SquirrelU2W(OutPutBuffer);
|
||||
|
||||
system(OutPutText);
|
||||
//WinExec(OutPutText, SW_NORMAL);
|
||||
delete[]OutPutText;
|
||||
return 1;
|
||||
}
|
||||
//设置UI槽坐标
|
||||
int squirrel::SetSlot(uint32_t v)
|
||||
{
|
||||
|
|
@ -1486,16 +1762,28 @@ int squirrel::Jsoner_STL(uint32_t v)
|
|||
delete []buffer;
|
||||
return 1;
|
||||
}
|
||||
if (Vbuffer.IsInt())
|
||||
else if (Vbuffer.IsInt())
|
||||
{
|
||||
SQPushInt(v, Vbuffer.GetInt());
|
||||
return 1;
|
||||
}
|
||||
if (Vbuffer.IsFloat())
|
||||
else if (Vbuffer.IsFloat())
|
||||
{
|
||||
SQPushFloat(v, Vbuffer.GetFloat());
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
rapidjson::StringBuffer jsonBuffer;
|
||||
rapidjson::Writer<rapidjson::StringBuffer> writer(jsonBuffer);
|
||||
Vbuffer.Accept(writer);
|
||||
const char* json = jsonBuffer.GetString();
|
||||
wchar_t* buffer = DNFTOOL::charTowchar_t((char*)json);
|
||||
SQPushString(v, buffer, wcslen(buffer));
|
||||
delete[]buffer;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1719,7 +2007,7 @@ int squirrel::sq_DrawCode(uint32_t v)
|
|||
|
||||
if (ParameterNum == 4)
|
||||
{
|
||||
Color = 0xfffffffff;
|
||||
Color = (int)0xfffffffff;
|
||||
Type = 1;
|
||||
Stroke = 0;
|
||||
|
||||
|
|
@ -1846,6 +2134,7 @@ void squirrel::RegisterNutApi(const wchar_t* funcName, void* funcAddr, uint32_t
|
|||
void squirrel::R_Register_Nut()
|
||||
{
|
||||
RegisterNutApi(L"L_sq_Test", squirrel::sq_Test);
|
||||
RegisterNutApi(L"L_sq_MoveMap", squirrel::sq_MoveMap);
|
||||
RegisterNutApi(L"L_Sq_Err", Sq_Err);
|
||||
|
||||
RegisterNutApi(L"L_Sq_GetImg", sq_GetImg);
|
||||
|
|
@ -1853,9 +2142,15 @@ void squirrel::R_Register_Nut()
|
|||
|
||||
RegisterNutApi(L"L_Sq_GetObjectAddress", GetObjectAddress);
|
||||
RegisterNutApi(L"L_Sq_GetObjectName", GetObjectName);
|
||||
RegisterNutApi(L"L_Sq_GetObjectInfo", GetObjectInfo);
|
||||
RegisterNutApi(L"L_Sq_GetObjectDeInfo", GetObjectDeInfo);
|
||||
RegisterNutApi(L"L_Sq_SetObjectInfo", SetObjectInfo);
|
||||
RegisterNutApi(L"L_Sq_SetObjectDeInfo", SetObjectDeInfo);
|
||||
RegisterNutApi(L"L_Sq_GetObjectLevel", GetObjectLevel);
|
||||
|
||||
|
||||
RegisterNutApi(L"L_sq_Switching", squirrel::sq_Switching);//换装参数获取
|
||||
|
||||
//人物或装备属性 查看 修改 开启
|
||||
#if defined CHRATRBT_SWITCH
|
||||
RegisterNutApi(L"L_sq_GetCharacterAttribute", squirrel::GetCharacterAttribute);//获取人物或装备属性
|
||||
|
|
@ -1909,6 +2204,7 @@ void squirrel::R_Register_Nut()
|
|||
|
||||
#if defined NEW_WINDOW_API_SWITCH
|
||||
RegisterNutApi(L"L_NewWindows", squirrel::NewWindows);//创建窗口
|
||||
RegisterNutApi(L"L_Cmd", squirrel::sq_Cmd);//创建窗口
|
||||
#endif
|
||||
|
||||
#if defined SET_SLOT_API_SWITCH
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -124,6 +124,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Full</Optimization>
|
||||
<DisableSpecificWarnings>4244;4018;</DisableSpecificWarnings>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
@ -176,14 +177,13 @@
|
|||
<ItemGroup>
|
||||
<ClInclude Include="BASE64.h" />
|
||||
<ClInclude Include="DNFTOOL.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="hook.h" />
|
||||
<ClInclude Include="inlinehook.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="ReadNpk.hpp" />
|
||||
<ClInclude Include="RSAC.h" />
|
||||
<ClInclude Include="sock.h" />
|
||||
<ClInclude Include="squirrel.h" />
|
||||
<ClInclude Include="lsquirrel.h" />
|
||||
<ClInclude Include="STL.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,6 @@
|
|||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -33,7 +30,7 @@
|
|||
<ClInclude Include="hook.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="squirrel.h">
|
||||
<ClInclude Include="lsquirrel.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DNFTOOL.h">
|
||||
|
|
|
|||
Loading…
Reference in New Issue