Tales Runner server setup

Status
Not open for further replies.
KillerStefan said:
== Client Modification ==

patch.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<patcher>
<zonelist>
<zone name="USA">
<host>tr-game01.gpotato.com:9500</host>
<patch host="download4.gpotato.com" path="/Talesrunner/patch/" />
</zone>
</zonelist>
<program defaultparam="gpotato" />
</patcher>
This file is in the directory of the USA version as well as in the tr4.pkg file but for the Korean version it's only in tr4.pkg.
I don't know about other clients, please check this!
You can overwrite this by using parameters on trgame.exe but it seems to be overwritten upon login.
Well I found something good. It could probably help you out
Here:
<?xml version="1.0" encoding="utf-8"?>
<patcher>
<zonelist>
<zone name="USA">
<host></host>
<patch host="download.talesrunner.com" path="/Talesrunner/patch/"

/>
</zone>
</zonelist>
<program defaultparam="gpotato" />
</patcher>
I don't have a host so I can't do it. So far, I got till the starter's "hashing" part.
Without adding patch.xml to KTR's folder, I wouldn't get 'till the hashing part.

Finally, I found a file that could also help too.
download.talesrunner.com/talesrunner/patch/filelist.txt
We can edit it and upload it to our patch host site.

EDIT: I found the whole directory of download.talesrunner.com/talesrunner/patch/
This is the link:
And the host... We need a person with a mac that has Pacifist (Or if you can actually open a .pkg file on windows which is hard) to find KTR's patch.xml and we'll find the files in the host server.


Hosting for the KTR installer is also not needed.

I just posted the download link.
 
Last edited:
I'd just like to point out that you don't even need an external host since you can just point it to 127.0.0.1 and have a local server catch it and pass back the info. I already have a basic one created in python when I was playing around with this a few weeks ago.
 
I'd just like to point out that you don't even need an external host since you can just point it to 127.0.0.1 and have a local server catch it and pass back the info. I already have a basic one created in python when I was playing around with this a few weeks ago.
EDIT: Checked if my database is already connected.
It is. It's connected to both localhost and 127.0.0.1 but it keeps showing a connection error. I guess I'll have to wait for KillerStefan to release more stuff.
 
Last edited:
EDIT: Checked if my database is already connected.
It is. It's connected to both localhost and 127.0.0.1 but it keeps showing a connection error. I guess I'll have to wait for KillerStefan to release more stuff.

I was able to get past patching (even with incorrect hash information) by tossing filelist.txt on my local apache server, and then modifying a jump statement in the talesrunner.exe to accept the filelist.txt hash (the one at the bottom, with the "end" tag) no matter what it is. Not sure how this md5 hash is generated, but it must be passed on the hashes in the .txt. Since if you change any of the hash information on the client will catch that and reject you. By modifying the talesrunner.exe, I can essentially say any .pkg file is up-to-date. Although mind you, I'm running an older version, before xtrap was implemented...

So now I can have my client connect to the local loadbalanceserver.exe, but it sends an incorrect hash, and loadbalanceserver rejects it. I'll look into this more.

I've never done any sql databases before (at most a few basic commands to a database to get some info), so I'm not sure what sort of procedures need to be added. It looks like manneke wrote one earlier. And I suspect xHalloweenX had some running (judging by the fact his communityagentserver wasn't bringing up errors).

That reminds me, it would be great if someone could re-upload manneke's script: "http://silkroadonline.be/TalesRunner/Other/TRDBSettingsDecryptionTest.zip" from the 3rd page of this thread.

Also, I haven't been able to get the roomserver or agentserver GUI's to come up like xHalloweenX does in his screenshot.. I checked out the agentserver in ollydbg and it looks like its getting an "Access violation - no RTTI data!" error? Seems like a database problem, probably the path in dbsettings.ini is wrong?

Strange since the communityagentserver is able to see the database. Also, I the communityagentserver isn't able to see the communitysessionserver, and I'm not sure why... I changed the settings to my local ip and it doesn't seem to work.

Would be great to get some more information :)
 
hey KillerStefan,

tried pming you but its full ;) so i guess I'll try you here. if you still need a host for files and what not, i can dedicate part of my server to you and a subdomain if you'd like. pm me if your interested.
 
So now I can have my client connect to the local loadbalanceserver.exe, but it sends an incorrect hash, and loadbalanceserver rejects it. I'll look into this more.

I modified the loadbalanceserver to pass the hash check every time, and now it prints out
Code:
GET_MINUSERS_SERVER_REQ : 192.168.0.12:30850(:0)
onClosed:index=131073, closeType=2
Client disconnected : 65536

Of course the 192.168.0.12 is my local ip. So I'm thinking it's trying to get the min users from the database? Or one of the other servers?

Any thoughts would be great :)

EDIT: attached screenshot of current progress... Not nearly as far as halloween. agentserver and roomserver were running, but the gui isn't coming up like most people here.

I'm still getting that updateUserCount error, even after I ran the procedure from manneke: forum.ragezone.com/f111/tales-runner-server-setup-823928/index3.html#post6876286
talesrunner1 - Tales Runner server setup - RaGEZONE Forums
 
Last edited:
You're welcome!

If you're interested in how it works: the ODBC connection information is stored in dbsetting.ini, an encrypted file.
When I found the decrypting function in the server executable, I only had to decompile it and make a little app to use it.

I didn't really research how the en-/decryption actually works, but it shouldn't be too hard to figure out when you have the (decompiled) source.

Source code:
License: Do whatever you want with it! (public domain)
One request: if you figure out how en-/decryption works, make it public.

Edit: Updated file location.

Seeing as how the host is dead, and after asking KillerStefan to send me the file, and having him not send it, or even acknowledge that I asked for it.. I decided to do it without the old file.

I ripped the IDA generated C function and tried getting it working.. the signedness was off I think, so after a bit of help from KG and Fatalis, we got the decryption function working in C#.

Code:
byte[] buffer = new byte[] {0xB5, 0X9C, 0x19, 0xAE, 0x0C, 0xDC, 0x9F, 0x81, 0xE0, 0x24, 0xD2, 0x5D, 0x33, 0xC1, 0x86, 0x4B, 0x0A, 0x57, 0x5F, 0x3B};
            int s = 1;
            for (int i = 0; i < buffer.Length; i++)
            {

                byte b = buffer[i];
	        buffer[i] = (byte)(((buffer[i] << (7 - s % 7)) | (byte)(buffer[i] >> (8 - (7 - s % 7)))) - s % 255 - 1);
                s = (b + s + 1) % 1785;
            }

            Console.WriteLine(Encoding.ASCII.GetString(buffer));

This will output
Code:
korea
sa
talesrunner

The byte buffer is simply the dbsetting.ini in hex values. From reading the code it should be fairly clear what is happening here (compared to if you were to use the assembly functions). It should be possible to create an encoding function based on this.

Here's also a quick compiled version if anyone wants to just run it on other files:

Enjoy, I hope more information will be released...
 
Last edited:
Well, since I'm a newbie at this and C# I should just go and leave it to you guys. I hope you have fun when you are making all the servers for the rooms. *More disk space* (8D)
 
The byte buffer is simply the dbsetting.ini in hex values. From reading the code it should be fairly clear what is happening here (compared to if you were to use the assembly functions). It should be possible to create an encoding function based on this.

So I gave a shot at reversing the decoding function into an encoding function. I hit a small block and my roommate helped me out haha. Shoutout to TB.

So it's pretty cool that the strings can be encoded, making it now possible to change the database name to essentially anything we want (or change any other encrypted file(s)).

Normally I would share the source code/compiled binaries for it, but seeing as how nobody else is working on this (or at least not talking about it, or sharing what they've found), I won't be posting this.

If someone is interested they can PM me and I will share both the source and the binaries.

If you want proof that I'm able to encode strings, just convert these hexadecimal characters through the decoder to get the message.

Code:
D51205B284CF4DEF3DF05C26894D521E6D1C9C1AF9770BDA32C59D8E3E

Alternatively, download the file I've attached and run it through the decoder.

Hopefully this will inspire some people to talk to me, everyone that seems to know what they're talking about is so tight lipped about it.
 

Attachments

Normally I would share the source code/compiled binaries for it, but seeing as how nobody else is working on this (or at least not talking about it, or sharing what they've found), I won't be posting this.

Please keep this in mind (also attached for convenience):
Code:
51DA5E3DE8134E01E95CB183F7822875B0A8AEA6AD7C1440D09916DAB6D6502D3E8764BA9B408A889904E70783FD778EF60B0776F175E96E1A6BBC42C4125A6EA68E0F0E345A110E3E4EDFD6C74D82BF29DDBF8B87734585FDFFDE29B02DE4ADBC99C4272EFF67878F3C77B7BF9984DBAAA27E09BDF964D43ED8C8EA1112260945E8F397D2528BCD3702301D21647A3BCE22A888F6EB7530B870707DC78973FCC5DB0DCD60854E8BA851CE099A8AF6F016DAAA3DBDFEFBA64BF2DAB6F0B5F12C236CFD4C41AC00C360277A6C83C35CFBBDE624C6E76B832BD97AC3CAB2BCDDC2E2F0A37F2FAA2BBCF045CC9AA7AC397EBB57A0539D46864DAB03B146C5C737F892B2663FA013DE45E71BEBF0048F4B26B991520C16E4F11B6577E28279B048BF60E05D2CA34772BBDBDCCCAB99670E222D889B1E36A25B8153DC1F386720BA4C8A70D6BBD28CA8F8D186493CE0404F86915DF4EE6BE21071F7E65837A8F8D6DA84E8E0B7A6A8E77F85143501E5C0158F200A635030CC59D813D4F3E5BA04E0603684D0971C

I'm not working on Tales Runner though, or anything at the moment for that matter since I'm really busy IRL, but it's still nice to see people helping the community. Since my version is based solely upon your posted decryption code, and not the executables (which means that there might be bugs in mine), you can still have the honors of sharing it if you change your mind ;).

Good luck!
 

Attachments

Status
Not open for further replies.
Back