Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 05:16

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

Advertisement



Packets packets packets...

Discussion on Packets packets packets... within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
Packets packets packets...

I have been struggling to understand what is a Packet how could i create one with the data i want then send it to my server

So please any one tell if as example i want to send some info from my client to my server, then handle them from the server

how could i do that


[Note] : i have my socket server, also i don't wanna copy and paste codes i want to UNDERSTAND.

My PacketReader.cs

Handler.cs

Operations is an Enum : ushort
badguy4you is offline  
Thanks
2 Users
Old 10/06/2012, 00:32   #2
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785

Pointers #1

Structs & Pointers #2


DataPackets & Packet Structures


Sockets #1


Sockets #2

Ref: (also in my sig.)
I don't have a username is offline  
Thanks
2 Users
Old 10/06/2012, 00:35   #3
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
well the next words im gona say not a perfect explanation but it's what i know and i think that should be enough information to start with
shit im drunk lmao well
packet is a data , byte array , it's send from/to server and from/to client
why you send packets ?
to add information of what you actually do or what client should show you
so lets give a good example about packet 1004
i won't really go inside about encryptions and stuff , just plain packet explaining after i got it
lemme get a 1004 packet and it's structure
1004: chat packet
Offsettypevalue
0ushortlength
2ushorttype
4uintChat_Color
8uintChat_Type
12uintMessageUID1
16uintMessageUID2
20uintChat_Mesh
26String[25]_From
(27 + _From.Length)string[26 + _From.Length])_to
(29 + _From.Length)string[(28 + _From.Length) + _To.Length]_Message

so lets try to get a packet and see if it fit this packet structure and explain it
fuck that took forever to find old packet logging text on my lap shit

Code:
Packet Nr 1959. Server -> Client, Length : 101, PacketType: 1004
5D 00 EC 03 00 00 00 FF D0 07 00 00 00 00 00 00      ;] ì   ÿÐ      
00 00 00 00 00 00 00 00 04 06 53 59 53 54 45 4D      ;        SYSTEM
03 41 4C 4C 00 33 43 6F 6E 67 72 61 74 75 6C 61      ;ALL 3Congratula
74 69 6F 6E 73 21 20 61 68 6D 65 64 31 30 35 35      ;tions! ahmed1055
39 20 77 6F 6E 20 45 78 70 42 61 6C 6C 20 69 6E      ;9 won ExpBall in
20 6C 6F 74 74 65 72 79 2E 00 00 00 00 54 51 53      ; lottery.    TQS
65 72 76 65 72                                       ;erver
forget the titles about packet num. from and to , length and type we will get them from the packet together now
okay now ill split this code out with umm colors ? okay
ill make it like the packet structure , shit i lost words , just look what ill do
fuck i need this types so umm here
Quote:
Talk = 2000,
Whisper = 2001,
Team = 2003,
Guild = 2004,
TopLeft = 2005,
Clan = 2006,
Qualifier = 2007,
Friend = 2009,
Center = 2011,
Service = 2014,
World = 2021,
PopUP = 2100,
Dialog = 2101,
HawkMessage = 2104,
Website = 2105,
FirstRightCorner = 2108,
ContinueRightCorner = 2109,
GuildBulletin = 2111,
BroadcastMessage = 2500;
5D 00 EC 03 00 00 00 FF D0 07 00 00 00 00 00 00 ;] ì ÿÐ
00 00 00 00 00 00 00 00 04 06 53 59 53 54 45 4D ; SYSTEM
03 41 4C 4C 00 33 43 6F 6E 67 72 61 74 75 6C 61 ;ALL 3Congratula
74 69 6F 6E 73 21 20 61 68 6D 65 64 31 30 35 35 ;tions! ahmed1055
39 20 77 6F 6E 20 45 78 70 42 61 6C 6C 20 69 6E ;9 won ExpBall in
20 6C 6F 74 74 65 72 79 2E 00 00 00 00 54 51 53 ; lottery. TQS
65 72 76 65 72 ;erver

colors should be kinda fucked up but this is for illustration

okay now lets get started
in brown at offset 0 there is 005D
notice how i read it ? this is ushort , that's how i read it
get calculator , convert this from hex to dec and you should get 93 yes this is the packet length and we add the server/client seal to it to be 101
and usually at tq packets they ALWAYS send the length in the very first ushort in client with offset 0
and they ALWAYS send the packet type in the next ushort at offset 2 which is umm 1004 right ? so umm try to convert 1004 to hex and you should get 3EC on calculator which is actually 03EC and should be written in the packet as EC 03

so yeah lets move to something more interesting ?
well what is the 00 00 00 FF ? go check the packet structure above
yes indeed it's chat color
what about those 2 uints ? of 00 00 00 00 00 00 00 00 ?
those are MessageUID1 and MessageUID2 , not really important for now

then D0 07 , how to type this down ? yes indeed 07D0 which is 2000 and yup i know you notice this Talk = 2000 , so this chat_type is talk

then 04 06 , pretty unknown to me , dun bother for now

then some long string starting with 53 ending with 2E
so what the hell is that ? isn't this a string ? yes prolly you need to look up the packet structure once more
well how to convert this packets to hex to string (letters and numbers?)
well i actually know them as i used them alot in reverse engineering but here
basically you need to use bit converter in coding and stuff but if you want to read something you may look up for assic converter or umm wait
here is a cool table i was using years before


now what is the last bytes ?
54 51 53 65 72 76 65 72 ? this is tq server seal

im so damn sleepy and can't type anymore
now you got an idea about what's going on about packets and stuff
you won't find packet structure for last packets , you need to try and make wild guesses to figure them out , do something in game and try to figure out what's changed in the packet
goodluck maybe tomorrow ill try to edit this shit to make it more better but that mostly won't happen if i got a hang over >.<
peace out nigga pray for me not to fall while walking to my bed ^^
go for it is offline  
Thanks
2 Users
Old 10/06/2012, 00:36   #4
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
@go for it : am afraid to say that he talks in general .. which means all u posted is useless to him Lol
shadowman123 is offline  
Old 10/06/2012, 00:36   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
The client is responsible for filling in various packet structures and sending them to the server.

What exactly is it you're trying to do? The most common way to send packets TO server is to write a proxy to sit between the client and the server in order to send fake packets to the server (aka botting/aimbotting/etc)

That being said, there's no LEGITIMATE reason to be trying to manually send packets Client>Server. That's what the client exists for in the first place.
pro4never is offline  
Old 10/06/2012, 00:39   #6
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
Quote:
Originally Posted by pro4never View Post
The client is responsible for filling in various packet structures and sending them to the server.

What exactly is it you're trying to do? The most common way to send packets TO server is to write a proxy to sit between the client and the server in order to send fake packets to the server (aka botting/aimbotting/etc)

That being said, there's no LEGITIMATE reason to be trying to manually send packets Client>Server. That's what the client exists for in the first place.
I want to understand packets in general so i can understand conquer ones if i wanted to.
badguy4you is offline  
Old 10/06/2012, 00:43   #7
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
Okay edited my post.
I don't have a username is offline  
Old 10/06/2012, 00:45   #8
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
Quote:
Originally Posted by shadowman123 View Post
@go for it : am afraid to say that he talks in general .. which means all u posted is useless to him Lol
Although i am talking in general he helped me alot but still a small question, how could you or anyone who gets a packet from a game to analyze it to know each part What it do, and get all the information about it. ! and indeed create a replay for it
badguy4you is offline  
Thanks
1 User
Old 10/06/2012, 00:48   #9
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
Quote:
Originally Posted by badguy4you View Post
Although i am talking in general he helped me alot but still a small question, how could you or anyone who gets a packet from a game to analyze it to know each part What it do, and get all the information about it. ! and indeed create a replay for it
Packet analyzing is easy actually as long it's not encrypted and you don't have to reverse the cryptography.

Basically you check each offset with different datatypes until you get a value that is proper.

It can take some time unless you do it automatic. If I can get time I will finish Buu V3 which is so much better than V2 but short on time atm. as I'm coding a few things for a few people xD

I might write a guide for it as well.
I don't have a username is offline  
Thanks
1 User
Old 10/06/2012, 00:50   #10
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by badguy4you View Post
Although i am talking in general he helped me alot but still a small question, how could you or anyone who gets a packet from a game to analyze it to know each part What it do, and get all the information about it. ! and indeed create a replay for it
by lots of trial and Error .. ( Analizing packet needs patience ) and Human Scense for example in packet 1004 ( chat packet ) when u type hello my friend Am shadowman u gonna see alot of sucessive bytes at packet dump so by human scense its string information and you can make sure of that by using Hex to String converter
shadowman123 is offline  
Old 10/06/2012, 01:53   #11
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
if i am receiving packet like this [i am testing on a game called Darkeden] and this is what i receive on login



is this encrypted or what, i think no because the username and password just appears normally but how could i make my own replay to it specially that this game has been terminated and the real server closed. [can't sniff real packets]

I brought you that example to help me learn practically.
badguy4you is offline  
Old 10/06/2012, 02:42   #12
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by badguy4you View Post
if i am receiving packet like this [i am testing on a game called Darkeden] and this is what i receive on login



is this encrypted or what, i think no because the username and password just appears normally but how could i make my own replay to it specially that this game has been terminated and the real server closed. [can't sniff real packets]

I brought you that example to help me learn practically.
so forget about making this game cuz u cant depend on guessing in making packet structure as there are surely loads of packets and each packet have type / length and offsets first 2 are very easy as the client request some of the packets to server then the server send the right action to be done to client .. so the hardest part in this offsets which u cant get by guessing specially if it has long packet length
shadowman123 is offline  
Old 10/06/2012, 08:31   #13
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by badguy4you View Post
if i am receiving packet like this [i am testing on a game called Darkeden] and this is what i receive on login



is this encrypted or what, i think no because the username and password just appears normally but how could i make my own replay to it specially that this game has been terminated and the real server closed. [can't sniff real packets]

I brought you that example to help me learn practically.

There are 3 main ways.

#1: Sniff real packets (most common and easiest way).

You record a sequence of packets being sent between the client and server as you perform actions, then compare the packets to known values to speed up structuring them and allow yourself to create a full packet structure for the systems being written.

#2: Reverse engineer the client. (bit more difficult, provides a more accurate picture when done properly)

You reverse engineer the client to view how packets are being processed and sent in order to get a very clear picture of how each offset in packets are being used and give yourself a much better idea of how things are being done.

#3: Trial and error. (time consuming, rare and less efficient in most cases)

Use known partial structures and trial and error to fill out unknown offsets or in very rare cases, come up with complete structures.




There's a video from my now defunct proxy paradise project where I get into partial structuring from packet dumps (obviously it's not a complete structure but it gives you a bit of an idea of how to go about it from packet dumps)
pro4never is offline  
Thanks
2 Users
Old 10/06/2012, 09:17   #14
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
omg i should not explain anything when im drunk XD forgot to continue it
well my point from the post was to show a real packet , how server handle it and how client send it , how to get it's structure with testing/guessing
anyway goodluck mate
go for it is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release] +5500 Packets structure , client/packets constants
10/07/2012 - CO2 PServer Guides & Releases - 10 Replies
edit : if u know nothing about packets go to this post first explaining what is packets , and explaining a packet with details and everything http://www.elitepvpers.com/forum/co2-pserver-disc ussions-questions/2162344-packets-packets-packets. html#post19074533 i start making my very own packet structure to use them on my new proxy but i thought of ripping them from the source so yeah the following packets is ripped of trinity base source right now im just providing the packets structure...
[REQUEST] packets send list , or anyway to sniff send packets
08/10/2012 - Kal Online - 16 Replies
hey everyone , as mentioned , i wanna know if anyone got a complete send packets lists or anyway i can sniff send packets , thanks in advance
[Packets] Wie änder ich flyff packets?
07/16/2011 - Flyff Private Server - 19 Replies
HeyHo, Ich würde sehr gerne wissen wie man die Flyff Packets ändert... ich denke mal Zahlen ändern werden nicht ausreichen oder?
Packets
07/21/2008 - Archlord - 2 Replies
im working on a different kinda cooldown hack which makes it alot more undetectable in the old version you get a 64 and 40 packets now ive been messing about with em but i cant decide on which one the dmg packet is if someone knows which it is/if it is any of them plz gimmie a pm or a reply here thanks
Packets
07/17/2007 - Cabal Online - 7 Replies
Ok, I recorded some packets. I was sitting in desert scream with a level 1 blader. It had level 1 impact stab. After three impact stab casts without moving at all, this is what I get: 55 81 8E BF 04 1E 95 22 31 6D 19 49 F4 05 A1 3A 7B A8 8E 68 BA F1 74 68 C5 AD 4A 57 16 FF DF 02 A7 75 89 27 CF C5 E5 6C 43 5C 68 F0 AE 8E 9F 8C D3 2C 70 DA 54 78 D3 B3 74 CF 72 5F 8F 16 B8 5C 0B 13 28 A0 68 Five normal attacks in a row.



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


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.