Jump to content

Zemyna - Client proxy


exec
 Share

Recommended Posts

Zemyna acts as a kind of proxy, it makes the client connect to a special local server that forwards all packets from the client to the actual server. This way it's able to read every single packet that gets sent or received. These packets can then be passed to other applications, so they can work with them, e.g. loggers like PaleTree.

If you're familiar with Morrighan, you will feel right at home here.

Download

Remember to regularly update PaleTree and Zemyna whenever one is available, as they need to be up-to-date to work with the latest client.

How to use

For Zemyna to be able to read packets, it needs control over the starting process, as it temporarily adjusts your client, to tunnel its connection. It does so by making a backup of your client.xml, that contains information about where to connect to, and creates a new one. This change is reverted once Zemyna closes, this way you don't have to fiddle with any files yourself.

To tell Zemyna where to connect the client to, you use command line parameters. For example, let's say you wanted to log packets on the international server Laima, you would simply start it like this from the command line, after moving Zemyna to your game folder:

Zemyna.exe host:54.88.25.242 port:2000

The IP and port are of the login server for Laima. For easier reusability, you should create a link or bat file. Zemyna will then take the necessary steps to be able to read packets from the network, and start the client. A small window in the upper left corner will show you that Zemyna is running, it closes automatically when the client gets closed. You can also double click it to quickly close Zemyna and the client.

Since you can only have one server in the server list this way, the one you specify in the parameters, you could create multiple links/bats, one for each server.

If you want to use Zemyna on a server that doesn't use the Steam auto-login, but a login interface, you have to tell it, with another parameter. For example, connecting to a local server:

Zemyna.exe host:127.0.0.1 port:2000 nosteam

How to connect to Zemyna

Zemyna uses the same API as the tool it was inspired by, "Alissa". It uses WM_COPY messages to communicate between Zemyna's and the subscriber's window. To subscribe to Zemyna, to receive packets, you send the "op" (dwData) 100 to Zemyna's window (window name: "mod_Tossa"), to unsubscribe, you send 101. While you're subscribed, you receive all incoming (op 0x10101012) and outgoing (op 0x10101011) packets via the same method.

For an actual example on how this works, I suggest looking at the corresponding functions in Pale. Alternatively you can also create a plug-in for Pale, which will be easier.

Restrictions

  • Zemyna currently only supports the Login and Channel servers.
  • Due to ToS's protocol, Zemyna needs to be updated regularly, or there's a high chance for it not to function correctly. Check for updates after each game patch and report potential issues.

Korean TOS

If you click on Download, you will find multiple versions, one of them being for kTOS (notice the "k" prefix). Choose that one if you want to log packets on the Korean server.

Due to kTOS using a web login, we had to do things a little differently for the Korean version of Zemyna. You need an additional argument, "kr", which activates certain KR only options. Example:

Zemyna.exe host:54.88.25.242 port:2000 kr

After you started Zemyna like that, the client won't start automatically, but it will still modify the client files, so when you finally start the client via the web login, the connection will still go through Zemyna, allowing you to log packets using PaleTree.

  • Like 1
Link to comment
Share on other sites

  • exec pinned this topic
  • 4 weeks later...

Thanks for your code, It works well in NA client (with steam)

However, I can't adapt this file with KR client without 'nosteam' command. It only connects to local server.

'Zemyna.exe host:{KR server's IP} port:2000 nosteam'  (KR server doesn't  use steam)

How can I connect KR server by Zemyna?log.thumb.png.58e89e246483f10e7522988c59

 

Edited by SSanji
Link to comment
Share on other sites

The IPs you're seeing are local, because the temporary "proxy" server Zemyna starts is running locally, nothing wrong about that.

However, this version of Zemyna is only compatible with the international version, specifically i10911, as it says in the thread's title. To log packets on KR, you need a version specifically made for it. I'll try to release one later today.

Link to comment
Share on other sites

25 minutes ago, exec said:

The IPs you're seeing are local, because the temporary "proxy" server Zemyna starts is running locally, nothing wrong about that.

However, this version of Zemyna is only compatible with the international version, specifically i10911, as it says in the thread's title. To log packets on KR, you need a version specifically made for it. I'll try to release one later today.

Thank you for your reply!

Link to comment
Share on other sites

8 hours ago, SSanji said:

Thank you for your reply!

I've uploaded versions of Zemyna and PaleTree that should be compatible with k20696, the current version.

https://github.com/exectails/Zemyna/releases/tag/v1.0.0_k20696
https://github.com/exectails/PaleTree/releases/tag/v1.0.3_k20696

Unfortunately I can't confirm whether they are working, because I don't have access to kTOS. Feel free to tell me after you've tested it. Both will also need regular updates, whenever certain things change in the game's exe, usually after each TOS update.

Due to kTOS using a web login, we had to do things a little differently for the Korean version of Zemyna. You need an additional argument, "kr", which activates certain KR only options. Example:

Zemyna.exe host:54.88.25.242 port:2000 kr

After you started Zemyna like that, the client won't start automatically, but it will still modify the client files, so when you finally start the client via the web login, the connection will still go through Zemyna, allowing you to log packets using PaleTree.

Link to comment
Share on other sites

  • 2 weeks later...
On 2015. 12. 29. at 5:42 AM, exec said:

I've uploaded versions of Zemyna and PaleTree that should be compatible with k20696, the current version.

https://github.com/exectails/Zemyna/releases/tag/v1.0.0_k20696
https://github.com/exectails/PaleTree/releases/tag/v1.0.3_k20696

Unfortunately I can't confirm whether they are working, because I don't have access to kTOS. Feel free to tell me after you've tested it. Both will also need regular updates, whenever certain things change in the game's exe, usually after each TOS update.

Due to kTOS using a web login, we had to do things a little differently for the Korean version of Zemyna. You need an additional argument, "kr", which activates certain KR only options. Example:


Zemyna.exe host:54.88.25.242 port:2000 kr

After you started Zemyna like that, the client won't start automatically, but it will still modify the client files, so when you finally start the client via the web login, the connection will still go through Zemyna, allowing you to log packets using PaleTree.

I apprecited you. It works well, but it needs additional argument; 'nosteam'. Thank you!

Link to comment
Share on other sites

23 minutes ago, SSanji said:

I apprecited you. It works well, but it needs additional argument; 'nosteam'. Thank you!

It has that argument. If you want to log a local server, just start Zemyna like normal, without "kr", but with "nosteam".

Link to comment
Share on other sites

  • 4 months later...

In general, people logging packets shouldn't have trouble figuring this out, but just to help people out...

cd "C:\Program Files (x86)\Steam\steamapps\common\TreeOfSavior\release"
Zemyna.exe host:52.5.58.238 port:7001
:: 52.5.58.238:7001 (Klaipeda)
:: 52.200.8.230:7003 (Orsha)
:: 52.29.245.95:7004 (Fedirnian)
:: 52.77.117.72:7004 (Telsiai)
:: 52.77.140.95:7003 (Varena)

Stick Zemyna in the ToS/release folder and put this block into a .bat file anywhere.

As you can see, I've included the IP and port for each of the iTOS servers as of right now. I can't get the IP for Silute because it's down right now. (They're relocating it anyway, so the IP is bound to change.)

Edited by TehCupcakes
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hey @exec just wondering if this still works for the current version (apologies for my ignorance on the subject, still new to programming on ToS).

I've tried running this command in a .bat file with the IPs and ports I found in client.xml.

cd "C:\Program Files (x86)\Steam\steamapps\common\TreeOfSavior\release"
Zemyna.exe host:52.4.126.228 port:7002

Which seems to work since the little logo window pops up in the corner but shortly after I'll receive this popup:

e58552065d.png

And a log gets dumped as well but doesn't really clue me in on what the issue was.

4d076708b0.png

Again, sorry if I'm behind. Really eager to try this out with PaleTree since sorting through packets using WPE has been really messy. ^_^

Link to comment
Share on other sites

On 17/07/2016 at 5:48 PM, exec said:

After the last TOS update the config file is now downloaded via HTTPS, we have yet to update the web servers for Zemyna and Melia =/

 

exec a look on this wiki , Durande the closed beta tos he wore a load system config files false connection to the customer.

It might work

http://wiki.r1emu.net/doku.php

Edited by Phws
Link to comment
Share on other sites

21 hours ago, Phws said:

 

exec a look on this wiki , Durande the closed beta tos he wore a load system config files false connection to the customer.

It might work

http://wiki.r1emu.net/doku.php

Thank you for trying to help, though I'm not sure what it is you want to show me.

The problem is that they changed something, we now have to update Zemyna. Old research from R1 won't help us^^

Link to comment
Share on other sites

  • 3 months later...
  • exec unpinned this topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...