Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

GunZ Patch Library (27 patches and counting)

Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
GunZ Patch Library (27 patches)

Apparently, people still enjoy exploiting this game. Just don't... it deserves to rest in peace.

Here's a full list of exploits that are covered in this library:


  • 1. MC_NET_CLEAR exploit
  • This packet can be used to crash the server by using a non-existing MUID.
  • 2. MC_NET_ECHO exploit
  • This packet can be used to send a message to a player if routed as peer packet.
  • 3. MC_MATCH_LOGIN_FROM_DBAGENT_FAILED exploit
  • If a valid MUID is provided, that player will be disconnected.
  • 4. MC_PEER_BUFF_INFO exploit
  • This will create a large loop resulting into a stack overflow.
  • 5. MC_MATCH_REGISTERAGENT exploit
  • Can be used to crash the MatchServer if the IP parameter is malformed.
  • 6. MC_NET_BANPLAYER_FLOODING exploit
  • See exploit #3
  • 7. MC_MATCH_DUELTOURNAMENT_REQUEST_JOINGAME exploit
  • Allows a hacker to send any player to join a duel tournament.
  • 8. MC_MATCH_DUELTOURNAMENT_REQUEST_CANCELGAME exploit
  • Allows a hacker to remove any player from a dual tournament.
  • 9. MC_MATCH_DUELTOURNAMENT_REQUEST_SIDERANKING_INFO exploit
  • Harmless.
  • 10. MC_MATCH_DUELTOURNAMENT_GAME_PLAYER_STATUS exploit
  • Allows a hacker to retreive the current status of any player. This exploit can be used together with exploit #7 and #8.
  • 11. MC_MATCH_CHANNEL_REQUEST_PLAYER_LIST exploit
  • Harmless.
  • 12. MC_MATCH_REQUEST_MY_SIMPLE_CHARINFO exploit
  • Allows a hacker to retreive character information on any character.
  • 13. MC_NET_DISCONNECT exploit
  • If this packet is routed as a peer packet, it will disconnect the player.
  • 14. MC_LOCAL_ECHO exploit
  • See exploit #2
  • 15. MC_MATCH_LOGIN exploit
  • Allows a hacker to crash your MatchServer by malforming the MD5 client hash.
  • 16. ZGame exploit
  • Allows a hacker to crash another player's client.
  • 17 - 27 SQL exploits
  • Allows a hacker to take full control over your database.

Legend:

  • High risk
  • Medium risk
  • Low risk

Scroll down to find and apply the appropriate fixes.

1.

CSCommon > MServer.cpp

Find:
PHP:
    case MC_NET_CLEAR:
        {
            MUID uid;
            if (pCommand->GetParameter(&uid, 0, MPT_UID)==false) break;
            OnNetClear(uid);
            return true;
        }
        break;

Replace with:
PHP:
     case MC_NET_CLEAR:
        {
            if (pCommand->GetSenderUID() != MUID(0, 2)) {
                // Not sent by server
                break;
            }

            MUID uid;
            if (pCommand->GetParameter(&uid, 0, MPT_UID)==false) break;
            OnNetClear(uid);
            return true;
        }
        break;

2.

CSCommon > MClient.cpp

Find:
PHP:
        case MC_NET_ECHO:
            if(pCommand->GetParameter(szMessage, 0, MPT_STR, sizeof(szMessage) )==false) break;
            OutputMessage(szMessage, MZMOM_LOCALREPLY);
            break;

Replace with:
PHP:
        case MC_NET_ECHO:
            //if(pCommand->GetParameter(szMessage, 0, MPT_STR, sizeof(szMessage) )==false) break;
            //OutputMessage(szMessage, MZMOM_LOCALREPLY);
            break;

3.

CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_LOGIN_FROM_DBAGENT_FAILED:
            {
                MUID CommUID;
                int nResult;

                if (pCommand->GetParameter(&CommUID,    0, MPT_UID)==false) break;
                if (pCommand->GetParameter(&nResult,    1, MPT_INT)==false) break;

                OnMatchLoginFailedFromDBAgent(CommUID, nResult);
            }
            break;

Replace with:
PHP:
        case MC_MATCH_LOGIN_FROM_DBAGENT_FAILED:
            {
                /*MUID CommUID;
                int nResult;

                if (pCommand->GetParameter(&CommUID,    0, MPT_UID)==false) break;
                if (pCommand->GetParameter(&nResult,    1, MPT_INT)==false) break;

                OnMatchLoginFailedFromDBAgent(CommUID, nResult);*/
            }
            break;

4.

Gunz > ZGame.cpp

Find:
PHP:
void ZGame::OnPeerBuffInfo(const MUID& uidSender, void* pBlobBuffInfo)
{
    if (uidSender == ZGetMyUID()) return;

    ZCharacter* pSender = ZGetCharacterManager()->Find(uidSender);
    if (!pSender) return;
    if (!pBlobBuffInfo) return;

    MTD_BuffInfo* pBuffInfo = NULL;
    int numElem = MGetBlobArrayCount(pBlobBuffInfo);
    
    for (int i=0; i<numElem; ++i)
    {
        pBuffInfo = (MTD_BuffInfo*)MGetBlobArrayElement(pBlobBuffInfo, i);

        ApplyPotion(pBuffInfo->nItemId, pSender, (float)pBuffInfo->nRemainedTime);
    }
}

Replace with:
PHP:
void ZGame::OnPeerBuffInfo(const MUID& uidSender, void* pBlobBuffInfo)
{
    if (uidSender == ZGetMyUID()) return;

    ZCharacter* pSender = ZGetCharacterManager()->Find(uidSender);
    if (!pSender) return;
    if (!pBlobBuffInfo) return;

    MTD_BuffInfo* pBuffInfo = NULL;
    int numElem = MGetBlobArrayCount(pBlobBuffInfo);
    
    // patch
    if (MGetBlobArraySize(pBlobBuffInfo) != (8 + (sizeof(MTD_BuffInfo) * numElem))) {
        return;
    }
    
    for (int i=0; i<numElem; ++i)
    {
        pBuffInfo = (MTD_BuffInfo*)MGetBlobArrayElement(pBlobBuffInfo, i);

        ApplyPotion(pBuffInfo->nItemId, pSender, (float)pBuffInfo->nRemainedTime);
    }
}

5.

CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_REGISTERAGENT:
            {
                char szIP[128];
                int nTCPPort, nUDPPort;

                if (pCommand->GetParameter(&szIP, 0, MPT_STR, sizeof(szIP) ) == false) break;
                if (pCommand->GetParameter(&nTCPPort, 1, MPT_INT) == false) break;
                if (pCommand->GetParameter(&nUDPPort, 2, MPT_INT) == false) break;

                OnRegisterAgent(pCommand->GetSenderUID(), szIP, nTCPPort, nUDPPort);
            }

Replace with:
PHP:
        case MC_MATCH_REGISTERAGENT:
            {
                char szIP[128];
                int nTCPPort, nUDPPort;

                if (pCommand->GetParameter(&szIP, 0, MPT_STR, sizeof(szIP) ) == false) break;
                if (pCommand->GetParameter(&nTCPPort, 1, MPT_INT) == false) break;
                if (pCommand->GetParameter(&nUDPPort, 2, MPT_INT) == false) break;

                // Not the best way to patch, but working for now
                if (strstr(szIP, "%")) {
                    break;
                }
                
                OnRegisterAgent(pCommand->GetSenderUID(), szIP, nTCPPort, nUDPPort);
            }

6.

CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_NET_BANPLAYER_FLOODING :
            {
                MUID uidPlayer;
                
                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                if (MGetServerConfig()->IsUseBlockFlooding())
                {
                    MMatchObject* pObj = GetObject( uidPlayer );
                    if( pObj && pObj->GetDisconnStatusInfo().GetStatus() == MMDS_CONNECTED)
                    {
                        if( pObj->GetAccountName() ) {
                            LOG(LOG_PROG,"Ban Player On Flooding - (MUID:%d%d, ID:%s)"
                                , uidPlayer.High, uidPlayer.Low, pObj->GetAccountName());
                        } else {
                            LOG(LOG_PROG,"Ban Player On Flooding - (MUID:%d%d, ID:%s)"
                                , uidPlayer.High, uidPlayer.Low);
                        }
                        
                        pObj->DisconnectHacker( MMHT_COMMAND_FLOODING );
                    }
                    else
                    {
                        LOG(LOG_PROG,"Ban Player On Flooding - Can't Find Object");
                    }
                }
            }
            break;

Replace with:
PHP:
        case MC_NET_BANPLAYER_FLOODING :
            {
                /*MUID uidPlayer;
                
                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                if (MGetServerConfig()->IsUseBlockFlooding())
                {
                    MMatchObject* pObj = GetObject( uidPlayer );
                    if( pObj && pObj->GetDisconnStatusInfo().GetStatus() == MMDS_CONNECTED)
                    {
                        if( pObj->GetAccountName() ) {
                            LOG(LOG_PROG,"Ban Player On Flooding - (MUID:%d%d, ID:%s)"
                                , uidPlayer.High, uidPlayer.Low, pObj->GetAccountName());
                        } else {
                            LOG(LOG_PROG,"Ban Player On Flooding - (MUID:%d%d, ID:%s)"
                                , uidPlayer.High, uidPlayer.Low);
                        }
                        
                        pObj->DisconnectHacker( MMHT_COMMAND_FLOODING );
                    }
                    else
                    {
                        LOG(LOG_PROG,"Ban Player On Flooding - Can't Find Object");
                    }
                }*/
            }
            break;

7.

CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_DUELTOURNAMENT_REQUEST_JOINGAME :
            {
                MUID uidPlayer;
                MDUELTOURNAMENTTYPE nType;

                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                pCommand->GetParameter(&nType, 1, MPT_INT);

                if( MGetServerConfig()->IsEnabledDuelTournament() )    {
                    ResponseDuelTournamentJoinChallenge(uidPlayer, nType);
                }

            }
            break;

Replace with:
PHP:
        case MC_MATCH_DUELTOURNAMENT_REQUEST_JOINGAME :
            {
                //MUID uidPlayer;
                MDUELTOURNAMENTTYPE nType;

                //pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                pCommand->GetParameter(&nType, 1, MPT_INT);

                if( MGetServerConfig()->IsEnabledDuelTournament() )    {
                    ResponseDuelTournamentJoinChallenge(pCommand->GetSenderUID(), nType);
                }

            }
            break;

8.
CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_DUELTOURNAMENT_REQUEST_CANCELGAME :
            {
                MUID uidPlayer;
                MDUELTOURNAMENTTYPE nType;

                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                pCommand->GetParameter(&nType, 1, MPT_INT);

                if( MGetServerConfig()->IsEnabledDuelTournament() )    {
                    ResponseDuelTournamentCancelChallenge(uidPlayer, nType);
                }
            }
            break;

Replace with:
PHP:
        case MC_MATCH_DUELTOURNAMENT_REQUEST_CANCELGAME :
            {
                //MUID uidPlayer;
                MDUELTOURNAMENTTYPE nType;

                //pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                pCommand->GetParameter(&nType, 1, MPT_INT);

                if( MGetServerConfig()->IsEnabledDuelTournament() )    {
                    ResponseDuelTournamentCancelChallenge(pCommand->GetSenderUID(), nType);
                }
            }
            break;

9.
CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
       case MC_MATCH_DUELTOURNAMENT_REQUEST_SIDERANKING_INFO :
            {
                MUID uidPlayer;

                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);

                if( MGetServerConfig()->IsEnabledDuelTournament() ){
                    ResponseDuelTournamentCharSideRanking(uidPlayer);
                }
            }
            break;

Replace with:
PHP:
        case MC_MATCH_DUELTOURNAMENT_REQUEST_SIDERANKING_INFO :
            {
                //MUID uidPlayer;

                //pCommand->GetParameter(&uidPlayer, 0, MPT_UID);

                if( MGetServerConfig()->IsEnabledDuelTournament() ){
                    ResponseDuelTournamentCharSideRanking(pCommand->GetSenderUID());
                }
            }
            break;

10.
CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_DUELTOURNAMENT_GAME_PLAYER_STATUS :
            {
                MUID uidPlayer;
                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);

                if( MGetServerConfig()->IsEnabledDuelTournament() ){
                    ResponseDuelTournamentCharStatusInfo(uidPlayer, pCommand);
                }
            }
            break;

Replace with:
PHP:
        case MC_MATCH_DUELTOURNAMENT_GAME_PLAYER_STATUS :
            {
                //MUID uidPlayer;
                //pCommand->GetParameter(&uidPlayer, 0, MPT_UID);

                if( MGetServerConfig()->IsEnabledDuelTournament() ){
                    ResponseDuelTournamentCharStatusInfo(pCommand->GetSenderUID(), pCommand);
                }
            }
            break;

11.
CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_CHANNEL_REQUEST_PLAYER_LIST:
            {
                MUID uidPlayer, uidChannel;
                int nPage;

                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                pCommand->GetParameter(&uidChannel, 1, MPT_UID);
                pCommand->GetParameter(&nPage, 2, MPT_INT);

                OnChannelRequestPlayerList(uidPlayer, uidChannel, nPage);
            }
            break;

Replace with:
PHP:
        case MC_MATCH_CHANNEL_REQUEST_PLAYER_LIST:
            {
                MUID /*uidPlayer, */uidChannel;
                int nPage;

                //pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                pCommand->GetParameter(&uidChannel, 1, MPT_UID);
                pCommand->GetParameter(&nPage, 2, MPT_INT);

                OnChannelRequestPlayerList(pCommand->GetSenderUID(), uidChannel, nPage);
            }
            break;

12.
CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_REQUEST_MY_SIMPLE_CHARINFO:
            {
                MUID uidPlayer;
                pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                OnRequestMySimpleCharInfo(uidPlayer);
            }
            break;

Replace with:
PHP:
        case MC_MATCH_REQUEST_MY_SIMPLE_CHARINFO:
            {
                //MUID uidPlayer;
                //pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
                OnRequestMySimpleCharInfo(pCommand->GetSenderUID());
            }
            break;

13.
CSCommon > MClient.cpp

Find:
PHP:
case MC_NET_DISCONNECT:
            Disconnect(m_Server);
            break;

Replace with:
PHP:
        case MC_NET_DISCONNECT: 
        {
            if (pCommand->GetSenderUID() != GetUID()) {
                // Packet wasn't generated by our own client
                break;
            }

            Disconnect(m_Server);
            break; 
        }

14.
CSCommon > MClient.cpp

Find:
PHP:
        case MC_LOCAL_ECHO:
            if(pCommand->GetParameter(szMessage, 0, MPT_STR, sizeof(szMessage))==false) break;
            OutputMessage(szMessage, MZMOM_LOCALREPLY);
            break;

Replace with:
PHP:
        case MC_LOCAL_ECHO:
            //if(pCommand->GetParameter(szMessage, 0, MPT_STR, sizeof(szMessage))==false) break;
            //OutputMessage(szMessage, MZMOM_LOCALREPLY);
            break;

15.

CSCommon > MMatchServer__OnCommand.cpp

Find:
PHP:
        case MC_MATCH_LOGIN:
            {
                char szUserID[ MAX_USERID_STRING_LEN ];
                char szPassword[ MAX_USER_PASSWORD_STRING_LEN ];
                int nCommandVersion = 0;
                unsigned long nChecksumPack = 0;
                if (pCommand->GetParameter(szUserID, 0, MPT_STR, MAX_USERID_STRING_LEN )==false) break;
                if (pCommand->GetParameter(szPassword, 1, MPT_STR, MAX_USER_PASSWORD_STRING_LEN )==false) break;
                if (pCommand->GetParameter(&nCommandVersion, 2, MPT_INT)==false) break;
                if (pCommand->GetParameter(&nChecksumPack, 3, MPT_UINT)==false) break;
                MCommandParameter* pLoginParam = pCommand->GetParameter(4);
                if (pLoginParam->GetType() != MPT_BLOB) break;
                void *pLoginBlob = pLoginParam->GetPointer();
                if( NULL == pLoginBlob )
                {
                    // Hacker°¡ BlobÀÇ Å©±â¸¦ Á¶Á¤Çϸé MCommand¸¦ ¸¸µé¶§ Blobµ¥ÀÌÅÍ°¡ NULLÆ÷ÀÎÅ͸¦ °¡Áú¼ö ÀÖ´Ù.
                    break;
                }
                char *szEncryptMD5Value = (char *)MGetBlobArrayElement(pLoginBlob, 0);
                
                OnMatchLogin(pCommand->GetSenderUID(), szUserID, szPassword, nCommandVersion, nChecksumPack, szEncryptMD5Value);
            }
            break;

Replace with:
PHP:
        case MC_MATCH_LOGIN:
            {
                char szUserID[ MAX_USERID_STRING_LEN ];
                char szPassword[ MAX_USER_PASSWORD_STRING_LEN ];
                int nCommandVersion = 0;
                unsigned long nChecksumPack = 0;
                if (pCommand->GetParameter(szUserID, 0, MPT_STR, MAX_USERID_STRING_LEN )==false) break;
                if (pCommand->GetParameter(szPassword, 1, MPT_STR, MAX_USER_PASSWORD_STRING_LEN )==false) break;
                if (pCommand->GetParameter(&nCommandVersion, 2, MPT_INT)==false) break;
                if (pCommand->GetParameter(&nChecksumPack, 3, MPT_UINT)==false) break;
                MCommandParameter* pLoginParam = pCommand->GetParameter(4);
                if (pLoginParam->GetType() != MPT_BLOB) break;
                void *pLoginBlob = pLoginParam->GetPointer();
                if( NULL == pLoginBlob )
                {
                    // Hacker°¡ BlobÀÇ Å©±â¸¦ Á¶Á¤Çϸé MCommand¸¦ ¸¸µé¶§ Blobµ¥ÀÌÅÍ°¡ NULLÆ÷ÀÎÅ͸¦ °¡Áú¼ö ÀÖ´Ù.
                    break;
                }
                
                // Patch
                if (MGetBlobArraySize(pLoginBlob) != (8 + MAX_MD5LENGH)) {
                    break;
                }
                
                char *szEncryptMD5Value = (char *)MGetBlobArrayElement(pLoginBlob, 0);
                
                OnMatchLogin(pCommand->GetSenderUID(), szUserID, szPassword, nCommandVersion, nChecksumPack, szEncryptMD5Value);
            }
            break;

16.

Gunz > ZGame.cpp

Find:
PHP:
int ZGame::SelectSlashEffectMotion(ZCharacter* pCharacter)
{
    if(pCharacter==NULL) return SEM_None;

Replace with:
PHP:
int ZGame::SelectSlashEffectMotion(ZCharacter* pCharacter)
{
    if(pCharacter==NULL || pCharacter->GetSelectItemDesc() == NULL) return SEM_None;

17 - 27 are all located within CSCommon > MMatchCDMgr.cpp

17.

Find:
PHP:
strSQL.Format(g_szDB_GET_LOGININFO, szUserID);

Replace with:
PHP:
    string strUserID = m_DBFilter.Filtering( string(szUserID) );
    strSQL.Format(g_szDB_GET_LOGININFO, &strUserID[0]);

18.

Find:
PHP:
strSQL.Format(g_szDB_GET_LOGININFO_NETMARBLE2, szUserID, poutPassword);

Replace with:
PHP:
    string strUserID = m_DBFilter.Filtering( string(szUserID) );
    strSQL.Format(g_szDB_GET_LOGININFO_NETMARBLE2, &strUserID[0], poutPassword);

19.

Find:
PHP:
strSQL.Format(g_szDB_CREATE_ACCOUNT, szUserID, szPassword, nCert, szName, nAge, nSex);

Replace with:
PHP:
        string strUserID = m_DBFilter.Filtering( string(szUserID) );
        string strPassword = m_DBFilter.Filtering( string(szPassword) );
        string strName = m_DBFilter.Filtering( string(szName) );
        strSQL.Format(g_szDB_CREATE_ACCOUNT, &strUserID[0], &strPassword[0], nCert, &strName[0], nAge, nSex);

20.

Find:
PHP:
strSQL.Format(g_szDB_CREATE_ACCOUNT_NETMARBLE, szUserID, szPassword, nAge, nSex, nCCode);

Replace with:
PHP:
    string strUserID = m_DBFilter.Filtering( string(szUserID) );
    string strPassword = m_DBFilter.Filtering( string(szPassword) );    
    strSQL.Format(g_szDB_CREATE_ACCOUNT_NETMARBLE, &strUserID[0], &strPassword[0], nAge, nSex, nCCode);

21.

Find:
PHP:
strSQL.Format( g_szCheckDuplicateCharName, szNewName );

Replace with:
PHP:
        string strNewName = m_DBFilter.Filtering( string(szNewName) );
        strSQL.Format( g_szCheckDuplicateCharName, &strNewName[0] );

22.

Find:
PHP:
strSQL.Format(g_szDB_CREATE_CHAR, nAID, nCharIndex, szNewName,  nSex, nHair, nFace, nCostume);

PHP:
        string strNewName = m_DBFilter.Filtering( string(szNewName) );
        strSQL.Format(g_szDB_CREATE_CHAR, nAID, nCharIndex, &strNewName[0],  nSex, nHair, nFace, nCostume);

23.

Find:
PHP:
strSQL.Format(g_szDB_DELETE_CHAR, nAID, nCharIndex, szCharName);

Replace with:
PHP:
    string strCharName = m_DBFilter.Filtering( string(szCharName) );
    strSQL.Format(g_szDB_DELETE_CHAR, nAID, nCharIndex, &strCharName[0]);

24.

Find:
PHP:
strSQL.Format(g_szDB_UPDATE_LAST_CONNDATE, szIP, szUserID);

Replace with:
PHP:
        string strUserID = m_DBFilter.Filtering( string(szUserID) );
        strSQL.Format(g_szDB_UPDATE_LAST_CONNDATE, szIP, &strUserID[0]);

25.

Find:
PHP:
strSQL.Format(g_szDB_CREATE_CLAN, szClanName, nMasterCID, nMember1CID, nMember2CID, nMember3CID, nMember4CID);

Replace with:
PHP:
    string strClanName = m_DBFilter.Filtering( string(szClanName) );
    strSQL.Format(g_szDB_CREATE_CLAN, &strClanName[0], nMasterCID, nMember1CID, nMember2CID, nMember3CID, nMember4CID);

26.

Find:
PHP:
strSQL.Format(g_szDB_RESERVE_CLOSE_CLAN, nCLID, szClanName, nMasterCID, strDeleteDate.c_str() );

Replace with:
PHP:
        string strClanName = m_DBFilter.Filtering( string(szClanName) );
        strSQL.Format(g_szDB_RESERVE_CLOSE_CLAN, nCLID, &strClanName[0], nMasterCID, strDeleteDate.c_str() );

27.

Find:
PHP:
strSQL.Format(g_szDB_EXPEL_CLAN_MEMBER, nCLID, nAdminGrade, szMember);

Replace with:
PHP:
    string strMember = m_DBFilter.Filtering( string(szMember) );
    strSQL.Format(g_szDB_EXPEL_CLAN_MEMBER, nCLID, nAdminGrade, &strMember[0]);
 
Last edited:
Skilled Illusionist
Joined
Oct 27, 2011
Messages
382
Reaction score
172
Re: Patch for 12 exploits

I agree,
people still enjoy exploiting this game. Just don't... it deserves to rest in peace.
Thanks alot. You really help Gunz and their small player count that still enjoy the game.
Long live wizkidje.
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: Patch for 12 exploits

Why you did that for this community, i can't understand it.
Btw GJ.

Because there are still people who enjoy playing GunZ. I don't care about GunZ, but I've enjoyed developing it in the past and I see no reason why players shouldn't be able to enjoy it (even in 2013).

Next to that, if I weren't to release this patches to the public, self-claimed developers would go around servers asking money for a patch that would either fail to work or is leeched.
 
Last edited:
Junior Spellweaver
Joined
Feb 14, 2013
Messages
129
Reaction score
1
Re: Patch for 12 exploits

Thanks brooooo <3'
 
Joined
Jul 9, 2009
Messages
716
Reaction score
324
Re: Patch for 12 exploits

Because there are still people that enjoy playing GunZ. I don't care about GunZ, but I've enjoyed developing it in the past and I see no reason why players shouldn't be able to enjoy it (even in 2013).

Next to that, if I weren't to release this patches to the public, self-claimed developers would go around servers asking money for a patch that would either fail to work or is leeched.
Thank you again, Btw i think
case MC_MATCH_CHANNEL_REQUEST_PLAYER_LIST:
Here if you will disable this
//pCommand->GetParameter(&uidPlayer, 0, MPT_UID);
It will do bot connection and than you will get troubles (It will copy character in lobby) and every secound you will get more and more bot players.
Example Your character name is Wizkidz you will see in the lobby Wizkidz, Wizkidz, Wizkidz, Wizkidz...

EDIT: Yeah i checked it on my computer and i got the same thing i wrote here.
Something of the patch is doing it and i think it's the
case MC_MATCH_CHANNEL_REQUEST_PLAYER_LIST:
 
Last edited:
Newbie Spellweaver
Joined
Sep 13, 2012
Messages
99
Reaction score
46
Re: Patch for 12 exploits

PHP:
 // Not the best way to patch, but working for now
                if (strstr(szIP, "%")) {
                    break;
                }

I had made ​​it to my server 2008 version and not solved. To patch this have to remove the function LOG OnRegisterAgent or modify it.
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: Patch for 12 exploits

Thank you again, Btw i think
Here if you will disable this
It will do bot connection and than you will get troubles (It will copy character in lobby) and every secound you will get more and more bot players.
Example Your character name is Wizkidz you will see in the lobby Wizkidz, Wizkidz, Wizkidz, Wizkidz...

EDIT: Yeah i checked it on my computer and i got the same thing i wrote here.
Something of the patch is doing it and i think it's the

That's strange, are you sure you didn't do anything else? Hit me up on Skype so I can debug it.

PHP:
 // Not the best way to patch, but working for now
                if (strstr(szIP, "%")) {
                    break;
                }

I had made ​​it to my server 2008 version and not solved. To patch this have to remove the function LOG OnRegisterAgent or modify it.

No, this works. You obviously did something else.
 
Newbie Spellweaver
Joined
Sep 13, 2012
Messages
99
Reaction score
46
Re: Patch for 12 exploits

Yeah, I had used this same ... (CDetour MMatchServer_OnCommand) in 2008 doens't work i was removed LOG function to work, maybe in 1.5 is different
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: Patch for 12 exploits

Yeah, I had used this same ... (CDetour MMatchServer_OnCommand) in 2008 doens't work i was removed LOG function to work, maybe in 1.5 is different

Then your detour didn't work and it was still passed through to OnRegisterAgent.
 
Skilled Illusionist
Joined
May 10, 2013
Messages
321
Reaction score
59
Re: Patch for 12 exploits

Thanks for releasing this, I appreciate the way you think.
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: Patch for 12 exploits

Nope you can check it by your self run the server on your computer and login to your server and you will see bot connection

I've provided the patches using notepad, I don't have Visual Studio 2003 / SQL Server installed.
 
Joined
Jul 9, 2009
Messages
716
Reaction score
324
Re: Patch for 12 exploits

I've provided the patches using notepad, I don't have Visual Studio 2003 / SQL Server installed.

EDIT: I found the problem, it's from here:
Find:
PHP Code:
case MC_NET_ECHO:
{
char szMessage[256];
if (pCommand->GetParameter(szMessage, 0, MPT_STR, sizeof(szMessage) )==false) break;
MCommand* pNew = new MCommand(m_CommandManager.GetCommandDescByID(MC_NET_ECHO), pCommand->m_Sender, m_This);
pNew->AddParameter(new MCommandParameterString(szMessage));
Post(pNew);
return true;
}
break;
Replace with:
PHP Code:
case MC_NET_ECHO:
{
/*char szMessage[256];
if (pCommand->GetParameter(szMessage, 0, MPT_STR, sizeof(szMessage) )==false) break;
MCommand* pNew = new MCommand(m_CommandManager.GetCommandDescByID(MC_NET_ECHO), pCommand->m_Sender, m_This);
pNew->AddParameter(new MCommandParameterString(szMessage));
Post(pNew);*/
return true;
}
break;
I know it's wired, but i tested it.
And i guess you know what will happen if it is not going to be patched...(own post)
 
Last edited:
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: Patch for 12 exploits

EDIT: I found the problem, it's from here:

I know it's wired, but i tested it.
And i guess you know what will happen if it is not going to be patched...(own post)

There's no need to edit that at the MatchServer, just disable the bird thingy. First post updated.
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: Patch for 14 exploits

Added two more exploits, fixed patch for exploit #2.
 
Back
Top