Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames > DarkOrbit
You last visited: Today at 12:56

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

Advertisement



How to find packets for your ps ;)

Discussion on How to find packets for your ps ;) within the DarkOrbit forum part of the Browsergames category.

Closed Thread
 
Old   #1
 
elite*gold: 278
Join Date: Dec 2010
Posts: 1,125
Received Thanks: 1,083
How to find packets for your ps ;)

How to find packets

Ok, in this tutorial I'll show you how to find packets, let's start!

We must go to the function that handel the packets that the swf receive, it's located in net->ConnectionManager.html.

There are too much letters I know.
We must search "private function onData(event: DataEvent) : void" this is the function we need.
There are a lot of _loc_ but we must search for something special: _loc_3.

Code:
var _loc_2:* = String(event.data);
_loc_3 = _loc_2.split(ATTRIBUTE_SEPERATOR)
This parse the param of the function to an array, the next important line is:

Code:
switch(_loc_3[1])
Now we know that the packet starts with 0, asdf, FUCKYOU or whatever you want because the function starts on the next index (the index of a packet are separated by "|" so this is a normal packet INDEX0|INDEX1|INDEX2...)

Ok, let's take a look at the first case:

Code:
case ServerCommands.PET:
If we take a look at the file ServerCommands.html (in the same folder as ConnectionManager.html) and search for PET we will see that it's a constant:

Code:
public static const PET:String = "PET";
Now we know that the current packet is "0|PET", ok, let's continue!

Code:
this.petAssembly.assembleCommand(_loc_3);
This sends the packet to the class petAssembly (PetAssembly.html, in the same folder as ConnectionManager.html), let's open it and search for the function assembleCommand.

Code:
public function assembleCommand(param1:Array) : void
{
var _loc_2:* = param1[2];
if (this.delegateDict[_loc_2] != null)
{
var _loc_3:* = this.delegateDict;
_loc_3[_loc_2](param1);
}
else
{
this.playSound(73);
}// end else if
return;
}// end function
The important line is

Code:
if (this.delegateDict[_loc_2] != null)
What is _loc_2??

Code:
var _loc_2:* = param1[2];
This means that _loc_2 receives the value of the second index of the packet (remember that an array starts with index 0 so index 2 is "INDEX0|INDEX1|INDEX" the third index), now we must take a look at

Code:
private function initDelegateDict() : void
Let's take a random line:

Code:
this.delegateDict[ServerCommands.REPAIR_PET] = this.assemblePetRepair;
Ok, do you remember the function assembleCommand? If yes you should know that now the packet is something like "0|PET|ServerCommands.REPAIR_PET", now let's look at ServerCommands.html again and search for REPAIR_PET...

Code:
public static const REPAIR_PET:String = "R";
Ok, the packet is "0|PET|R", and now what? Now we must look at the assemblePetRepair function:

Code:
private function assemblePetRepair(param1:Array) : void
{
this.playSound(71);
this.toggleRepairButtonVisbility(false);
return;
}// end function
Ok, as in this function there isn'tt a line that says something like ServerCommands... this means that the packet is over, we don't need to find nothing else, the final packet is "0|PET|R" and is the repair packet for the pet, but let's take a look at another function:

Code:
private function assembleStopLaserAttack(param1:Array) : void
{
var _loc_2:* = 2;
var _loc_3:* = int(param1[++_loc_2]);
var _loc_4:* = this.main.screenManager.map; _loc_4.getCombatManager().removeLaserAttack(_loc_3);
 return;
}// end function
Look at the line
Code:
var _loc_3:* = int(param1[++_loc_2]);
We use the parameter (the packet), which index? ++_loc_2, let's look for the definition of _loc_2, now we know that _loc_2 = 2, so ++_loc_2 = 1 + 2 = 3, then we know there's a 3rd index of the packet ("Index0|Index1|Index2|Index3") and it's parsed to int (number) so it can't be "0|PET|SL|asdf"

Code:
var _loc_4:* = this.main.screenManager.map;
_loc_4.getCombatManager().removeLaserAttack(_loc_3);
Now let's look at main.screenManager.map.getComnbatManager(), it returns a CombatManager object, now we must search for the class CombatManager (it's located in combat->CombatManager.html) and search for the function "removeLaserAttack"

Code:
public function removeLaserAttack(param1:int, param2:Boolean = true) : void
{
var _loc_3:* = this.laserAttacks[int(param1)];
if (_loc_3 != null)
{
if (param2)
{
_loc_3.cleanup();
}// end if
delete this.laserAttacks[int(param1)];
}// end if
return;
}// end function
With a bit of brain we can know that laserAttacks is a dictionary with userIDs as index for example an user with the userID 1 has the entry in the dictionary laserAttacks[1], so know we know that the packet is "0|PET|SL| petID" where petID is the ID of the pet.

Easy right? Maybe it's a bit boring but it's easy, I think this is called reverse engeneery.

What do we know now?

-How to find packets
-Pet repair packet: 0|PET|R
-Stop pet laser attack packet: 0|PET|SL| petID

See you!!
manulaiko is offline  
Thanks
23 Users
Old 01/16/2014, 21:15   #2


 
Requi's Avatar
 
elite*gold: 3800
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,037
Received Thanks: 8,238
Going to make a more detailed tutorial in few days, but thanks for this one now
Requi is offline  
Thanks
6 Users
Old 03/27/2014, 20:47   #3
 
elite*gold: 0
Join Date: Jun 2013
Posts: 12
Received Thanks: 2
make please a Video
driton1234 is offline  
Old 03/27/2014, 20:49   #4
 
Diаmonds's Avatar
 
elite*gold: 1
Join Date: Oct 2013
Posts: 1,257
Received Thanks: 1,276
Quote:
Originally Posted by driton1234 View Post
make please a Video
Use the search function, there is a nice Video from Requi which explain good how to find the packets.
Diаmonds is offline  
Thanks
1 User
Old 03/27/2014, 20:49   #5


 
Requi's Avatar
 
elite*gold: 3800
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,037
Received Thanks: 8,238
Quote:
Originally Posted by driton1234 View Post
make please a Video
English:

German:
Requi is offline  
Thanks
4 Users
Old 11/21/2014, 14:14   #6
 
elite*gold: 0
Join Date: Nov 2014
Posts: 7
Received Thanks: 0
Talking

Quote:
Originally Posted by Requi View Post
English:
requi where the file is to be modified in visual studio?
viniciusdantas is offline  
Old 11/21/2014, 17:38   #7
 
melikhan's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 3,249
Received Thanks: 2,240
Quote:
Originally Posted by viniciusdantas View Post
requi where the file is to be modified in visual studio?
Don't push old threads, ask here >
melikhan is offline  
Old 11/21/2014, 18:57   #8

 
Arby's Avatar
 
elite*gold: 83
Join Date: May 2011
Posts: 11,029
Received Thanks: 6,036
#closed
Arby is offline  
Closed Thread


Similar Threads Similar Threads
How can i find opcode from winpcap packets
04/30/2013 - SRO Coding Corner - 5 Replies
Hello all.. I want to find opcode with listening ethernet device I am using winpcap library in c#. I have some sniff data in 15884 port but i think opcode location always different and i think winpcap adding ip-port header in data lets some datas.. 002590A79412648788441400080045000028063D400078067 69658F117575FADB607C549E22C74751CEEE5137BFC50100F9 77FC20000000076965891
[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...
How can i find packets?(Seafight)
03/03/2012 - Seafight - 5 Replies
Hi guys, How can i find the packets with WPE?There are a lot of encrypted code and i couldn't understand anything. Example how can you find this Packet in Darkorbit? -> LOGIN|UID|SessionID|DOClientVersion Thanks...
[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?



All times are GMT +1. The time now is 12:56.


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.