Server taraflı Anti hile Rehberi

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 64

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Anti Waithack:


Anti Safezone:

*char_battle.cpp

Bulun:
Kod:
bool CHARACTER::Attack(LPCHARACTER pkVictim, BYTE bType) { if (test_server) sys_log(0, "[TEST_SERVER] Attack : %s type %d, MobBattleType %d", GetName(), bType, !GetMobBattleType() ? 0 : GetMobAttackRange()); //PROF_UNIT puAttack("Attack"); if (!CanMove()) return false;

Altına ekleyin:
Kod:
SECTREE *sectree = NULL; SECTREE *vsectree = NULL; sectree = GetSectree(); vsectree = pkVictim->GetSectree(); if (sectree && vsectree){ if (sectree->IsAttr(GetX(), GetY(), ATTR_BANPK) || vsectree->IsAttr(pkVictim->GetX(), pkVictim->GetY(), ATTR_BANPK)) { if (GetDesc()) { LogManager::instance().HackLog("ANTISAFEZONE", this); GetDesc()->DelayedDisconnect(3); } } }






Anti Ghostmode:
*input_main.cpp

Bulun:
Kod:
if (!test_server) //2012.05.15 ±è¿ë¿í : Å×¼·¿¡¼* (¹«Àû»óÅ·Î) ´Ù¼ö ¸ó½ºÅÍ »ó´ë·Î ´Ù¿îµÇ¸é¼* °ø°İ½Ã ÄŞº¸ÇÙÀ¸·Î Á×´Â ¹®Á¦°¡ ÀÖ¾ú´Ù.

Altına ekleyin:
Kod:
if (ch->IsPC() && ch->IsDead()) { if (ch->GetDesc()) { LogManager::instance().HackLog("GHOSTMODE", ch); ch->GetDesc()->DelayedDisconnect(3); } }






Anti Wallhack:
*input_main.cpp

Bulun:
Kod:
const float fDist = DISTANCE_SQRT((ch->GetX() - pinfo->lX) / 100, (ch->GetY() - pinfo->lY) / 100);
Üstüne ekleyin:
Kod:
PIXEL_POSITION pos = ch->GetXYZ(); if (!SECTREE_MANAGER::instance().GetMovablePosition(c h->GetMapIndex(), pos.x, pos.y, pos)) { if (ch->GetDesc()) { LogManager::instance().HackLog("WALLHACK", ch); ch->GetDesc()->DelayedDisconnect(3); } }





Anti Long name generator:
*input_login.cpp

Bulun:
Kod:
if (true == g_BlockCharCreation) { d->Packet(&packFailure, sizeof(packFailure)); return; }
Altına ekleyin:
Kod:
if (strlen(pinfo->name) > 12){ d->Packet(&packFailure, sizeof(packFailure)); return; }



#Güncelleme 1

-Client taraflı-

PythonPlayerModule.cpp


Kod:
{ "SetItemData", playerSetItemData, METH_VARARGS },
*Sahte item oluşturma fonkiyonu


PythonItemModule.cpp


Kod:
{ "CreateItem", itemCreateItem, METH_VARARGS },
*Sahte item oluşturma fonkiyonu


PythonCharacterModule.cpp


Kod:
{ "IsGameMaster", chrIsGameMaster, METH_VARARGS },
*Gm dedektör fonksiyonu


Bu fonksiyonlar kullanılmıyor, bu satırları silin.

-Server taraflı-

Anti Maden botu
Orjinal mesaj(Lefloyd @epvp)

*char.cpp

Ara:
Kod:
if (mining::GetRawOreFromLoad(chLoad->GetRaceNum()) == 0) return;
Üstüne ekle:
Kod:
if (GetMapIndex() != chLoad->GetMapIndex() || DISTANCE_APPROX(GetX() - chLoad->GetX(), GetY() - chLoad->GetY()) > 1000) return;




Su olmayan yerde balık tutma fix
Orjinal mesaj(Lefloyd @epvp)

*char.cpp

Bul:
Kod:
void CHARACTER::fishing()

Üstüne ekle:
Kod:
bool CHARACTER::IsNearWater() const { if (!GetSectree()) return false; for (int x = -1; x <= 1; ++x) { for (int y = -1; y <= 1; ++y) { if (IS_SET(GetSectree()->GetAttribute(GetX() + x * 100, GetY() + y * 100), ATTR_WATER)) return true; } } return false; }


Bul:
Kod:
if (m_pkFishingEvent) { fishing_take(); return; }

Altına ekle:
Kod:
if (!IsNearWater()) return;




*char.h

Bul:
Kod:
void fishing();

Üstüne ekle:
Kod:
bool IsNearWater() const;



Anti renkli pazar

*input_main.cpp

Bul:
Kod:
if (uiBytes < sizeof(TPacketCGMyShop) + iExtraLen) return -1;
Üstüne ekle:
Kod:
if (strstr(p->szSign, ("|c")) || strstr(p->szSign, ("|C"))){ LogManager::instance().HackLog("COLORFUL_SHOP", ch); return (iExtraLen); }




Anti Drophack

*char_item.cpp

Bul:
Kod:
LPCHARACTER owner = funcFindOwnership.owner;
Üstüne ekle:
Kod:
if (!owner) { LogManager::instance().HackLog("DROPHACK", this); return false; }




#Güncelleme 2

-Server taraflı-


Anti Fishbot

*fishing.cpp

Ara:
Kod:
int ret = Compute(info->fish_id, ms, &item_vnum, GetFishingLevel(ch));
Altına ekle:
Kod:
if (!ch->GetLastFishTime()) ch->SetLastFishTime(ms); else { if (ch->GetFishHackCount() == 3) { ch->ResetFishHackCount(); LogManager::instance().HackLog("FISHBOT", ch); ch->GetDesc()->DelayedDisconnect(3); } else { if ((ms == ch->GetLastFishTime()) || (abs(ch->GetLastFishTime() - ms) < 70) || (abs(ms - ch->GetLastFishTime()) < 70)) ch->UpdateFishHackCount(); else ch->ResetFishHackCount(); } } if (test_server) ch->ChatPacket(CHAT_TYPE_INFO, "/HACK-TEST/ Last: %d Now: %d HackCount: %d", ch->GetLastFishTime(), ms, ch->GetFishHackCount());




*char.cpp

Ara:
Kod:
m_dwMountTime = 0;
Üstüne ekle:
Kod:
m_iLastFishTime = 0; m_iFishHackCount = 0;




Ara:
Kod:
void CHARACTER::ResetChatCounter()
Üstüne ekle:
Kod:
void CHARACTER::SetLastFishTime(int time) { m_iLastFishTime = time; } int CHARACTER::GetLastFishTime() { return m_iLastFishTime; } int CHARACTER::GetFishHackCount() { return m_iFishHackCount; } void CHARACTER::UpdateFishHackCount() { m_iFishHackCount += 1; } void CHARACTER::ResetFishHackCount() { m_iFishHackCount = 0; }




*char.h

Ara:
Kod:
DWORD GetSkipComboAttackByTime() const;
Altına ekle:
Kod:
int GetFishHackCount(); void UpdateFishHackCount(); void ResetFishHackCount(); void SetLastFishTime(int time); int GetLastFishTime();




Ara:
Kod:
DWORD m_dwSkipComboAttackByTime;
Altına ekle:
Kod:
int m_iFishHackCount; int m_iLastFishTime;




Anti Guild Maker(düşük seviyede)

*input_main.cpp


Ara:
Kod:
if (ch->GetGold() < 200000) return;
Altına ekle:
Kod:
if (ch->GetLevel() < 40) { LogManager::instance().HackLog("GUILDMAKER", ch); ch->GetDesc()->DelayedDisconnect(3); return; }




Anti Teleport Hack'i aktif etme

*input_main.cpp

Bul:
Kod:
if( false == LC_IsEurope() ) { const PIXEL_POSITION & warpPos = ch->GetWarpPosition(); if (warpPos.x == 0 && warpPos.y == 0) LogManager::instance().HackLog("Teleport", ch); // ºÎÁ¤È®ÇÒ ¼ö ÀÖÀ½ } sys_log(0, "MOVE: %s trying to move too far (dist: %.1fm) Riding(%d)", ch->GetName(), fDist, ch->IsRiding()); ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ()); ch->Stop(); return;
Değiştir:
Kod:
const PIXEL_POSITION & warpPos = ch->GetWarpPosition(); if (warpPos.x == 0 && warpPos.y == 0) LogManager::instance().HackLog("Teleport", ch); // ºÎÁ¤È®ÇÒ ¼ö ÀÖÀ½ sys_log(0, "MOVE: %s trying to move too far (dist: %.1fm) Riding(%d)", ch->GetName(), fDist, ch->IsRiding()); ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ()); ch->Stop(); ch->GetDesc()->DelayedDisconnect(0); return;



-Client taraflı-


Anti py injection

*EterPack/EterPackManager.cpp
Ara:
Kod:
bool CEterPackManager::GetFromFile(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData)
Bul:
Kod:
#ifndef _DEBUG //const char *pcExt = strchr(c_szFileName, '.'); //if (pcExt &&  // _strnicmp(pcExt, ".py", 3) == 0 && // python ½ºÅ©¸³Æ® Áß // stricmp(c_szFileName, "logininfo.py") != 0 && // ·Î±×ÀÎ Á¤º¸ ÆÄÀÏÀÌ ¾Æ´Ï°í // strnicmp(c_szFileName, "locale", 6) != 0 // ) //{ // return false; //} #endif
Değiştir:
Kod:
const char *pcExt = strchr(c_szFileName, '.'); if (_strnicmp(pcExt, ".py", 3) == 0){ PostQuitMessage(0); }


Anti Anti Stun & Anti Sanal GM Efekti

*PythonCharacterManagerModule.cpp

Silin:
Kod:
{ "SetAffect", chrmgrSetAffect, METH_VARARGS },


Anti Attackspeed & Anti Movespeed

*PythonCharacterModule.cpp

Aşağıdaki satırları silin:
Kod:
{ "SetMoveSpeed", chrSetMoveSpeed, METH_VARARGS }, { "SetAttackSpeed", chrSetAttackSpeed, METH_VARARGS },


Bu konu altındaki başlıklar genel olarak kullanılan hileleri engellemek için yeterlidir
Daha iyi bir koruma için ve bot, hile ve macro scriptlerini engellemek için modül yada fonksiyon isimlerini değiştirmenizide öneririm
Aşağıda net modülünün adını değiştirmek için basit bir anlatım var




*PythonNetworkStreamModule.cpp


Ara:
Kod:
PyObject* poModule = Py_InitModule("net", s_methods);
Modül adını kendinize göre değiştirin, örnek olarak:
Kod:
PyObject* poModule = Py_InitModule("mt2net", s_methods);

Şimdi, Tüm python dosyalarını Notepad++ ile açın


CTRL+H ye basın ve Gelen ekrandan Değiştir butonuna basın


"Aranan" kısmına bunu yazın: import net


"Değiştir" kısmına bunu yazın: import mt2net as net
Server Taraflı Anti Hile Rehberi

Metin2 özel sunucularında güvenliği artırmak ve hile kullanımını engellemek için server taraflı anti hile sistemleri kritik öneme sahiptir. Bu rehberde, Metin2 özel sunucu geliştirme sürecinde kullanılabilecek anti hile tekniklerini detaylıca inceleyeceğiz.

Anti Hile Nedir?
Anti hile sistemleri, oyuncuların oyun içi kuralları ihlal eden yazılımlar veya modifikasyonlar aracılığıyla avantaj elde etmesini önlemek amacıyla geliştirilen koruma mekanizmalarıdır. Metin2 gibi MMORPG oyunlarında özellikle PvP sistemlerinde bu sistemler hayati önem taşır.

Server Tarafının Önemi
Client tarafında çalışan bazı hileler kolayca tespit edilebilirken, daha gelişmiş hileler için server taraflı kontrol mekanizmaları gerekir. Server tarafında çalışan anti hile sistemleri, oyun verilerini doğrulayarak istemciye gönderilen komutları analiz eder ve anormal davranışları tespit eder.

Sunucu Tarafında Uygulanabilecek Temel Yöntemler

1. Paket Doğrulama Sistemleri
Oyuncudan gelen her paketin içeriği incelenmelidir. Örneğin, bir oyuncunun belirli bir süre içinde çok fazla hasar vermesi durumunda anomali tespiti yapılabilir. Bu doğrulamalar, auth ve game server üzerinde entegre şekilde çalıştırılmalıdır.

2. Zaman Tabanlı Kontroller
Bazı eylemlerin gerçekçi sürelere sahip olup olmadığı kontrol edilmelidir. Örneğin, bir oyuncunun çok kısa sürede birçok kez saldırması, normal gameplay'e uymuyorsa hile olasılığı yüksektir. Bu kontroller C++ src üzerinde geliştirilmelidir.

3. Cheat Engine ve Benzeri Yazılımların Engellenmesi
Sunucu tarafında çalışan sistemler doğrudan client üzerindeki hileleri tespit edemez ancak anomali gösteren verileri analiz ederek dolaylı yoldan tespit yapabilir. Bu nedenle, client-side hilelerle mücadelede server taraflı loglama ve izleme mekanizmaları büyük rol oynar.

Python ve C++ Kombinasyonu ile Geliştirilen Sistemler
Metin2 özel sunucularında anti hile sistemleri genellikle C++ tabanlı game server üzerinde geliştirilir. Ancak bazı analiz ve loglama işlemleri için Python GUI tabanlı yardımcı programlar da kullanılabilir. Bu tür sistemler, real-time veri analizi sağlayarak hile tespiti konusunda daha güçlüdür.

Martysama ve Diğer Geliştirici Araçları
Metin2 geliştiricileri arasında popüler olan Martysama ve benzeri kaynaklar, anti hile geliştirme sürecinde büyük destek sağlar. Bu araçlar sayesinde py root, uiscript ve diğer sistemler üzerinde daha etkili çözümler üretmek mümkündür.

DB Core Üzerinde Güvenlik
Database seviyesinde de güvenlik önlemleri alınmalıdır. Oyuncu verilerinde beklenmedik değişiklikler tespit edildiğinde alarm sistemleri devreye girmelidir. Bu tür kontroller, DB Core seviyesinde yapılmakta ve hileli veri girişlerinin önüne geçilmektedir.

Sonuç
Server taraflı anti hile sistemleri, Metin2 özel sunucularında adil oyun ortamı sağlamak adına hayati bir rol üstlenir. Doğru uygulandığında, hem PvP sistemlerinde dengeleri korur hem de hileli oyuncuların sunucudan uzaklaştırılmasını sağlar. Geliştiricilerin, C++, Python ve database teknolojilerini bir arada kullanarak daha sağlam sistemler geliştirmesi önerilir.


Server-Side Anti-Cheat Guide

In Metin2 private servers, enhancing security and preventing cheating through server-side anti-cheat systems is critical. In this guide, we will examine anti-cheat techniques that can be used during the Metin2 private server development process in detail.

What is Anti-Cheat?
Anti-cheat systems are protection mechanisms developed to prevent players from gaining advantages by using unauthorized software or modifications that violate in-game rules. In MMORPG games like Metin2, especially in PvP systems, these systems are of vital importance.

The Importance of the Server Side
While some cheats running on the client side can be easily detected, more advanced cheats require server-side control mechanisms. Server-side anti-cheat systems verify game data, analyze commands sent by the client, and detect abnormal behaviors.

Basic Methods That Can Be Applied on the Server Side

1. Packet Validation Systems
The content of every packet coming from the player should be examined. For example, if a player deals excessive damage in a short period of time, anomaly detection can be triggered. These validations must run integrated across both auth and game servers.

2. Time-Based Checks
It must be checked whether certain actions take place within realistic timeframes. For instance, if a player attacks multiple times in an unreasonably short period, there's a high probability of cheating. These checks should be implemented within the C++ src code.

3. Blocking Cheat Engine and Similar Software
Server-side systems cannot directly detect client-side cheats, but they can indirectly detect anomalies by analyzing suspicious data. Therefore, logging and monitoring mechanisms on the server side play a significant role in combating client-side cheats.

Systems Developed with Python and C++ Combination
Anti-cheat systems in Metin2 private servers are generally developed on C++ based game servers. However, Python-based GUI helper programs can also be used for analysis and logging. Such systems provide real-time data analysis and are more effective at cheat detection.

Martysama and Other Developer Tools
Popular among Metin2 developers, tools like Martysama offer great support during the development of anti-cheat systems. With these tools, more efficient solutions can be created on py root, uiscript, and other systems.

Security on DB Core
Security measures must also be taken at the database level. When unexpected changes are detected in player data, alarm systems should be triggered. These checks are performed at the DB Core level to prevent fraudulent data entries.

Conclusion
Server-side anti-cheat systems play a vital role in ensuring fair gameplay in Metin2 private servers. When correctly implemented, they maintain balance in PvP systems and help remove cheaters from the server. Developers are advised to combine C++, Python, and database technologies to build more robust systems.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt