Luigi Auriemma

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

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: server uses protocol version 68
PostPosted: 25 Jan 2008 06:00 

Joined: 14 Dec 2007 23:10
Posts: 6
Hi,

I'm writing a little program in c# that just connects to a quake 3 server and everything seems to work okay up until I send the connect packet.

To encode the connect packet I'm using q3huffdecenc.

Here is what the q3huffdecenc will encrypt:

Quote:
\challenge\1844132329\qport\59767\protocol\68\cl_guid\FEDC995C5B7B7B32734CEDA4E5F9D8C9\name\TEST\rate\25000\snaps\20\model\doom/blue\headmodel\doom/blue\team_model\doom/blue\team_headmodel\doom/blue\color1\1\color2\5\handicap\100\sex\male\cl_anonymous\0\cg_predictItems\1\cl_punkbuster\1\teamtask\0



(The challenge has come from getchallenge response)

Here is the encoded output (bear with me :) ):

Quote:
\challenge\??8`i??L????:??18{??D\??????>??????} o??????????P????????O\????????"??
??0??T??????%w???? u??|??x)??????????0????}0??????????????[??a??m????<???Zu????>????????#??!??????lW????6a????Nt?????????????????????a????h????,????Z?????6??}~??W 37??{??????N??aO????x?????Un/6????1??????]???GSEm$??;[??.3??-X??l????????????e??F


Finally I tack on to the start of this

Quote:
???????? connect

So the finally result before I load it into a byte array is
???????? connect \challenge\??8`i??L????:??18{??D\??????>??????} o??????????P????????O\????????"??
??0??T??????%w???? u??|??x)??????????0????}0??????????????[??a??m????<???Zu????>????????#??!??????lW????6a????Nt?????????????????????a????h????,????Z?????6??}~??W 37??{??????N??aO????x?????Un/6????1??????]???GSEm$??;[??.3??-X??l????????????e??F


The response from the server is "server uses protocol version 68."

I tried this on the latest version of quake3 (1.32c or something)
I also tried this against a random quake server on the net and got:
The server uses protocol version 66." I'm not sure if it is related...

In q3fill I noticed that for the version 68 error it is because the packet is not getting compressed (-c command line argument)

Any advice would be appreciated, if you need to see the source code I can attach it

Thanks,

sub.


Top
 Profile  
 
 
 Post subject:
PostPosted: 25 Jan 2008 11:38 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the error is in the usage of the huffman compression on the string and not on the packet, so instead of using it on \challenge\1844132329\q... use it on connect \challenge\1844132329\q...
I also suggest you to use the " char at the beginning and the end of the string: connect "\challenge\1844132329\q..."


Top
 Profile  
 
 Post subject:
PostPosted: 25 Jan 2008 16:11 

Joined: 14 Dec 2007 23:10
Posts: 6
Okay, I'm not sure if I follow entirely

Here is the exact string that will be encoded
Quote:
connect "challenge\201441968\qport\59767\protocol\68\cl_guid\FEDC995C5B7B7B32734CEDA4E5F9D8C9\name\TEST\rate\25000\snaps\20\model\doom/blue\headmodel\doom/blue\team_model\doom/blue\team_headmodel\doom/blue\color1\1\color2\5\handicap\100\sex\male\cl_anonymous\0\cg_predictItems\1\cl_punkbuster\0\teamtask\0\"


Is that how it should be or should it be this:

Quote:
????????connect "challenge\201441968\qport\59767\protocol\68\cl_guid\FEDC995C5B7B7B32734CEDA4E5F9D8C9\name\TEST\rate\25000\snaps\20\model\doom/blue\headmodel\doom/blue\team_model\doom/blue\team_headmodel\doom/blue\color1\1\color2\5\handicap\100\sex\male\cl_anonymous\0\cg_predictItems\1\cl_punkbuster\0\teamtask\0\"



or should it be:
Quote:
"challenge\201441968\qport\59767\protocol\68\cl_guid\FEDC995C5B7B7B32734CEDA4E5F9D8C9\name\TEST\rate\25000\snaps\20\model\doom/blue\headmodel\doom/blue\team_model\doom/blue\team_headmodel\doom/blue\color1\1\color2\5\handicap\100\sex\male\cl_anonymous\0\cg_predictItems\1\cl_punkbuster\0\teamtask\0\"

and then add ????????connect to the front of the string after it is encoded?


When I looked at the q3exdec.txt file that came with q3huffdecenc it looks like it is the second string I have posted here.

Note: I didn't calculate the guid I just used a hardcoded one the only dynamic part of the string is the challenge value

I've tried all three of the ones I've posted and I either get the 68 version error or the socket never receives a response from the server

Thanks,

sub


Top
 Profile  
 
 Post subject:
PostPosted: 26 Jan 2008 15:03 

Joined: 26 Jan 2008 00:59
Posts: 3
Location: France
I don't know if your problem comes from that but

Code:
????????connect "challenge\blah...


maybe it comes from that missing backslash in front of challenge: here is the beginning of the connect string I use in QCmd, which works against protocol 26 at least:

Code:
"\xff\xff\xff\xff" "connect \"\\challenge\\"


so if you try with

Code:
????????connect "\challenge\blahblah...


maybe it will work...

PS : are you sure you have a correct offset when compressing with huffman ? It's 12 for the whole string, normally: Huff_CompressPacket(buff, 12, len);

Hope this helps,
Gamall Wednesday Ida


Top
 Profile  
 
 Post subject:
PostPosted: 26 Jan 2008 19:28 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
yes subt13 all the packet included the 0xff chars, I forgot to put them in my example in the post.
So, all the packet must be passed to the huffman compression function


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