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)

Junior Spellweaver
Joined
Feb 14, 2013
Messages
129
Reaction score
1
Re: GunZ Patch Library (16 patches and counting)

this too right?'-'
PHP:
               case MC_MATCH_REQUEST_STAGE_LIST:
            {
                MUID uidPlayer, uidChannel;
                int nStageCursor;
                uidPlayer = pCommand->GetSenderUID();

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

                OnStageRequestStageList(uidPlayer, uidChannel, nStageCursor);
            }
            break;
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: GunZ Patch Library (16 patches and counting)

this too right?'-'
PHP:
               case MC_MATCH_REQUEST_STAGE_LIST:
            {
                MUID uidPlayer, uidChannel;
                int nStageCursor;
                uidPlayer = pCommand->GetSenderUID();

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

                OnStageRequestStageList(uidPlayer, uidChannel, nStageCursor);
            }
            break;

Just revert patch 11 and see if that helps.
 
Junior Spellweaver
Joined
Jun 29, 2007
Messages
147
Reaction score
53
Re: GunZ Patch Library (16 patches and counting)

Just revert patch 11 and see if that helps.
I've tested the patches and luckily I found out it was the very first patch (MC_NET_CLEAR).
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: GunZ Patch Library (16 patches and counting)

I've tested the patches and luckily I found out it was the very first patch (MC_NET_CLEAR).

That's odd, I'll look into it tomorrow.
 
Junior Spellweaver
Joined
Feb 14, 2013
Messages
129
Reaction score
1
Re: GunZ Patch Library (16 patches and counting)

still buggy still.

Just revert patch 11 and see if that helps.
I've tested the patches and luckily I found out it was the very first patch (MC_NET_CLEAR).

this bug of multiplying players is the patch 1?
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: GunZ Patch Library (16 patches and counting)

still buggy still.



this bug of multiplying players is the patch 1?

Yeah, re-apply patch 11 and disable patch 1 for now. I'll have it fixed by tomorrow.
 
Junior Spellweaver
Joined
Feb 14, 2013
Messages
129
Reaction score
1
Re: GunZ Patch Library (16 patches and counting)

Ok Thanks <3'
 
Newbie Spellweaver
Joined
Jun 6, 2013
Messages
93
Reaction score
74
Re: GunZ Patch Library (16 patches and counting)

Code:
    case MC_NET_CLEAR:
        {
            if(pCommand->GetSenderUID() != m_This) break; // Accept this command only (Sender == Server.)
            
            MUID uid;
            if (pCommand->GetParameter(&uid, 0, MPT_UID)==false) break;
            OnNetClear(uid);
            return true;
        }
        break;

Code:
case MC_NET_DISCONNECT:
            if(pCommand->GetSenderUID() != m_This) break; // (Sender != My Client)
            
            Disconnect(m_Server);
            break;

If this is correct it will work.
 
Last edited:
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: GunZ Patch Library (16 patches and counting)

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

If this is correct it will work.

I don't see how it's any different from what I did. I think the senderuid() is corrupted at that packet or something, not sure.
 
Joined
Jul 9, 2009
Messages
716
Reaction score
324
Re: GunZ Patch Library (16 patches and counting)

Yeah, re-apply patch 11 and disable patch 1 for now. I'll have it fixed by tomorrow.
That was the net echo patch you forgot?

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)
 
Junior Spellweaver
Joined
Jun 29, 2007
Messages
147
Reaction score
53
Re: GunZ Patch Library (16 patches and counting)

Code:
    case MC_NET_CLEAR:
        {
            MUID uid;


            if (pCommand->GetParameter(&uid, 0, MPT_UID)==false || pCommand->GetSenderUID() != m_This )
                break;


            OnNetClear(uid);
            return true;
        }
        break;

The problem was that the command is normally only posted by the server and never by a client.

EDIT: Oh duck someone was before me..
 
Joined
Jul 9, 2009
Messages
716
Reaction score
324
Re: GunZ Patch Library (16 patches and counting)

Nope, that's patch 2.
Yeah and with the number 2 patch he got the same thing that i got before
He posted a image:
Solaire - GunZ Patch Library (27 patches and counting) - RaGEZONE Forums

Maybe he didn't saw that you updated the thread, and he is using the old patch that was in this thread of NET_ECHO.
He did this part:
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;
 
Junior Spellweaver
Joined
Jun 29, 2007
Messages
147
Reaction score
53
Re: GunZ Patch Library (16 patches and counting)

Yeah and with the number 2 patch he got the same thing that i got before
He posted a image:

Maybe he didn't saw that you updated the thread, and he is using the old patch that was in this thread of NET_ECHO.

Affirmative.
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Re: GunZ Patch Library (16 patches and counting)

Affirmative.

All right, thanks, I'll put the first patch back in the OP. If you find any bugs, feel free to report them and I'll fix them as soon as possible.

I'll be providing patches for the SQL injections sometime soon.
 
Rival Gamers Owner
Loyal Member
Joined
Jul 7, 2007
Messages
962
Reaction score
161
Re: GunZ Patch Library (16 patches and counting)

some of the exploits can be fixed by putting them under (only the packets that are send from matchserver to matchserver or from agent to matchserver its a better fix for the ban on player flooding instead of commenting it out) if (nSharedType&MSCT_MATCHSERVER || nSharedType&MSCT_AGENT)

heres mine:
Code:
if (nSharedType&MSCT_MATCHSERVER || nSharedType&MSCT_AGENT) {
	C(MC_NET_CONNECTTOZONESERVER, "Net.ConnectToZoneServer", "Connect to zone-server", MCDT_LOCAL)
	
	C(MC_LOCAL_INFO, "Local.Info", "Local information", MCDT_LOCAL)

	C(MC_LOCAL_ECHO, "Local.Echo", "Local echo test", MCDT_LOCAL)
		P(MPT_STR, "Message");
	C(MC_LOCAL_LOGIN, "Local.Login", "Local Login", MCDT_LOCAL)
		P(MPT_UID, "uidComm")
		P(MPT_UID, "uidPlayer")

	C(MC_HELP, "Help", "This command", MCDT_LOCAL);
	C(MC_VERSION, "Version", "Version description", MCDT_LOCAL);
	
	C(MC_NET_ENUM, "Net.Enum", "Enum server list", MCDT_LOCAL);
	C(MC_NET_CLEAR, "Net.Clear", "Clear Connection", MCDT_LOCAL);
		P(MPT_UID, "uid")
	C(MC_NET_CHECKPING, "Net.CheckPing", "Check ping time", MCDT_LOCAL);
		P(MPT_UID, "uid")
	C(MC_NET_BANPLAYER_FLOODING, "MC_NET_BANPLAYER_FLOODING", "Request To Server From CommandBuilder", MCDT_LOCAL )
		P( MPT_UID, "User UID");

		C(MC_MATCH_REGISTERAGENT, "Match.RegisterAgent", "Register Agent to MatchServer", MCDT_MACHINE2MACHINE)
			P(MPT_STR, "Address")
			P(MPT_INT, "Port")
			P(MPT_INT, "UDPPort")
		C(MC_MATCH_UNREGISTERAGENT, "Match.UnRegisterAgent", "Unregister Agent from MatchServer", MCDT_MACHINE2MACHINE)
		C(MC_MATCH_AGENT_REQUEST_LIVECHECK, "Match.Agent.RequestLiveCheck", "Request LiveCheck for Agent", MCDT_MACHINE2MACHINE)
			P(MPT_UINT, "TimeStamp")
			P(MPT_UINT, "StageCount")
			P(MPT_UINT, "UserCount")
		C(MC_MATCH_AGENT_RESPONSE_LIVECHECK, "Match.Agent.ResponseLiveCheck", "Response LiveCheck for Agent", MCDT_MACHINE2MACHINE)
			P(MPT_UINT, "TimeStamp")
		C(MC_AGENT_STAGE_RESERVE, "Agent.StageReserve", "Reserve stage on AgentServer", MCDT_MACHINE2MACHINE)
			P(MPT_UID, "StageUID")
		C(MC_AGENT_STAGE_RELEASE, "Agent.StageRelease", "Release stage on AgentServer", MCDT_MACHINE2MACHINE)
			P(MPT_UID, "StageUID")
		C(MC_AGENT_STAGE_READY, "Agent.StageReady", "Ready to Handle stage", MCDT_MACHINE2MACHINE)
			P(MPT_UID, "StageUID")
		C(MC_AGENT_RELAY_PEER, "Agent.RelayPeer", "Let agent to Relay Peer", MCDT_MACHINE2MACHINE)
			P(MPT_UID, "PlayerUID");
			P(MPT_UID, "PeerCharUID");
			P(MPT_UID, "StageUID");
		C(MC_AGENT_PEER_READY, "Agent.PeerReady", "Ready to relay peer", MCDT_MACHINE2MACHINE)
			P(MPT_UID, "PlayerUID");
			P(MPT_UID, "PeerCharUID");
	}
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Added 11 fixes for SQL exploits in the OP.
 
Joined
Jul 9, 2009
Messages
716
Reaction score
324
I have error, rejoin and Playermultiplies

REMOVED
Search for:
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:
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;
 
Back
Top