Register for your free account! | Forgot your password?

You last visited: Today at 15:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AuthStart Problem

Discussion on AuthStart Problem within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 20
Join Date: Oct 2010
Posts: 451
Received Thanks: 259
AuthStart Problem

Hey everyone...
I have a question.

I'm helping a friend with a server and he's getting:
Code:
®Pø¡|(×ä
'ûôÂc
as the account name when I type in "Fang".

The offsets are correct. What could be the cause of this?

Thanks in advance,
Fang
FuriousFang is offline  
Old 10/24/2010, 13:11   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Are you do this(From the top of my head)
Code:
Username.Split("/0");
or are you trying to decrypt the username when its not needed?

#edit
Code:
                        [B]Username = Encoding.ASCII.GetString(BR.ReadBytes(16));
                        Username = Username.Replace("\0", "");[/B]
                        BR.ReadBytes(112);
                        Password = Encoding.ASCII.GetString(BR.ReadBytes(16));
                        BR.ReadBytes(112);
                        Server = Encoding.ASCII.GetString(BR.ReadBytes(16));
                        Server = Server.Replace("\0", "");
_DreadNought_ is offline  
Old 10/24/2010, 19:49   #3
 
elite*gold: 20
Join Date: Oct 2010
Posts: 451
Received Thanks: 259
It's not as new as those codes. It's Conquer 1.0 Alpha.
The codes are:

Code:
//Determine Username
            int x = 0x04;
            while (x < 0x14 && Data[x] != 0x00)
            {
                AccountName += Convert.ToChar(Data[x]);
                x++;
            }
Code:
//Determine Password
            x = 0x14;
            int y = 0;
            byte[] Pass = new byte[16];
            while (x < 0x24)
            {
                Pass[y] = Data[x];
                Password += (Convert.ToString(Data[x], 16)).PadLeft(2, '0');
                x++;
                y++;
            }
Code:
//Determine Server - For future implementation eg. multiple servers
            x = 0x24;
            while (x < 0x34 && Data[x] != 0x00)
            {
                Server += Convert.ToChar(Data[x]);
                x++;
            }
            ServerIP = Database.LookupServer(Server);
All of which contain the right offsets. I did a watch test to confirm that. They just show up as weird characters (except for the password).
FuriousFang is offline  
Old 10/24/2010, 20:11   #4
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Ah sorry, erm, Better of asking someone like Ali(HA!) who has experiance with 1.0 (CPX)
_DreadNought_ is offline  
Old 10/24/2010, 21:17   #5
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
Code:
struct ClientLoginPacket {
	ushort size;
	ushort type;
	char[16] account;
	char[16] password;
	char[16] server;
}
Code:
case 0x41b:
			ClientLoginPacket* login = cast(ClientLoginPacket*)pBuffer;
			writeln("login: " ~ login.account);
			break;
Your encryption's probably bad; the same principle works fine for me.
_tao4229_ is offline  
Old 10/25/2010, 01:15   #6


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
See if you get different results from this:

Code:
            accountName = Encoding.ASCII.GetString(Data.Buffer, 4, 16).TrimEnd('\0');
            password = Encoding.ASCII.GetString(Data.Buffer, 20, 16).TrimEnd('\0');
            serverName = Encoding.ASCII.GetString(Data.Buffer, 36, 16).TrimEnd('\0');
Its unlikely, its just for confirmation really. Does the rest of the packet decrypt correctly (Type, Length)? Does the password decrypt correctly to plain text (This should be unlikely given the info you've given so far)?

Sounds like a crypto problem to me aswell.
Korvacs is offline  
Old 10/25/2010, 03:45   #7
 
elite*gold: 20
Join Date: Oct 2010
Posts: 451
Received Thanks: 259
Quote:
Originally Posted by Korvacs View Post
See if you get different results from this:

Code:
            accountName = Encoding.ASCII.GetString(Data.Buffer, 4, 16).TrimEnd('\0');
            password = Encoding.ASCII.GetString(Data.Buffer, 20, 16).TrimEnd('\0');
            serverName = Encoding.ASCII.GetString(Data.Buffer, 36, 16).TrimEnd('\0');
Its unlikely, its just for confirmation really. Does the rest of the packet decrypt correctly (Type, Length)? Does the password decrypt correctly to plain text (This should be unlikely given the info you've given so far)?

Sounds like a crypto problem to me aswell.
Ok, so I'm working with packet 11147 (1051 in patch 4267).
When I use the code you provided Korvacs, it unfortunately gives me this:
Code:
Acc: ?P??|(??
'????c
Server: ??????(?U??(?8
IP: Invalid
The length and offsets are set correctly. The password (now that I compare it) is not the same as what it should be. It's all messed up using weird characters.

The problem could be with the authpacket handler:
Code:
ushort Type = *(ushort*)(Ptr + 2);
ushort Length = *(ushort*)(Ptr + 0);
I doubt that the above is right. I'm experimenting with values to see if it is or not.

EDIT: Trying to get them from different offsets:
Code:
type  offset
5892 0
35607 1
11147 2
44587 3
20654 4
63568 5
41464 6
31905 7
10364 8
55080 9
58583 10
2788 11
9994 12
64295 13
33275 14
62593 15
49908 16
25538 17
7779 18
19230 19
59979 20
31978 21
53116 22
30927 23
34680 24
26503 25
43111 26
60328 27
45291 28
44208 29
26796 30
23144 31
2906 32
8715 33
45602 34
48306 35
51900 36
3786 37
16142 38
35903 39
45452 40
16305 41
3647 42
10254 43
36136 44
21901 45
43861 46
37547 47
10386 48
50472 49
14533 50
56 51
0 52
0 53
FuriousFang is offline  
Old 10/25/2010, 04:58   #8
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
The packet type should still be 0x41b(1051) in CO1. They didn't change.
_tao4229_ is offline  
Old 10/25/2010, 08:04   #9
 
elite*gold: 20
Join Date: Oct 2010
Posts: 451
Received Thanks: 259
Quote:
Originally Posted by _tao4229_ View Post
The packet type should still be 0x41b(1051) in CO1. They didn't change.
Hm... I wonder what's happening then.
I tried using other means of using the data to find the type.
Anyone wanta pm me and give it a try themselves?
(I'm really interested to see what Conquer Online looked like then!)
FuriousFang is offline  
Old 10/25/2010, 10:10   #10
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
Do you mind posting your cryptography which is used during authentication? The packet looks like it hasn't been decrypted at all/properly, like Saint and Korvacs pointed out.
tanelipe is offline  
Old 10/25/2010, 11:51   #11


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Its definately a crypto problem, take a look at that.
Korvacs is offline  
Reply


Similar Threads Similar Threads
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +2. The time now is 15:08.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.