Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 12:30

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: Master server emulation with enctypex
PostPosted: 23 Sep 2008 20:56 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
This enctypeX, which is just the algorithm/protocol used by ANY game for getting the list of servers from the Gamespy master server (it's the connection which reaches the master server on port 28910 so it's easy to understand to what I refer), seems to have many good things: it's big endian compatible, works on the fly and now seems to be also "reversable".

In short from my quick tests seems that this algorithm can be used for both decrypting and encrypting the data so it's possible to write the own master server for LAN or private networks gaming when needed.

For any additional test, question, doubt or feedback about the protocol and the algorithm refer to this thread.


Top
 Profile  
 
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 27 Jul 2009 09:09 

Joined: 27 Jul 2009 01:45
Posts: 2
I'm working on a master server emulator. I was able to get the decryption code you posted to work, but I'm wondering if you have some code written that encrypt the messages that the master server sends as well?

My understanding is that client messages are sent unencrypted and have an 8 char "validation" salt that's somehow used on the server side to encrypt the reply. When the reply arrives, it has a header that is discarded by your code except for the initialization vector (IV) that is before the encrypted message body. Any idea on how to encrypt these replies?

You suggested that the encryption is symmetric, but I'm having trouble getting it inverted.


Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 27 Jul 2009 09:55 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
uhmmm very strange, I remember to have done some tests and it seemed to work in both the modes while now I'm retesting it and it doesn't.
well seems that I need to check better this thing, I will keep you update.


Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 27 Jul 2009 10:11 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
cool, job done :)
I will release the new version later after some tests


Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 27 Jul 2009 14:04 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
released:
http://aluigi.org/papers.htm#enctypex

I have attached a test code to this post which shows both the usage and the decrypt-enctype-redecrypt test


Attachments:
enctypextest.zip [24.81 KiB]
Downloaded 156 times
Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 28 Jul 2009 05:40 

Joined: 27 Jul 2009 01:45
Posts: 2
Awesome work. Only 2 lines needed to be changed ;) Thanks a lot for the quick response and fix!

I'm getting pretty close to finishing a working ra3 emulator in python. I'll host it on http://teknogods.com/ once I've finished, in case you're interested.

EDIT:
Also, do you have any idea what the master server's message header contains (the part before the encrypted data)? It varies in length, and your code has to XOR a couple of the bytes to get the offsets into the rest of the message. One XOR val is 0xEA the other is 0XEC. What do these signify? Do the other bytes need to be XORed as well?


Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 28 Jul 2009 10:45 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the second part of that field is used in the decryption/encryption process while the first is unused if I'm not in error.
in enctypex_quick_encrypt I used a fixed size of both the fields filled with random bytes


Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 13 Nov 2010 08:25 

Joined: 13 Nov 2010 07:14
Posts: 2
aluigi wrote:
In short from my quick tests seems that this algorithm can be used for both decrypting and encrypting the data so it's possible to write the own master server for LAN or private networks gaming when needed.


Hi, I run a private gaming community and would like to emulate my own master servers.
Would it be possible to use this same algorithm to emulate a UT2004 master server?
If so, could you point me in the right direction?
I'm wanting to create a master server that hands out my game serverlist from a db/text file. Heartbeats from game servers would not be required.

I'm asking because I know UT2004 contacts epic's masterlists: ut2004master1.epicgames.com and ut2004master2.epicgames.com
Not gamespy's? But I know gslist has all the ut2004 servers.


Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 13 Nov 2010 21:36 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
ut2004 uses the gamespy master server so yes it can be emulated but I don't have a basic master server code, it was a project I had in mind but I wasn't much interested.
anyway my enctypex code contains also the encryption algorithm so there are no obstacles... oh well except writing it :)

note that I can't help or follow you with this thing at the moment.


Top
 Profile  
 
 Post subject: Re: Master server emulation with enctypex
PostPosted: 14 Nov 2010 00:20 

Joined: 13 Nov 2010 07:14
Posts: 2
Thanks for the quick reply and answering my question :)
I'll be working on getting this going. If/When I do, I'll give you credit for using your enctypex code.
Thanks again, hopefully I won't run into too many problems!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron