- Joined
- Dec 22, 2009
- Messages
- 958
- Reaction score
- 317
Not long ago, we've decided to close the development on this emulator.
Thank you all for contributions.
Thank you all for contributions.
Minerva
when this emulator becomes stable, the thread will be updated
This Minerva - CABAL Online Server Emulator, written in C# language. Initially started by The Divinity Project, now being managed by Dignity Team.
Information
- It's open-source and always will be.
- It's not a beta. It's something like pre-alpha, buggy, small functionality(yet).
- Currently Login, Channel(World) and Master(Database/Sync) servers are working.
- Using MySQL as database. Dropped support for MSSQL.
- Using EP8 as a base and WILL NOT JUMP to another EP's while work hasn't been done for EP8.
- As a client, using CABAL EU with v1421 patchedmain to skip login details encryption.
- Yes, scripting will be available for adding npc's and other functionality. But for the moment, it's not a essential part and won't be targeted.
Client, patch, and other stuff
-
You must be registered to see links
-
You must be registered to see links
- Always use latest commit.
- Keep your databases up-date to the latest structures in bin/sql directory.
Compatible with
- .NET Framework 4;
- MariaDB (you can grab xampp with all required tools here);
- MySQL 5.x (partially)
- Why can i not start this?
- Why can i not connect to the database?
- How can i run the queries?
- and the list goes on...
Wiki
Gathering and analysing CABAL Online packets
Before reading further, you must proceed these steps:
- Know about binary, heximal and decimal numeral systems, and how to convert to one and another;
- Know about data types in computing systems and their sizes, bit, byte, short, int, long, float, double, etc
- Have a working CABAL server outside(VM's can do the job), although it is not neccesary if you are going to record packets from official server;
- Install
You must be registered to see links;
- Get Ostara Legacy or Ostara newer;
- And of course, have a working CABAL client.
Now, first things first:
- CABAL Network Protocol uses TCP;
- There are four calls used in packets: REQ, C2S, S2C and NFY;
- REQ stands for Request, usually when client 'asks' for something, like permission to move, etc;
- C2S stands for Client 2 Server, when client sends some information, like login details;
- S2C stands for Server 2 Client, this can be used to verify client, if his C2S packet was right or just sending some information to which client asked for;
- NFY stands for Notify, this is used to inform all nearby or all channel players about specific action, such as player moves.
- In Ostara, you might see CSC, which is ClientServerCommunication so either its equal to C2S or S2C.
Okay, so now, we will gonna capture some packets and we will try to analyse them.
Both Ostara versions(legacy and newer) does not harm neither your cabal account, your OS and else. It is not detectable for XTRAP/Gameguad/XignCode3/etc.
Now, launch preferred Ostara version(we gonna use legacy, but in the near future there might be an update for this article with newer Ostara). Also launch CABAL client.
When you are in login screen, select the right network interface to capture in Ostara.
Press green button named 'Start logging' and Ostara should be ready to capture packets. Now, you are ready to log in game.
Yay! Packets showed up. Now, proceed to lobby, select character and log into world.
When you will log in, you will notice a lot of packets showing up, thats good. Green color means that packet is received from the server.
You can also notice on left side from which server packets goes, Login, World, Chat, etc.
Okay, so table list seems to be easily understandable, time, packet size, src, dest ip, ports, and opcode - it is packet description or just id.
Now this is where analysing goes, lets click somewhere on map with mouse, to move our character. Scroll down, and you will see different color packet, with opcode REQ_MoveBegined. Also, you will notice a packet named NFY_MoveBegined, click on both of them, copy heximal data from the bottom of the table list, to your favorite editor, for analysing packets, mine is notepad(cuz it starts fast, unless you will need more power, for searching, then notepad++ or anything else).
While scrolling, you might see packets REQ_MoveEnded00 and NFY_MoveEnded00, copy their data to editor aswell.
Can you see anything familiar? Well, i can see, that every packet starts with E2 B7 - 0xB7E2. It is called a magic code, and it is same for any cabal network packet.
If you would look closer, you would notice that after magic code there is a short 0x0018(for first packet) which converted to decimal would be 24 and this is packet size.
Now, looking at packets, which were sent from client(REQ ones), you will notice a four empty bytes, thats a padding, unused.
Next, there is packet opcode, short 0x00BE for first packet.
What we just did is we discovered a packet structure for client and server packets. Structure never changes, except their data(size, opcode).
Now, data comes up. If you would had opened map, and notice your start x, y coordinates before you move your character, you would notice that on the first packet, the first 4 bytes are 2 shorts, X and Y start position, and after it 4 bytes which are 2 shorts target X and Y.
What is rest? Well you need to test it, move more, change maps, and etc. Seems like if we would skip that 4 bytes(which are X and Y positions probably) and get the last short, it shows that is map id.
First one solved, time for second, NFY packet. Since we already decoded structure, lets skip it. 0x017EA509, strange number, it either can be 2 shorts or one integer... Most likely it is integer. And i will tell you a secret: every NFY packet must contain client id, since this packet is broadcasted to nearby players. So yeah, it is an int, with player id. Next 4 bytes, looks like it is an int, just do not think for a half day, it might be timestamp of when player started moving. Next 4 bytes or 8 bytes... But wait, what i can see? It has a 4 shorts, with same data as MoveBegined packet we decoded earlier as 'start and target position'.
Now, time to analyse that MoveEnded packet. Again, it has a 2 shorts, with same data as in MoveBegined target position.
And last one, Notify MoveEnded packet. Again, we got here target position coordinates.
Well, thats all.
By the way, ALWAYS look at ending and leading zero's, it might tell you which datatype you trying to decode is. To verify what you have decoded, you need to repeat steps(walk, use skill, etc) to receive/send same packets, and check if your decoded structure is right.
Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team.
Content restored for its useful information and thread locked due to project discontinuation- edited by AzureSensei
Last edited by a moderator: