Register for your free account! | Forgot your password?

Go Back   elitepvpers > Conquer Online 2 > CO2 Main - Discussions / Questions > CO2 Programming
You last visited: Today at 19:19

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

 

[HELP] GameServer Encrypt & Decrypt Class

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2013
Posts: 5
Received Thanks: 0
[HELP] GameServer Encrypt & Decrypt Class

Can someone give me GameServer Encrypt & Decrypt Class

i have one but it's for AuthProtocol

that's it

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cryptography
{
    /// <summary>
    /// AuthCryptographer
    /// Posted by unknownone
    /// http://www.elitepvpers.com/forum/co2-programming/200047-new-login-packet-client-5089-a.html#post1760129
    /// </summary>
    public class AuthProtocolCryptographer
    {
        internal class CryptCounter
        {
            UInt16 m_Counter = 0;

            public byte Key2
            {
                get { return (byte)(m_Counter >> 8); }
            }

            public byte Key1
            {
                get { return (byte)(m_Counter & 0xFF); }
            }

            public void Increment()
            {
                m_Counter++;
            }
        }

        private CryptCounter _decryptCounter;
        private CryptCounter _encryptCounter;
        private byte[] _cryptKey1;
        private byte[] _cryptKey2;
        private bool Client;

        public AuthProtocolCryptographer(bool Client)
        {
            this.Client = Client;
            _decryptCounter = new CryptCounter();
            _encryptCounter = new CryptCounter();
            _cryptKey1 = new byte[0x100];
            _cryptKey2 = new byte[0x100];
            byte i_key1 = 0x9D;
            byte i_key2 = 0x62;
            for (int i = 0; i < 0x100; i++)
            {
                _cryptKey1[i] = i_key1;
                _cryptKey2[i] = i_key2;
                i_key1 = (byte)((0x0F + (byte)(i_key1 * 0xFA)) * i_key1 + 0x13);
                i_key2 = (byte)((0x79 - (byte)(i_key2 * 0x5C)) * i_key2 + 0x6D);
            }
        }

        public void Encrypt(byte[] buffer)
        {
            if(Client)
                for (int i = 0; i < buffer.Length; i++)
                {
                    buffer[i] ^= (byte)(_cryptKey1[_encryptCounter.Key1]);
                    buffer[i] ^= (byte)(_cryptKey2[_encryptCounter.Key2]);
                    buffer[i] = (byte)(buffer[i] >> 4 | buffer[i] << 4);
                    buffer[i] ^= (byte)0xAB;
                    _encryptCounter.Increment();
                }
            else
                for (int i = 0; i < buffer.Length; i++)
                {
                    buffer[i] ^= (byte)0xAB;
                    buffer[i] = (byte)(buffer[i] >> 4 | buffer[i] << 4);
                    buffer[i] ^= (byte)(_cryptKey1[_encryptCounter.Key1]);
                    buffer[i] ^= (byte)(_cryptKey2[_encryptCounter.Key2]);
                    _encryptCounter.Increment();
                }

        }

        public void Decrypt(byte[] buffer)
        {
            if (Client)
                for (int i = 0; i < buffer.Length; i++)
                {
                    buffer[i] ^= (byte)(_cryptKey2[_decryptCounter.Key2]);
                    buffer[i] ^= (byte)(_cryptKey1[_decryptCounter.Key1]);
                    buffer[i] = (byte)(buffer[i] >> 4 | buffer[i] << 4);
                    buffer[i] ^= (byte)0xAB;
                    _decryptCounter.Increment();
                }
            else
                for (int i = 0; i < buffer.Length; i++)
                {
                    buffer[i] ^= (byte)0xAB;
                    buffer[i] = (byte)(buffer[i] >> 4 | buffer[i] << 4);
                    buffer[i] ^= (byte)(_cryptKey2[_decryptCounter.Key2]);
                    buffer[i] ^= (byte)(_cryptKey1[_decryptCounter.Key1]);
                    _decryptCounter.Increment();
                }
        }
    }
}
it's work, but i need for GameServer



CorrM is offline  
Old   #2
 
elite*gold: 67
Join Date: Aug 2014
Posts: 1,312
Received Thanks: 917
Right... What patch? You know there are gazillions of public sources (that *all* have the auth/game crypto) right?

Afaik there are only a couple of different Game cryptos.

42xx had one version of xor, then 43xx had another, then 5018 implemented blowfish that's still used to date though with additional PW crypto and different keys.


Xio. is offline  
Old   #3
 
elite*gold: 0
Join Date: Aug 2013
Posts: 5
Received Thanks: 0
Can Give Me All patch for this class .?

i try to work in last patch servers.
can you help me about last patch cryptology and how to Decrypt
CorrM is offline  
Old   #4
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,932
Received Thanks: 3,323
All known cryptography:

We can't help you further due to the nature of the demand.


Spirited is offline  
Old   #5
 
elite*gold: 0
Join Date: Aug 2013
Posts: 5
Received Thanks: 0
Lightbulb

Quote:
Originally Posted by Spirited View Post
All known cryptography:

We can't help you further due to the nature of the demand.
thank you Spirited <3.

but this is the packet i received when i connect to GameServer After Auth
Code:
F4-B3-97-71-3D-3F-D1-1C-49-67-20-7C-56-EF-BF-E1-EA-40-59-CB-E4-28-8A-AF-39-A7-F4-65-5F-1C-19-54-45-07-9E-7A-A5-E7-3E-5A-5D-DD-59-ED-F8-86-D4-0A-9B-81-20-B2-B0-AD-E9-B8-DB-04-85-89-13-9F-0C-D9-50-73-21-F3-B8-ED-09-DA-1D-85-F7-C4-6D-AD-3F-0D-4B-C4-B0-18-C2-70-4A-60-D4-BE-E0-5E-CA-65-57-48-E5-0C-FB-1C-58-00-6F-26-70-E5-AA-C2-13-7F-7F-E7-99-5B-4F-0A-89-6D-16-1C-71-8B-62-C0-E3-F8-0B-BD-CE-16-B3-B9-8E-03-49-EB-00-3E-81-1E-ED-42-F9-A6-C0-77-06-32-8C-BC-33-A1-33-EB-72-1D-A6-F1-07-69-70-C0-32-42-7A-4A-26-9B-BA-47-B9-CB-08-CE-C8-E7-4D-F2-65-0B-D0-EC-4B-7C-29-20-00-1F-49-30-62-4F-8E-25-C2-28-56-C5-CA-41-68-CA-73-46-7C-7B-89-92-45-A0-73-87-3E-CC-02-1C-C4-58-7A-2F-11-93-86-F0-83-F5-C7-8D-9B-5F-1A-55-2D-5F-11-00-CF-00-09-FD-77-2E-10-1F-67-1F-0C-E0-F9-C4-56-20-79-D2-69-C5-94-C4-83-F9-67-79-41-60-15-3D-E1-7B-4A-93-89-79-BF-1D-70-EA-65-9A-CE-D2-92-D3-9B-C4-2A-A3-EF-68-9A-7C-93-AF-16-FA-D4-A2-7A-3F-AE-0D-D4-11-0D-C7-9F-B2-B4-6C-B0-E4-A6-E1-DA-53-9B-DB-C3-79-CD-6D-FD-26-4E-58-B0-55-94-7E-EE-B2-E6-72-28
how can i detect the Cipher Type.
i'm good programmer but not good at Encryption
i maked some good stuf with Auth because i have AuthProtocolCryptographer
but now i not have For GameServer so some help in this point will be a big thing for me :* <3
CorrM is offline  
Old   #6
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,932
Received Thanks: 3,323
You cannot detect the cipher type. If this is a new cipher, you must reverse engineer the client. Hence my reply of "We can't help you further due to the nature of the demand." I don't think anyone here works using the current client anymore. There's no need to.
Spirited is offline  
Old   #7
 
elite*gold: 0
Join Date: Aug 2013
Posts: 5
Received Thanks: 0
Quote:
Originally Posted by Spirited View Post
You cannot detect the cipher type. If this is a new cipher, you must reverse engineer the client. Hence my reply of "We can't help you further due to the nature of the demand." I don't think anyone here works using the current client anymore. There's no need to.
Thank you for continue replay in this topic.

can you give me Last ver of the class and can give me some links for the type of class cipher type and how it's work, or example to decrypt Patcket.

i make proxy bot for Private Server not to original co so i think the last ver will work.

Thanks Spirited.
CorrM is offline  
Old   #8
 
elite*gold: 0
Join Date: Aug 2013
Posts: 5
Received Thanks: 0
Any News .?
CorrM is offline  
Old   #9
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,932
Received Thanks: 3,323
Quote:
Originally Posted by CorrM View Post
Any News .?
Nobody I know works with the current client, so unknown.
Unless someone speaks up, you're on your own.


Spirited is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
C++ Text Decrypt Function + Programm Encrypt to Decrypt
http://desmond.imageshack.us/Himg233/scaled.php?server=233&filename=icevisionzxencrypttodec.png&res=medium Download: uploaded.to - where your...
19 Replies - WarRock Hacks, Bots, Cheats & Exploits
[Verkaufe]Encrypt & Decrypt Source.
So, da ich langsam iwie keine lust mehr auf Flyff habe, habe ich mich entschieden meine Encryption sachen was Packets und so betrifft einfach...
2 Replies - Flyff PServer - Discussions / Questions
[Help]C++ RC5 Decrypt/Encrypt Account Serevr
Greetings guys, i was working on my own server and am coding it in c++, i heared i must decrypt the msg from the client so i can check if the user...
1 Replies - Eudemons Online
Alefclient.exe ansi-dump segment +Tsearch howto link +encrypt/decrypt details
006A444C PUSH alefclie.0081F0F4 Item_Bound_On_Owner 006A4499 PUSH alefclie.0081F0E0 Item_Bind_On_Use...
8 Replies - Archlord
Itemtype.DAT Encrypt/Decrypt
I don&#39;t know who made this tool i found it in my C:&#092; folder named Project1.exe it has no company name nor does it have an about section. So i...
1 Replies - CO2 Exploits, Hacks & Tools



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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.