|
You last visited: Today at 20:28
Advertisement
[Guide] Handling Client Networking @ Any State Process
Discussion on [Guide] Handling Client Networking @ Any State Process within the SRO Coding Corner forum part of the Silkroad Online category.
07/28/2020, 17:11
|
#16
|
elite*gold: 0
Join Date: Apr 2012
Posts: 263
Received Thanks: 271
|
Quote:
Originally Posted by #HB
Hey there,
I've been hella busy lately, some guy asked me about handling messages in client-side like a week ago, I told 'em I'll make a guide and I totally got busy & forgot.
Anyways, lets get into this.
Note: Structures don't really have to be 100% correct, that's just analyzing & guesses.
How To Hook State Process: Since OnPacketRecv is a virtual function, its a different function with a different address per state process.
The main place where OnPacketRecv is called should be at:
Code:
00BA8FB1 | FF D0 | call eax | OnPacketRecv
So basically, you can set a breakpoint there in different state processes & get the address of the function.
For example, I want the address of CPSTitle::OnPacketRecv, so I set a breakpoint on that address above during login section, when the breakpoint hits, get the value of EAX, thats your function address.
I made an example as for CPSMission, which handles msgs after selecting your character.
Code:
replaceAddr(0x00DD440C, addr_from_this(&CPSMission::OnPacketRecv));
And that's all.
Note: If you're planning to use ReadStringA or ReadStringW functions, you need to ensure you're using VC80 compiler, AKA Visual Studio 2005.
Special thanks to: florian0 
|
I have included it in sro_dev but it shows nothing
Can you guide how to help it work. I really need it
|
|
|
07/28/2020, 19:09
|
#17
|
elite*gold: 0
Join Date: Mar 2010
Posts: 568
Received Thanks: 228
|
Quote:
Originally Posted by thaidu0ngpr0
I have included it in sro_dev but it shows nothing
Can you guide how to help it work. I really need it
|
hello again
this can help you
|
|
|
07/28/2020, 23:03
|
#18
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,108
Received Thanks: 903
|
Modification:-
-Fixed few bugs with string functions at CMsgStreamBuffer and updated code to be more readable.
Quote:
Originally Posted by thaidu0ngpr0
I have included it in sro_dev but it shows nothing
Can you guide how to help it work. I really need it
|
What do you mean it shows nothing?
|
|
|
08/02/2020, 23:13
|
#19
|
elite*gold: 0
Join Date: Apr 2012
Posts: 263
Received Thanks: 271
|
Quote:
Originally Posted by #HB
Modification:-
-Fixed few bugs with string functions at CMsgStreamBuffer and updated code to be more readable.
What do you mean it shows nothing?
|
How can I combine it with sro_devkit
|
|
|
08/03/2020, 02:55
|
#20
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,108
Received Thanks: 903
|
Quote:
Originally Posted by thaidu0ngpr0
How can I combine it with sro_devkit
|
You can't combine it, DevKit has its own CMsgStreamBuffer just with different labels and maybe better parse.
You can use both already by renaming the class.
|
|
|
08/03/2020, 08:09
|
#21
|
elite*gold: 0
Join Date: Apr 2012
Posts: 263
Received Thanks: 271
|
Quote:
Originally Posted by #HB
You can't combine it, DevKit has its own CMsgStreamBuffer just with different labels and maybe better parse.
You can use both already by renaming the class.
|
I tried, but it didn't work, I tried calling GUI with opcode 0xB070 but GUI didn't appear
I need to do something else for it to work
CPSMission.cpp
PHP Code:
#include "CPSMission.h" #include "ClientNet/MsgStreamBuffer.h" #include "GInterface.h"
int CPSMission::OnPacketRecv(CMsgStreamBuffer* MsgBuffer) { if (MsgBuffer->msgid() == 0xB070)//Show Form { int FormID = 5004; byte ShowHide = -1; *MsgBuffer >> FormID >> ShowHide;
if (FormID != 0 ) { g_pCGInterface->m_IRM.GetResObj(FormID, 1)->ShowGWnd(true); }
MsgBuffer->FlushRemaining(); } //Returning 1 means packet is accepted & read, 0 means fail & afair client may crash if you do return 0 //Also, if you're planning to read original packets, set TotalReadBytes to 0 after you finish reading, because sro_client will re-read this stuff and if any byte were read before, it'll crash because it attempts to read over max bytes limit. return reinterpret_cast<int(__thiscall*)(CPSMission*, CMsgStreamBuffer*)>(0x0084CAB0)(this, MsgBuffer); }
|
|
|
08/03/2020, 22:19
|
#22
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,108
Received Thanks: 903
|
Are you sure you're hooking?
|
|
|
08/04/2020, 05:46
|
#23
|
elite*gold: 0
Join Date: Apr 2012
Posts: 263
Received Thanks: 271
|
Quote:
Originally Posted by #HB
Are you sure you're hooking?
|
florian0 he told me to need a vftable hook. but I don't know where to get the vftable hook. Can you guide me to hook it.
thank you for sharing
my discord : Thaidu0ngpr0#3327
|
|
|
08/04/2020, 14:57
|
#24
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,108
Received Thanks: 903
|
Quote:
Originally Posted by thaidu0ngpr0
Can you guide me to hook it.
|
Did you read main post? :3
|
|
|
08/04/2020, 16:24
|
#25
|
elite*gold: 0
Join Date: Apr 2012
Posts: 263
Received Thanks: 271
|
Quote:
Originally Posted by #HB
Did you read main post? :3
|
thank you very much . I did it
|
|
|
08/05/2020, 09:06
|
#26
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,108
Received Thanks: 903
|
.
Quote:
Originally Posted by #HB
How To Hook State Process: Since OnPacketRecv is a virtual function, its a different function with a different address per state process.
The main place where OnPacketRecv is called should be at:
Code:
00BA8FB1 | FF D0 | call eax | OnPacketRecv
So basically, you can set a breakpoint there in different state processes & get the address of the function.
For example, I want the address of CPSTitle::OnPacketRecv, so I set a breakpoint on that address above during login section, when the breakpoint hits, get the value of EAX, thats your function address.
CPSMission example:
Code:
replaceAddr(0x00DD440C, addr_from_this(&CPSMission::OnPacketRecv));
|
|
|
|
11/13/2020, 18:10
|
#27
|
elite*gold: 0
Join Date: Aug 2010
Posts: 10
Received Thanks: 1
|
Quote:
Originally Posted by #HB
Hey there,
I've been hella busy lately, some guy asked me about handling messages in client-side like a week ago, I told 'em I'll make a guide and I totally got busy & forgot.
Anyways, lets get into this.
Note: Structures don't really have to be 100% correct, that's just analyzing & guesses.
How To Hook State Process: Since OnPacketRecv is a virtual function, its a different function with a different address per state process.
The main place where OnPacketRecv is called should be at:
Code:
00BA8FB1 | FF D0 | call eax | OnPacketRecv
So basically, you can set a breakpoint there in different state processes & get the address of the function.
For example, I want the address of CPSTitle::OnPacketRecv, so I set a breakpoint on that address above during login section, when the breakpoint hits, get the value of EAX, thats your function address.
I made an example as for CPSMission, which handles msgs after selecting your character.
Code:
replaceAddr(0x00DD440C, addr_from_this(&CPSMission::OnPacketRecv));
And that's all.
Note: If you're planning to use ReadStringA or ReadStringW functions, you need to ensure you're using VC80 compiler, AKA Visual Studio 2005.
Special thanks to: florian0 
|
Linkleri yenilermisiniz? sayfalar açılmıyor
|
|
|
11/13/2020, 18:57
|
#28
|
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,486
|
Quote:
Originally Posted by d4rk123
Linkleri yenilermisiniz? sayfalar açılmıyor
|
Links are fine
|
|
|
11/14/2020, 06:14
|
#29
|
elite*gold: 0
Join Date: Aug 2010
Posts: 10
Received Thanks: 1
|
Quote:
Originally Posted by florian0
Links are fine
|
opened thanks to vpn. thank you
|
|
|
07/26/2021, 19:33
|
#30
|
elite*gold: 0
Join Date: Jul 2020
Posts: 163
Received Thanks: 15
|
Quote:
Originally Posted by sarkoplata
you can hook: 0x008418D0
the first arg pushed into the stack is a CMsgStreamBuffer*.
|
Please boss add my discord i need your help
Kotsh#5187
|
|
|
 |
|
Similar Threads
|
Any legit networking site here ?
12/13/2017 - Cryptocurrencies - 1 Replies
Permision to post admin im just asking here if they got legit networking site TIA
|
Mit Process Explorer /Process Hacker Hs umgehen
05/22/2010 - General Gaming Discussion - 1 Replies
Ich habe hier im Forum gelesen, das man mit Process Explorer bzw. Process Hacker das HS umgehen kann. Leider ist mir irgendwie schleierhaft wie das gehen soll. Vllt erbarmt sich jemand und erklärt es (:, da man den sogenannten Bypasser nur noch las Premium Dings Da bei Upload.to runterladen kann :rolleyes:
|
C# how to pause a process/freeze process
12/08/2008 - CO2 Programming - 2 Replies
ya so i was semi bored and after little bit of looking around i didnt find to many examples of how to do this so attached is a demo project to show you how.
basically it comes down to calling ResumeThread() and SuspendThread() (API functions) on all the threads of a process...simple enough
http://img388.imageshack.us/img388/9762/exampleil 6.png
please note when you enter the process name there's no ".exe" to the end
Warning: this isn't idiot proof
.
.
|
All times are GMT +1. The time now is 20:30.
|
|