CLEO Help Hooking RPC

CLEO related
Status
Not open for further replies.

PlasticBottle

Active member
Joined
Jul 13, 2016
Messages
162
Reaction score
1
Hello, so i've been trying to do some things with RPCs, but I can't understand shit

I get that there is incoming and outcoming RPCs, that we can intercept and all, but I don't know how to use it in SB. I read the sf_raknet tutorial on blasthack, but it's hard to understand.

Can someone just explain to me (like really fast) how to do it ? I'm stuck with this code:

[shcode=cpp]
{$CLEO}
{$INCLUDE SF}

0000: NOP



0001: wait 1 ms

0BE3: raknet setup_incoming_rpc_hook @RPC_IN



:RPC_IN

0BE5: raknet 0@ = get_hook_param 0@ //THIS IS WHERE I'M STUCK
//I WANT TO GET INCOMING GAMETEXTS, SO I CAN COMPARE IT LATER (I KNOW HOW TO)







then

0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x1c // Press the JUMP key









:FAKE_KEYPRESS //SNIPPET

1@ = 0xB73458 

005A: 1@ += 0@  // (int)

0A8C: write_memory 1@ size 1 value 255 virtual_protect 0

0AB2: ret 0

[/shcode]
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Read the SF file if you include it. All the constants are there.
The hook param is one of the following, PACKETID being the PACKET or RPC id.

// RakNet Hook Parameters
const
PARAM_BITSTREAM = 0
PARAM_PACKETID = 1
PARAM_PRIORITY = 2
PARAM_RELIABILITY = 3
PARAM_ORDERINGCHANNEL = 4
PARAM_SHIFTTIMESTAMP = 5
end

[shcode=cpp]
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRDISPLAYGAMETEXT 
then
   0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
   do_stuff_with_the_incoming_data_at 1@
end
0BE0: raknet hook_ret TRUE/FALSE
[/shcode]
 
Status
Not open for further replies.
Top