[code] Anti Sniffer

#1
HGServer

Game.cpp - función MsgProcess()

Buscar:

Code: Select all

case MSGID_REQUEST_INITDATA:
Y reemplazar el case por este:

Code: Select all

			case MSGID_REQUEST_INITDATA:
				// Anti Bump 
                if (m_pClientList[iClientH]->m_bIsClientConnected == TRUE) {
                    if (m_pClientList[iClientH] == NULL) break;
                    wsprintf(G_cTxt, "(!!!) Client (%s) connection closed!. Sniffer suspect!.", m_pClientList[iClientH]->m_cCharName);
                    PutLogList(G_cTxt);
                    ZeroMemory(cData, sizeof(cData));
                    cp  = (char *)cData;
                    *cp = GSM_DISCONNECT;
                    cp++;
                    memcpy(cp, m_pClientList[iClientH]->m_cCharName, 10);
                    cp += 10;
                    bStockMsgToGateServer(cData, 11);
                    m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->ClearOwner(2, iClientH, DEF_OWNERTYPE_PLAYER, m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY);
                    bRemoveFromDelayEventList(iClientH, DEF_OWNERTYPE_PLAYER, NULL);
                    bSendMsgToLS(MSGID_REQUEST_SAVEPLAYERDATALOGOUT, iClientH, FALSE);
                    if ((dwTime - m_dwGameTime2) > 3000) { // 3 segs
                        m_pClientList[iClientH]->m_bIsClientConnected = FALSE;
                        m_iTotalClients--;
                        delete m_pClientList[iClientH];
                        m_pClientList[iClientH] = NULL;
                    }
                    break;
				}
                else {
                    m_pClientList[iClientH]->m_bIsClientConnected = TRUE;
                    RequestInitDataHandler(iClientH, pData, cKey, FALSE);
                }
				break;
en Client.cpp agregar:

Code: Select all

m_bIsClientConnected = FALSE;
en Client.h agregar:

Code: Select all

BOOL m_bIsClientConnected;
by Audioslave
Centuu.-

Sol Lucet Omnibus.-

Who is online

Users browsing this forum: No registered users and 1 guest

cron