Register for your free account! | Forgot your password?

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

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

Advertisement



I am sorry for asking about packets again but...

Discussion on I am sorry for asking about packets again but... 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: 177
I am sorry for asking about packets again but...

I think i got an explanation for you to understand what i need well

if a game sends a packet like this

22 00 11 00 6D 79 75 73 65 72 6E 61 6D 65 00 00 00 00 00 00 6D 79 70 61 73 73 77 6F 72 64 00 00 00 00 00 00

Length , Header, Username, Password

How actually was something like this written in the client code ?

i think it is not just Encoding.ASCII.GetByte("Of some string values");!!!

assuming i want to create and send a packet like the above given those credentials

Username : Test
Password : Test

how could i generate a packet with the same structure as the above but with the given data ?

I am sorry if my question is weird.
badguy4you is offline  
Old 10/13/2012, 02:05   #2
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
i think it's simply a login button method
it takes the acc/pass strings
then it calls another method which maybe we will call it do_login
do_login takes (acc,pass) as parameters
it convert them to bytes , add to them length and type
then call send method , send method add a seal maybe ? then send it by calling the networking class ?

if im about to create a client ill do tho , but what about another programming ? prolly may not do the same thing but in the end we will get the same result
so it's not a rule , it's completely up to you on how to generate a packet with a pre-made packet structure

you really need to look at pro4never proxy tutorial of unit 3 (as far as i remember it was unit 3)
he really did explain alot of methods of how to generate a packet with 3 different ways (including warper which i personally use , but it sometimes takes alot of parameters) , others using class for each packet to getvariable/create it , there is so many ways , check out good sources for better methods

wish that answer what you asking for
go for it is offline  
Old 10/13/2012, 14:05   #3
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 177
Quote:
Originally Posted by go for it View Post
i think it's simply a login button method
it takes the acc/pass strings
then it calls another method which maybe we will call it do_login
do_login takes (acc,pass) as parameters
it convert them to bytes , add to them length and type
then call send method , send method add a seal maybe ? then send it by calling the networking class ?

if im about to create a client ill do tho , but what about another programming ? prolly may not do the same thing but in the end we will get the same result
so it's not a rule , it's completely up to you on how to generate a packet with a pre-made packet structure

you really need to look at pro4never proxy tutorial of unit 3 (as far as i remember it was unit 3)
he really did explain alot of methods of how to generate a packet with 3 different ways (including warper which i personally use , but it sometimes takes alot of parameters) , others using class for each packet to getvariable/create it , there is so many ways , check out good sources for better methods

wish that answer what you asking for
You nearly hit the point yeah i want to know how could i add the username and password after converting them to bytes to the length and the type to form a full packet ! that's it
badguy4you is offline  
Old 10/13/2012, 17:34   #4
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
i think i got your point
there is many ways like block copy , for example copying all bytes u need in one big byte then send them
but my fav way is the warrper (duno why but i really like this way)
well lets create a byte array in the very first
lets call it packet__17 ?
okay now we need to create methods to write stuff in the packet with certain array with all types
what i mean with all types ? to be able to write strings and ints/uints/short/ushort/long/pla/pla/pla
(ill copy this from the trinity source/ pro4never proxy , same at both)
for better understanding you should really learn from pro4never proxy (it's small so it's less scary than trinity source , but both will give u the same amount of information)

read/write to byte array

example of me sending a packet

that was the whole read write class , this is an example of generaldata/jumping packet , added to it ReadWrite.WriteString(string string , int offset , byte[] byte_array) for better understanding

you may type in hex with 0x or in dec like coordx and coordy

wish that is what you searching for , but i really want you to read , just read , pro4never proxy or trinity base , it will answer all your questions , enjoy mate

umm was to forget , about the block copy , here is an example
Buffer.BlockCopy(byte[] source_array , int source_offset , byte[] destination , int destination_offset , int count(the number of bytes to copy) );

here is an example in action at splitting packets
Code:
                byte[] Packet = new byte[(Length + 8)];
                Buffer.BlockCopy(data, 0, Packet, 0, (Length + 8));
                byte[] _buffer = new byte[(data.Length - (Length + 8))];
                Buffer.BlockCopy(data, (Length + 8), _buffer, 0, (data.Length - (Length + 8)));
                data = _buffer;
                ReadWrite.WriteString("TQClient", (Packet.Length - 8), Packet);
                HandleClient(Packet);
go for it is offline  
Thanks
1 User
Old 10/13/2012, 17:57   #5
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,205
Received Thanks: 4,107
I'm not sure how well I explained it, but you can always check the thread I made about packets.
Spirited 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?
how to use packets?
07/26/2009 - Kal Online - 12 Replies
how to use packet hack and where to download them? lg master
Packets
05/18/2009 - CO2 Private Server - 2 Replies
How can I get the correct packets from the client?



All times are GMT +1. The time now is 15:07.


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.