Luigi Auriemma

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

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: gslist - gsseckey - C and PHP and exe - different results
PostPosted: 30 Nov 2007 12:08 

Joined: 30 Nov 2007 11:56
Posts: 2
Ok, first go Helo all, first post
Second, big thanks for your awesome work, Luigi.

My problem is:
- I have downloaded gslist (latest) 0.8.3 beta
- I made simple program in C using gsmsalg.h from gslist source
- I have PHP port of gslist by Jan0 too

When I use gslist executable and query master server for game 'armedass' I see calculation of verification string, using method 1:
Code:
XGCKPP -> sPqaDlgg


I tried both my C program and PHP port and both gave me different results:

C program:
Code:
source XGCKPP key peprUy dest 1U9WQkkQ method 0
source XGCKPP key peprUy dest uOEPAVEt method 1
source XGCKPP key peprUy dest pSomMBxp method 2
source XGCKPP key fgDmOT dest PDqrSyEQ method 0
source XGCKPP key fgDmOT dest UgFFxAUt method 1
source XGCKPP key fgDmOT dest Wl3vJm5E method 2


PHP port by Jan0
Code:
XGCKPP -> 1U9WQkkQ
XGCKPP -> uOEPAVEt
XGCKPP -> pSomMBxp
XGCKPP -> PDqrSyEQ
XGCKPP -> UgFFxAUt
XGCKPP -> Wl3vJm5E


As you can see none of them are same as you gsList result. I thought that can be a problem with key, but I use same keys as gsList provide using "gslist -u".
Code:
ArmA: Armed Assault                                   armaas             fgDmOT
ArmA: Armed Assault                                   armedass           fgDmOT
ArmA: Armed Assault                                   armedass           peprUy
ArmA: Armed Assault demo                              armedassd               
Armed Assault                                         armedass           peprUy


The question is: if my C code is same as compiled by you in executable and my key is the same as gslist takes for calculation, where is a problem?


Top
 Profile  
 
 
 Post subject:
PostPosted: 30 Nov 2007 19:02 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the trick is that gslist doesn't use the gamename of the game you want to query for accessing the master server, but a fixed one:

source XGCKPP key d4kZca dest sPqaDlgg method 1


Top
 Profile  
 
 Post subject:
PostPosted: 04 Dec 2007 09:07 

Joined: 30 Nov 2007 11:56
Posts: 2
thank you very much Luigi, that was so easy :)

OK, now I have some problems with PHP port of GsList. It's receiving data from gamespy server but cant decode it (using method1). It looks like problems with bitwise operations or pointers. In C algorithm look good and works good, but in Ja0 PHP port its getting into unfinite loop.

At the moment I found that its something about functions:
Code:
function lshiftright($var,$amt)
function _BF_SHR32 ($x, $bits)
function _BF_SHL32 ($x, $bits)
function _BF_GETBYTE ($x, $y)
function _BF_OR32 ($x, $y)
function _BF_ADD32 ($x, $y)


and how they're used in function encshare2(&$tbuff, &$tbuffp, $len) while' loops.

I found those bitwise methods on PHP site: http://www.php.net/manual/en/language.o ... itwise.php

Anyway, actually I'm debuging both codes (C, PHP) to find where are differences in calculated results.
Its not question for you, Luigi as its not your code, but for anyone who had same problem and found a solution.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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: