Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 16:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[c++]recv chat packet problem

Discussion on [c++]recv chat packet problem within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
[c++]recv chat packet problem

hi, anyone here have got recv chat text ?

i have detoured recv function and everything works except chat text

Code:
int WINAPI RecvHook(int size, char* pDestBuf)
{
      TPacketHeader* header = reinterpret_cast<TPacketHeader*>((unsigned char*)*pDestBuf);
      if (header==4)
      {
		TPacketGCChat* kChat = reinterpret_cast<TPacketGCChat*>(pDestBuf);
                char buf[1024 + 1];
                uChatSize = kChat->size - sizeof(kChat);
		buf[uChatSize]='\0';
                strncpy(buf, pDestBuf + sizeof(TPacketGCChat), uChatSize);
                cout << buf << endl;
      }
      return oldRecv(size, pDestBuf);
}
i recieve **** instead of text. i know text is after TPacketGCChat but nothing works as i want
KaMeR1337 is offline  
Old 03/22/2016, 21:22   #2
 
elite*gold: 0
Join Date: Mar 2016
Posts: 7
Received Thanks: 2
you know youre using pDestBuf as length and uChatSize as source in the strncpy function?
Remix v72 is offline  
Old 03/22/2016, 21:30   #3
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
Quote:
Originally Posted by Remix v72 View Post
you know youre using pDestBuf as length and uChatSize as source in the strncpy function?
last param of strncpy is length not source
KaMeR1337 is offline  
Old 04/27/2016, 15:39   #4
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
bump
KaMeR1337 is offline  
Old 05/12/2016, 22:49   #5
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
solved. closed
KaMeR1337 is offline  
Reply


Similar Threads Similar Threads
[delphi]winsock recv and block specifc packet
03/07/2016 - General Coding - 5 Replies
Hello, i use the winsock send function by a SockerAddress Example: send($00001,MyPacket,0); I need a code example to recv a packets and put the same in a textbox, and block a especifc packet, example: c1 03 04
PW packet recv hook
01/09/2016 - PW Hacks, Bots, Cheats, Exploits - 0 Replies
Hello, Since i'm basically done with PW anyhow, figured I'd start releasing a few things that may be useful for people. It's all without any assistance or whatever. Just educational. Do whatever the hell you want with it. https://github.com/kingkellogg/pw-packet-stream-r eader/ This basically hooks the decryption function of client (or much more a wrapper of it), detours it, and executes a callback of DLL instead. This dumps the buffer into a shared memory region using a ring buffer...
[AutoIt] Packet Send/Recv
03/04/2014 - Nostale Hacks, Bots, Cheats & Exploits - 1 Replies
Aufgrund von nem Kollegen hab ichs wieder rausgenommen. Sorry. :D
Recv Talk Packet
08/23/2012 - Kal Online - 2 Replies
Hello! I have a problem with getting the received string if someone talks, smiply don't know how to do it even -.-". I know the recv packet is 0x3C but don't know how to work with it :\. Hope someone could help meh. :P
Recv Packet [Frage ;D]
06/03/2009 - Kal Online - 14 Replies
Es gibt ja eine sehr ausführliche Liste für Send... aber für Recv glaube ich ja nicht (?)... kann mir jemand kurz mal sagen ob ein recv packet vorhanden ist für expell | connection lost? Wenn ja, wie siehts aus? danke :D



All times are GMT +2. The time now is 16:22.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.