Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 01:46

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

Advertisement



Upgrading password encryption

Discussion on Upgrading password encryption within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 01/12/2011, 19:17   #16
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by Kiyono View Post
Well I can't really do anything about the pointer usage since it's what Hybrid coded and I don't know how to change it.


No it's not the User, I printed it to the console and it showed the correct User.

//edit With:
Client.Password = Client.Decrypt(login->User, Received);
And entering password: 123456789
and the console prints: #<"%♀'$&! which are indeed 9 characters but not the correct ones.
Well that's your problem right there then. You need to use something else to read the packet into an array rather than into a string.


The simplest way is completely remove what you have there and then simply read from the packet using your own methods.


IE:

byte[] Pass = new byte[16];
Buffer.BlockCopy(Data, StartOfPass, Pass, 0, 16);

Then run pass through the decryption.


or just use any packet reading methods (impulses is sexy, Also a fan of tannel's)
pro4never is offline  
Old 01/12/2011, 19:26   #17

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Quote:
Originally Posted by pro4never View Post
Well that's your problem right there then. You need to use something else to read the packet into an array rather than into a string.


The simplest way is completely remove what you have there and then simply read from the packet using your own methods.


IE:

byte[] Pass = new byte[16];
Buffer.BlockCopy(Data, StartOfPass, Pass, 0, 16);

Then run pass through the decryption.


or just use any packet reading methods (impulses is sexy, Also a fan of tannel's)
I lost you there, how am I reading it into a string?
Kiyono is offline  
Old 01/12/2011, 21:38   #18
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
public string Password { get { fixed (uint* ptr = szPassword) { return new string((sbyte*)ptr); } } }


It's reading it as a string... for the password encryption to work you want it as a password array of 16 bytes.

I'd say just completely dump that handling of the code. All you really need to do for it is run 3 block copies (then convert two of them to strings using System.Encoding.ASCII.GetString(array); and the other one run through the decryption...

maybe when i'm home later I'll post how mine works (although mine is using tannel's packet reader)
pro4never is offline  
Old 01/12/2011, 21:43   #19

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Quote:
Originally Posted by pro4never View Post
public string Password { get { fixed (uint* ptr = szPassword) { return new string((sbyte*)ptr); } } }


It's reading it as a string... for the password encryption to work you want it as a password array of 16 bytes.

I'd say just completely dump that handling of the code. All you really need to do for it is run 3 block copies (then convert two of them to strings using System.Encoding.ASCII.GetString(array); and the other one run through the decryption...

maybe when i'm home later I'll post how mine works (although mine is using tannel's packet reader)
I'm not using that part at all, it was causing me trouble so I scrapped it.
//edit
PasswordCrypter.Decrypt((uint*)login->szPassword);
Client.Password = login->Password;
That uses szPassword crap, I simply changed it to:
Client.Password = Client.Decrypt(login->User, Received);

Decrypting:
Code:
public string Decrypt(string User, byte[] Packet)
        {
            MSVCRT.srand(gSeed);
            var rc5Key = new byte[0x10];
            for (int i = 0; i < 0x10; i++)
                rc5Key[i] = (byte)MSVCRT.rand();
            Byte[] EncryptedPass = new byte[16];
            Buffer.BlockCopy(Packet, 132, EncryptedPass, 0, 16);
            return Encoding.ASCII.GetString(
                (new ConquerPasswordCryptpographer(User).Decrypt(new RC5(rc5Key).Decrypt(EncryptedPass))));
        }
Kiyono is offline  
Old 01/13/2011, 02:31   #20
 
TaiZer's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 39
Received Thanks: 5
Try to type "test" as password it will decrypt well. If you try "test1" you will get "test#" for the decrypted password.
I have the same problem but I wanted to solve it later -_- lol
TaiZer is offline  
Old 01/13/2011, 15:29   #21

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Quote:
Originally Posted by TaiZer View Post
Try to type "test" as password it will decrypt well. If you try "test1" you will get "test#" for the decrypted password.
I have the same problem but I wanted to solve it later -_- lol
Just tried it and this seems to be the case, wonder why only numbers are affected.
Kiyono is offline  
Reply


Similar Threads Similar Threads
[HELP] Password encryption
12/26/2009 - CO2 Private Server - 27 Replies
What Password encryption does conquer have? i want to code register script and don`t know encryption for password,its not md5.
AuthServer password encryption
04/26/2009 - CO2 Private Server - 1 Replies
Well thought it would fit in this section. Most of the sources I seen works this way: the first time an account login, it takes the "encrypted" password received and set it in the database. I've been trying to figure the encryption used, but with no success, my ASM skills just sucks. So, could anyone decent with assembler/debugging help me with this?
CO password encryption
11/30/2008 - Conquer Online 2 - 3 Replies
Was it ever released? I know it was hiding in dev section for some time but I don't know if it ever got out. If it has, a friendly link to where to? Or if not, maybe an explanation? It's quite a weird encryption at first glance. Thanks in advance. <hr>Append on Apr 6 2007, 20:50<hr> As much as people would probably not like to help out, I'm trying to get stuff going for the benefit of the community : [ I'm doing a c++ server emu and so far everything's going smooth except the password...
Conquer Password Encryption?
12/25/2007 - Conquer Online 2 - 4 Replies
Me and my bro are currently making a private server and we need help with the password encryption. Any help would be greatly appreciated. :D



All times are GMT +2. The time now is 01:46.


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.