Şu an konuyu görüntüleyenler (Toplam : 1, Üye: 0, Misafir: 1)
Benzer konular
- 1 Değerlendirme
- 1 Değerlendirme
Metin2 EP, Valorant VP dahil tüm oyun ürünlerini en uygun fiyatlarla bulabilir, Item ve Karakterlerinizi hızlıca satabilirsiniz. HEMEN TIKLA!
//input.cpp açılır ve aratılır
int CInputHandshake::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
//input.cpp fonksiyon değiştiriir.
int CInputHandshake::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
{
if (bHeader == HEADER_CG_ENTERGAME)
return 0;
if (bHeader == HEADER_CG_MARK_LOGIN)
{
if (!guild_mark_server)
{
// ²÷¾î¹ö·Á! - ¸¶Å© ¼¹ö°¡ ¾Æ´Ñµ¥ ¸¶Å©¸¦ ¿äûÇÏ·Á°í?
sys_err("Guild Mark login requested but i'm not a mark server!");
d->SetPhase(PHASE_CLOSE);
return 0;
}
// ¹«Á¶°Ç ÀÎÁõ --;
sys_log(0, "MARK_SERVER: Login");
d->SetPhase(PHASE_LOGIN);
return 0;
}
else if (bHeader == HEADER_CG_STATE_CHECKER)
{
if (d->isChannelStatusRequested()) {
return 0;
}
d->SetChannelStatusRequested(true);
db_clientdesc->DBPacket(HEADER_GD_REQUEST_CHANNELSTATUS, d->GetHandle(), NULL, 0);
}
else if (bHeader == HEADER_CG_PONG)
Pong(d);
else if (bHeader == HEADER_CG_HANDSHAKE)
Handshake(d, c_pData);
[HASH=2]#ifdef[/HASH] _IMPROVED_PACKET_ENCRYPTION_
else if (bHeader == HEADER_CG_KEY_AGREEMENT)
{
// Send out the key agreement completion packet first
// to help client to enter encryption mode
d->SendKeyAgreementCompleted();
// Flush socket output before going encrypted
d->ProcessOutput();
TPacketKeyAgreement* p = (TPacketKeyAgreement*)c_pData;
if (!d->IsCipherPrepared())
{
sys_err ("Cipher isn't prepared. %s maybe a Hacker.", inet_ntoa(d->GetAddr().sin_addr));
d->DelayedDisconnect(5);
return 0;
}
if (d->FinishHandshake(p->wAgreedLength, p->data, p->wDataLength)) {
// Handshaking succeeded
if (g_bAuthServer) {
d->SetPhase(PHASE_AUTH);
}
else {
d->SetPhase(PHASE_LOGIN);
}
}
else {
sys_log(0, "[CInputHandshake] Key agreement failed: al=%u dl=%u",
p->wAgreedLength, p->wDataLength);
d->SetPhase(PHASE_CLOSE);
}
}
[HASH=3]#endif[/HASH] // _IMPROVED_PACKET_ENCRYPTION_
else
{
sys_err("Handshake phase does not handle packet %d (fd %d)", bHeader, d->GetSocket());
d->SetPhase(PHASE_CLOSE); // maybe disconnect player from server.
return -1;
}
return 0;
}
// input_login.cpp açılır ve aratılır...
sys_err("login phase does not handle this packet! header %d", bHeader);
//d->SetPhase(PHASE_CLOSE);
return 0;
// fonksiyon değiştirilir.
sys_err("login phase does not handle this packet! header %d", bHeader);
//d->SetPhase(PHASE_CLOSE);
return -1;
// input_main.cpp açılır ve aratılır...
int CInputMain::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
// fonksiyon kontrol ederek ekleyiniz.
int CInputMain::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
{
LPCHARACTER ch;
if (!(ch = d->GetCharacter()))
{
sys_err("no character on desc");
d->SetPhase(PHASE_CLOSE);
return -1;//FloodFix
}
//ExploitFix//
if (ch && ch->GetDesc()->GetPhase() != PHASE_GAME && ch->GetDesc()->GetPhase() != PHASE_DEAD)
{
sys_err("no character in game");
sys_log(0, "no character in game pid : %u phase : %u header : %u ip address : %s", ch->GetPlayerID(), ch->GetDesc()->GetPhase(), bHeader, ch->GetDesc()->GetHostName());
d->SetPhase(PHASE_CLOSE);
return -1;//FloodFix
}
//ExploitFix//
int iExtraLen = 0;
// input_main.cpp açılır ve aratılır...
int CInputDead::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
// fonksiyon kontrol ederek ekleyiniz.
int CInputDead::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
{
LPCHARACTER ch;
if (!(ch = d->GetCharacter()))
{
sys_err("no character on desc");
return -1;//FloodFix
}
if (ch && ch->IsPC())
{
if (get_global_time() < ch->analyze_protect)
{
ch->analyze_protect_count = (ch->analyze_protect_count + 1);
if (ch->analyze_protect_count >= 300)
{
sys_err("%s bu olu serefsiz packet flood yapiyor. Packet[%u]", ch->GetName(), bHeader);
ch->analyze_protect_count = 0;
d->SetPhase(PHASE_CLOSE);
return -1;//Fix
}
}
else
ch->analyze_protect_count = 0;
ch->analyze_protect = (get_global_time() + 1);
}
int iExtraLen = 0;
//input_main.cpp açılır ve aratılır.
int CInputDead::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
// Fonskiyon içinde bu bulunur
default:
return (0);
// Değiştirilir..
default:
return -1;//FloodFix
//char.h açılır aratılır.
int GetSyncHackCount() { return m_iSyncHackCount; }
// altına eklenir.
//FloodFix
public:
int analyze_protect;
int analyze_protect_count;
int analyze_protect_other_count;
//FloodFix
//desc.h açılır ve aratılır
bool IsPhase(int phase) const { return m_iPhase == phase ? true : false; }
// Altına eklenir.
int GetPhase() const { return m_iPhase; }
