block rpc address

UzziAdv

Member
Joined
Oct 16, 2018
Messages
6
Reaction score
1
eyy someone have an idea how can i block some rpc addresses?
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
depends. to simply block a rpc, stop the rpc callback from being called. when you get a RPC, at the end of the function it probably calls to some callback, just return false; or just return; before it is called.
for example in s0biet source:
Code:
void HandleRPCPacketFunc(unsigned char id, RPCParameters* rpcParams, void(*callback) (RPCParameters*))
{
	if(id == RPC_SpawnPlayer) return false;
	callback(rpcParams);
}
like this.
 

UzziAdv

Member
Joined
Oct 16, 2018
Messages
6
Reaction score
1
depends. to simply block a rpc, stop the rpc callback from being called. when you get a RPC, at the end of the function it probably calls to some callback, just return false; or just return; before it is called.
for example in s0biet source:
Code:
void HandleRPCPacketFunc(unsigned char id, RPCParameters* rpcParams, void(*callback) (RPCParameters*))
{
    if(id == RPC_SpawnPlayer) return false;
    callback(rpcParams);
}
like this.
thanks
 
Last edited:
Top