المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : لودر لتشغيل سورسات ال 3d قبل البروتوا


محمد ياسر
2019-04-20, 11:27 AM
السلام عليكم ورحمة الله وبركاته

في ناس عنده سورسات لكن مش بتشتغل كسرفير واحد وتجيب سيرفيرات اونلاين كله

تعالوا نحل المشكله ده في 3 قايق





افتح ملف Authentication.cs

وبدل الي جواها بده

using System;
using System.IO;
using System.Text;
using MoDY.Network.Cryptography;

namespace MoDY.Network.AuthPackets
{
public unsafe class Authentication : Interfaces.IPacket
{
public string Username;
public string Password;
public string Server;


public Authentication()
{
}
public void Deserialize(byte[] buffer)
{
if (buffer.Length == 312)
{
ushort length = BitConverter.ToUInt16(buffer, 0);

if (length == 312)
{

ushort type = BitConverter.ToUInt16(buffer, 2);
byte[] temp = new byte[16];
if (type == 1542)
{
MemoryStream MS = new MemoryStream(buffer);
BinaryReader BR = new BinaryReader(MS);

BR.ReadUInt16();
BR.ReadUInt16();
Username = Encoding.Default.GetString(BR.ReadBytes(32));
Username = Username.Replace("\0", "");
BR.ReadBytes(36);
var PasswordArray = BR.ReadBytes(32);
LoaderEncryption.Decrypt(PasswordArray, 32);
Password = Encoding.Default.GetString(PasswordArray);
Password = Password.Replace("\0", "");
BR.ReadBytes(32);
Server = Encoding.Default.GetString(BR.ReadBytes(32));
Server = Server.Replace("\0", "");
BR.Close();
MS.Close();
}
}
}
}

public byte[] ToArray()
{
throw new NotImplementedException();
}
public void Send(Client.GameState client)
{
throw new NotImplementedException();
}
}

}


افتح ملف Forward.cs

وبدله بده



using System;
using System.Text;

namespace MoDY.Network.AuthPackets
{
public unsafe class Forward : Interfaces.IPacket
{
byte[] Buffer;
public enum ForwardType : byte
{
Ready = 2,
Ready2 = 3,
InvalidInfo = 1,
Banned = 25,
WrongAccount = 57
}
public Forward()
{
Buffer = new byte[52];
Writer.WriteUInt16(52, 0, Buffer);
Writer.WriteUInt16(1055, 2, Buffer);
}
public uint Identifier
{
get { return BitConverter.ToUInt32(Buffer, 4); }
set { Writer.WriteUInt32(value, 4, Buffer); }
}
public ForwardType Type
{
get { return (ForwardType)(byte)BitConverter.ToUInt32(Buffer, 8); }
set { Writer.WriteUInt32((byte)value, 8, Buffer); }
}
public ushort Port
{
get { return BitConverter.ToUInt16(Buffer, 12); }
set { Writer.WriteUInt16(value, 12, Buffer); }
}
public string IP
{
get { return Encoding.Default.GetString(Buffer, 20, 16); }
set { Writer.WriteString(value, 20, Buffer); }
}
public byte[] ToArray()
{
return Buffer;
}
public void Deserialize(byte[] buffer)
{

}
public void Send(Client.GameState client)
{
client.Send(Buffer);
}
}
}

افتح كلاس LoaderEncryption.cs

وبدل الي جواها بده

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

namespace MoDY.Network.Cryptography
{
public class LoaderEncryption
{
private static byte[] Key = { 12, 12, 215, 10, 20, 11, 60, 193, 11, 96, 53, 157, 71, 37, 150, 225, 86, 224, 178, 184, 230, 147, 79, 194, 160, 0, 99, 239, 218, 134, 179, 13, 247, 155, 237, 245, 165, 245, 128, 144 };
public static void Encrypt(byte[] arr)
{
int length = Key.Length;
for (int i = 0; i < arr.Length; i++)
{
arr[i] ^= Key[i % length];
arr[i] ^= Key[(i + 1) % length];

}
}
public static void Decrypt(byte[] arr, int size)
{
int length = Key.Length;
for (int i = 0; i < size; i++)
{
arr[i] ^= Key[(i + 1) % length];
arr[i] ^= Key[i % length];






}
}
}
}

لحد كده تمام

لو حملت الباتش ومرضيش يدخل السيرفير

افتح ملف server.cs

وابحث عن

#region GameServer|AuthServer

اقفله من السالب وبدله بده

#region GameServer|AuthServer
static void GameServer_OnClientReceive(byte[] buffer, int length, ClientWrapper obj)
{
if (obj.Connector == null)
{
obj.Disconnect();
return;
}
Client.GameState Client = obj.Connector as Client.GameState;
if (Client.Exchange)
{
Client.Exchange = false;
Client.Action = 1;
var crypto = new Network.Cryptography.GameCryptography(System.Text. Encoding.Default.GetBytes(Constants.GameCryptograp hyKey));
byte[] otherData = new byte[length];
Array.Copy(buffer, otherData, length);
crypto.Decrypt(otherData, length);

bool extra = false;
int pos = 0;
if (BitConverter.ToInt32(otherData, length - 140) == 128)//no extra packet
{
pos = length - 140;
Client.Cryptography.Decrypt(buffer, length);
}
else if (BitConverter.ToInt32(otherData, length - 176) == 128)//extra packet
{
pos = length - 176;
extra = true;
Client.Cryptography.Decrypt(buffer, length - 36);
}
int len = BitConverter.ToInt32(buffer, pos); pos += 4;
if (len != 128)
{
Client.Disconnect();
return;
}
byte[] pubKey = new byte[128];
for (int x = 0; x < len; x++, pos++) pubKey[x] = buffer[pos];
string PubKey = System.Text.Encoding.Default.GetString(pubKey);
Client.Cryptography = Client.DHKeyExchange.HandleClientKeyPacket(PubKey, Client.Cryptography);
if (extra)
{
byte[] data = new byte[36];
Buffer.BlockCopy(buffer, length - 36, data, 0, 36);
processData(data, 36, Client);
}
}
else
{
processData(buffer, length, Client);
}
}
private static void processData(byte[] buffer, int length, Client.GameState Client)
{
Client.Cryptography.Decrypt(buffer, length);
Client.Queue.Enqueue(buffer, length);
if (Client.Queue.CurrentLength > 1224)
{
Console.WriteLine("[Disconnect]Reason:The packet size is too big. " + Client.Queue.CurrentLength);
Client.Disconnect();
return;
}
while (Client.Queue.CanDequeue())
{
byte[] data = Client.Queue.Dequeue();
MsgHandler.Process(data, Client);
}
}
static void GameServer_OnClientConnect(ClientWrapper obj)
{
Client.GameState client = new Client.GameState(obj);
client.Send(client.DHKeyExchange.CreateServerKeyPa cket());
obj.Connector = client;
}
static void GameServer_OnClientDisconnect(ClientWrapper obj)
{
if (obj.Connector != null)
(obj.Connector as Client.GameState).Disconnect();
else
obj.Disconnect();
}
static void AuthServer_OnClientReceive(byte[] buffer, int length, ClientWrapper arg3)
{
var player = arg3.Connector as Client.AuthClient;

player.Cryptographer.Decrypt(buffer, length);

player.Queue.Enqueue(buffer, length);
while (player.Queue.CanDequeue())
{
byte[] packet = player.Queue.Dequeue();

ushort len = BitConverter.ToUInt16(packet, 0);
ushort id = BitConverter.ToUInt16(packet, 2);
if (len == 312)
{

player.Info = new Authentication();
player.Info.Deserialize(packet);
player.Account = new AccountTable(player.Info.Username);
msvcrt.msvcrt.srand(player.PasswordSeed);

Forward Fw = new Forward();


if (player.Account.Password == player.Info.Password && player.Account.exists)
Fw.Type = Forward.ForwardType.Ready;
else
Fw.Type = Forward.ForwardType.InvalidInfo;


if (IPBan.IsBanned(arg3.IP))
{
Fw.Type = Forward.ForwardType.Banned;
player.Send(Fw);
return;
}

if (Fw.Type == Network.AuthPackets.Forward.ForwardType.Ready)
{
Fw.Identifier = player.Account.GenerateKey();
Kernel.AwaitingPool[Fw.Identifier] = player.Account;
Fw.IP = GameIP;
Fw.Port = GamePort;
}

player.Send(Fw);
}
}
}

static void AuthServer_OnClientDisconnect(ClientWrapper obj)
{
obj.Disconnect();
}
static void AuthServer_OnClientConnect(ClientWrapper obj)
{
Client.AuthClient authState;
obj.Connector = (authState = new Client.AuthClient(obj));
authState.Cryptographer = new Network.Cryptography.AuthCryptography();
Network.AuthPackets.PasswordCryptographySeed pcs = new PasswordCryptographySeed();
pcs.Seed = Kernel.Random.Next();
authState.PasswordSeed = pcs.Seed;
authState.Send(pcs);
}
internal static Client.GameState FindClient(string name)
{
return GamePool.FirstOrDefault(p => p.Player.LoweredName == name);
}
#endregion


الباتش (عفواً لايمكن عرض الروابط في الإرشيف)

Amr Khalid
2019-04-30, 10:39 PM
تسلم ي صحبي

etetoo2015
2019-05-19, 06:22 AM
تسلم يا صاحبي

ابو حمزه9
2019-07-09, 10:51 AM
شكراً ياحزم تسلم إيديك :)

anwer1
2019-07-09, 12:21 PM
عاش يا حازم

MohamedModyAdel
2019-07-12, 01:34 AM
عاش ي ستاز

بشيغلاشمغ
2019-07-13, 02:47 PM
جميل

youssefabdelmanam
2019-07-14, 06:30 AM
thanks

HBESA
2019-09-26, 06:35 PM
تسلم

Diego
2019-10-06, 04:23 AM
عاااش

Amr Khalid
2019-12-24, 09:51 PM
عااااش

مجدى
2020-02-19, 03:04 PM
عاااش

megokarika
2020-02-20, 11:38 PM
jlhlhlhl

Thinker
2020-02-22, 12:49 AM
شكرا

midoazoz
2020-02-22, 09:34 AM
عاش

mohammedzonzor
2020-02-26, 06:38 AM
عاش

ahmedd
2020-03-14, 08:59 PM
عاش

krappa
2020-04-04, 02:46 PM
عاش يا حازم

mohmad
2022-01-09, 02:28 AM
الله ينور

technogames
2022-01-15, 06:14 AM
thanks

Adel Abd El Hay
2022-01-30, 04:42 PM
عاش تسلم ايدك

watany50
2022-02-08, 01:43 PM
شكرا

hamadajti
2022-02-18, 03:55 AM
lindo

MahmoudElsndbad
2022-02-26, 02:53 PM
سسيسشيشس

ziadto14
2022-03-26, 05:21 AM
فغغغغغغغغغغغغغغغغ

MahmoudBadr
2022-05-06, 07:04 AM
عااش

xiaoyu9527
2023-04-22, 09:57 AM
look

swil00
2023-05-13, 10:02 PM
1

adult2104
2023-05-26, 05:58 PM
tesdt

fathi84
2023-05-26, 11:55 PM
يارب يشتغل

hulkman3010
2023-07-09, 02:09 PM
شكرا

cotest1
2023-07-10, 12:31 AM
nicee

samy8529
2023-07-11, 01:40 AM
عااااش

Wiske
2024-02-19, 11:38 PM
عاش

Naderahmed1
2024-02-25, 02:02 PM
1

Adel Abd El Hay
2024-04-21, 05:15 PM
شكراً ياحزم تسلم إيديك

mohamed alaa
2024-07-27, 12:06 PM
thx

ahmednero2
2024-08-09, 01:51 PM
ty

mustafa11
2024-08-12, 09:58 AM
مش سغال

hegazii4
2024-09-09, 11:23 PM
11111

ahmed30
2024-09-29, 07:21 PM
تست

01008746609
2024-09-30, 10:57 AM
هنجرب

ali.fanky
2024-11-12, 07:26 PM
شكرا

endhappy24
2024-11-15, 12:51 PM
شكرا