Page 1 of 1
ManaServ protocol (documentation)
Posted: 30 Nov 2010, 14:21
by Catherine_i
Hi everybody!
I have a question about ManaServer protocol documentation. Could you help me to correspond network activity with this description :
http://doc.manasource.org/manaserv_protocol?do=show ?
I have the following dump of network conversations while performing connect then login to "login server" using registered account:
client starts:
Code: Select all
Send: Return Code: 0x00000000
00000000 30 75 0u
Receive: Return Code: 0x00000000
00000000 31 75 FF 54 4D 57 01 00 00 00 1u.TMW....
Send: Return Code: 0x00000000
00000000 64 00 00 00 00 00 63 61 74 68 65 72 69 6E 65 34 d.....catherine4
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 32 ..............12
00000020 33 34 35 36 37 00 00 00 00 00 00 00 00 00 00 00 34567...........
00000030 00 00 00 00 00 00 03 .......
Receive: Return Code: 0x00000000
00000000 63 00 24 00 68 74 74 70 3A 2F 2F 75 70 64 61 74 c.$.http://updat
00000010 65 73 2E 74 68 65 6D 61 6E 61 77 6F 72 6C 64 2E es.themanaworld.
00000020 6F 72 67 2F 69 00 4F 00 57 C1 F5 4E 87 84 1E 00 org/i.O.W..N....
00000030 0D 76 62 7E 00 00 00 00 32 30 31 30 2D 31 31 2D .vb~....2010-11-
00000040 33 30 20 31 34 3A 30 33 3A 34 34 2E 39 36 34 00 30 14:03:44.964.
00000050 00 00 00 7F 00 00 01 EA 17 54 68 65 20 4D 61 6E ........The Man
00000060 61 20 57 6F 72 6C 64 00 00 00 00 00 00 00 00 00 a World.........
00000070 00 00 00 ...
It seems like "30 75" hexadecimal values performed "connect" request from client, then "
64 00 00 00 00 00 63 61 74 68 65 72 69 6E 65 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 32 33 34 35 36 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03" performs "login" using "catherine4" and "1234567" as a password .
The successful login response from login server is shown. But it's still not clean for me how "
64 00 00 00 00 00 63 61 74 68 65 72 69 6E 65 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 32 33 34 35 36 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03" could be the PAMSG_LOGIN message and what means "Hex Value" mentioned in documentation. If any detailed description / guide / tutorial or something exists somewhere, please tell me!
I will be very thankful for any assistance regarding protocol's details.
Catherine
Re: ManaServ protocol (documentation)
Posted: 30 Nov 2010, 15:29
by Bertram
Hi Catherine,
Thanks for your interest in hacking Manaserv servers
The best doc lies in the page you just mentioned and in the client and server code.
Now, as for the "PAMSG_LOGIN" message, the doc says:
Code: Select all
PAMSG_LOGIN 0x0010 D version, S username, S password
Which means the client (PA = Player to Account server) sends 0x0010 plus The protocol version in a double (D), the username in a null terminated (S)tring, and the password (also in a string).
The doc is also saying:
Code: Select all
APMSG_LOGIN_RESPONSE 0x0012 B error, [S updatehost]
Error return values:
LOGIN_INVALID_VERSION (0x40): The user is using a incompatible protocol version.
LOGIN_INVALID_TIME (0x50): The user tried logging in too fast.
LOGIN_BANNED (0x51) : The user is currently banned.
Don't forget the universal: ERRMSG_OK 0x0000 message
The account server responds:
0x0012 + the error or ok in a byte and optionally, hence the [], the updatehost in a string.
I hope it helped you.
Best regards.
Re: ManaServ protocol (documentation)
Posted: 30 Nov 2010, 15:49
by Crush
Aren't all the network messages still embedded into enet packets (a 3rd party networking library) or did you already complete the porting of the network layer to qt-net?
Re: ManaServ protocol (documentation)
Posted: 30 Nov 2010, 17:03
by Catherine_i
Thank you Bertram !
2Crush:
Crush wrote:Aren't all the network messages still embedded into enet packets (a 3rd party networking library) or did you already complete the porting of the network layer to qt-net?
So, I see in dumps 'enet' packets instead of pure game messages data, isn't it? I never have a deal with "enet" before, have no idea how it works...
Re: ManaServ protocol (documentation)
Posted: 30 Nov 2010, 17:41
by Crush
Catherine_i wrote:So, I see in dumps 'enet' packets instead of pure game messages data, isn't it? I never have a deal with "enet" before, have no idea how it works...
http://enet.bespin.org/
Enet is a protocol on top of UDP which offers a compromise between the speed and efficiency of UDP and the reliability of TCP. But the main reason we are using it is because it provides a platform-independent networking api.
I don't know why exactly you are reverse-engineering the Manaserv protocol, but when your goal is to create an application which connects to and interacts with a Manaserv server I would suggest you to build it on enet, too.
Re: ManaServ protocol (documentation)
Posted: 30 Nov 2010, 17:58
by Crush
Just noticed something odd: While you are talking about and linked to the documentation of Manaserv, the new and not yet productively used server, the network dump reminds me more of tmwAthena, the currently used server software which uses a completely different protocol and does not use enet but vanilla unix sockets instead. You are also talking about a "Login server" which is a term used by *Athena (the Manaserv equivalent is called "account server").
Can you please verify which kind of server you are actually connecting to?
Re: ManaServ protocol (documentation)
Posted: 30 Nov 2010, 19:56
by Catherine_i
Crush wrote:Just noticed something odd: While you are talking about and linked to the documentation of Manaserv, the new and not yet productively used server, the network dump reminds me more of tmwAthena, the currently used server software which uses a completely different protocol and does not use enet but vanilla unix sockets instead. You are also talking about a "Login server" which is a term used by *Athena (the Manaserv equivalent is called "account server").
Can you please verify which kind of server you are actually connecting to?
You are right Crush! I connecting to eAthena server, I am confused...
One more question: may I rely on that specification
http://doc.manasource.org/manaserv_protocol while using ManaServer
http://wiki.themanaworld.org/index.php/ ... up_TMWServ in future or it's still under heavy development ?
Thank you!
Re: ManaServ protocol (documentation)
Posted: 30 Nov 2010, 20:34
by Crush
No, you can't really rely on the Manaserv protocol to stay consistent at the moment.
Re: ManaServ protocol (documentation)
Posted: 01 Dec 2010, 13:29
by Catherine_i
Crush wrote:No, you can't really rely on the Manaserv protocol to stay consistent at the moment.
I see... thank you for the explanation.
Re: ManaServ protocol (documentation)
Posted: 01 Dec 2010, 18:24
by Catherine_i
Crush wrote:No, you can't really rely on the Manaserv protocol to stay consistent at the moment.
Hi!
one more question:
I trying to install ManaServ, there are two repositories mentioned here
http://wiki.themanaworld.org/index.php/ ... p_ManaServ and in READ.ME :
Code: Select all
The server depends on parts of the client data and also has its own data
repository. These are the 'manadata' and 'manaserv-data' repositories.
Currently, manaserv expects these to be merged into a single 'data' directory.
Could you tell me where are them? I have found
git://gitorious.org/tmw/client-data.git and git://gitorious.org/tmw/server-data.git here
http://gitorious.org/tmw but both are empty (contains nothing but GNU license file) and there are nothing like 'manadata' and 'manaserv-data' here
http://gitorious.org/mana/
Is the client git://gitorious.org/mana/mana.git one of required repositories? And what about "Mana client 1.0.0-beta2"
http://manasource.org/downloads , is it ready??
As I understand only Mobile Client is ready to connect to the ManaServ, that client git://gitorious.org/mana/manamobile.git is it correct?
Thank you
Re: ManaServ protocol (documentation)
Posted: 06 Dec 2010, 09:10
by Bertram
Hi Catherine,
The client working with latest manaserv GIT can be found here:
http://gitorious.org/mana/mana
The manaserv repository is here:
http://gitorious.org/mana/manaserv
The server repository named above also contains example data for the client and the server. So you can set up a minimal server rather quickly.
Now, about how to configure and run a server and a client, please read whatever useful there:
http://doc.manasource.org/server_configuration
http://doc.manasource.org/test_data
Don't forget that without having an update server url up and ready, you'll have to run the client like this:
/path/to/client/mana -u -d /path/to/client/data
-u: skip update sequence
-d: override path to data.
I hope it helped you.
Also, please, if ever the documentation found there:
http://doc.manasource.org/
is unclear or if there is something missing, don't hesitate to propose improvement about it.
Best regards.
Re: ManaServ protocol (documentation)
Posted: 08 Sep 2011, 16:25
by KeenBlade
Where can be found documentation of current version of network protocol ?
http://doc.manasource.org/manaserv_protocol seems to be out of date ?
Re: ManaServ protocol (documentation)
Posted: 08 Sep 2011, 20:11
by Bertram
Hi KeenBlade,
The latest master of the manaserv documentation is the manaserv_protocol.h file itself currently located here:
https://github.com/mana/manaserv/blob/m ... protocol.h
Yet, the protocol is evolving as we're fixing stuff, and a proposal of a fixed equipment protocol, along with its server implementation can be found here:
https://github.com/Bertram25/manaserv
I'll update the protocol in the doc page as soon as someone review my code and agree about the change.
I hope it helped you.
Best regards,