[Question] Proxy - deciphering server key packet

11/21/2010 19:28 vDrag0n#16
Quote:
Originally Posted by Kiyono View Post
No, I'm getting the same problem.
Let me know if you can solve it. Already tried to put project as x86 but nothing.
11/21/2010 19:50 Kiyono#17
Quote:
Originally Posted by vDrag0n View Post
Let me know if you can solve it. Already tried to put project as x86 but nothing.
Native.cs
Use this instead of what it was and the attached .dll, it'll fix the problem.
Code:
 [DllImport("libeay32.dll", CallingConvention = CallingConvention.Cdecl)]
        public extern static void BF_set_key(IntPtr _key, int len, byte[] data);
        [DllImport("libeay32.dll", CallingConvention = CallingConvention.Cdecl)]
        public extern static void BF_ecb_encrypt(byte[] in_, byte[] out_, IntPtr schedule, int enc);
        [DllImport("libeay32.dll", CallingConvention = CallingConvention.Cdecl)]
        public extern static void BF_cbc_encrypt(byte[] in_, byte[] out_, int length, IntPtr schedule, byte[] ivec, int enc);
        [DllImport("libeay32.dll", CallingConvention = CallingConvention.Cdecl)]
        public extern static void BF_cfb64_encrypt(byte[] in_, byte[] out_, int length, IntPtr schedule, byte[] ivec, ref int num, int enc);
        [DllImport("libeay32.dll", CallingConvention = CallingConvention.Cdecl)]
        public extern static void BF_ofb64_encrypt(byte[] in_, byte[] out_, int length, IntPtr schedule, byte[] ivec, out int num);
11/21/2010 20:20 vDrag0n#18
Will test but already sending a Thanks.
11/21/2010 20:20 denominator#19
'ConquerProxy.Native' does not contain a definition for 'memcpy' etc. At least I am not getting the bad image issue though. Just can`t build it lol.
11/21/2010 20:41 pro4never#20
So you know... all packets for game server are decrypted/encrypted even before the exchange is complete.

Not all values are initiated yet. That could be some of the problems you are having with setting up the keys.


@ bad image exception. I'm fairly sure that had to do with the loading method of the native calls or possibly it referencing x84 vs x64 files... I forget which (usually when I've seen that error it has to do with needing to change the dllloader settings or use a different dll)
11/21/2010 20:45 vDrag0n#21
Quote:
Originally Posted by denominator View Post
'ConquerProxy.Native' does not contain a definition for 'memcpy' etc. At least I am not getting the bad image issue though. Just can`t build it lol.
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe void* memcpy(void* dest, void* src, uint size);

Still..you wont be able to connect, at least i wasnt. But i'll take a look on the source.
11/21/2010 20:51 Kiyono#22
Quote:
Originally Posted by vDrag0n View Post
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe void* memcpy(void* dest, void* src, uint size);

Still..you wont be able to connect, at least i wasnt. But i'll take a look on the source.
Well that's kinda obvious as this is for patch 5228.
11/21/2010 21:00 vDrag0n#23
Quote:
Originally Posted by Kiyono View Post
Well that's kinda obvious as this is for patch 5228.
Has anything changed till then? Thought it wasnt
11/21/2010 21:32 denominator#24
Yup back to bad image again lol
11/21/2010 21:34 Kiyono#25
Quote:
Originally Posted by denominator View Post
Yup back to bad image again lol
Tried the .dll I attached?
11/21/2010 21:39 denominator#26
Yup and readded
Code:
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe void* memcpy(void* dest, void* src, uint size);
and
Code:
[DllImport("winmm.dll")]
        public static extern uint timeGetTime();
Ok I was a dick and didn`t put the dll in the right place hehehe. It now says "ready for connections"
Probably a stupid question but the loader that I have shouldn`t the setting be something like
Code:
[Loader]
IPAddress=127.0.0.1
LoginPort=9958
GamePort=5816
Sorry for all the edits but is this right or wrong?
Code:
public static string GameServerIP = "208.96.34.212";
11/21/2010 22:08 vDrag0n#27
This is the authserver.
11/21/2010 22:11 denominator#28
Ok how about 208.113.**.***?
11/22/2010 00:32 slam_15#29
what the pasword for .rar?
11/22/2010 00:58 tkblackbelt#30
Would you please pm me the password for the .rar. I've been trying to make a proxy and would like something you use as a reference to see how it works. thank you ahead of time and np if you don't.