|
|
using system;
using system.io;
using system.text;
using fighter.network.cryptography;
namespace fighter.network.authpackets
{
public class authentication : Interfaces.ipacket
{
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);
if (type == 1542)
{
buffer = buffer;
}
}
}
}
public string username
{
get
{
return encoding.default.getstring(buffer, 8, 32).replace("\0", "");
}
}
public string password
{
get
{
try
{
byte[] passwordarray = encoding.default.getbytes((string)(encoding.default.getstring(buffer, 72, 32)));
if (passwordarray.length <= 0) return "";
loaderencryption.decrypt(passwordarray, 32);
string x = encoding.default.getstring(passwordarray);
return x.replace("\0", "");
}
catch
{
return "";
}
}
}
public string server
{
get
{
return encoding.default.getstring(buffer, 136, 16).replace("\0", "").replace("0", "");
}
}
public string macaddress
{
get
{
return encoding.default.getstring(buffer, 152, 16).replace("\0", "");
}
}
byte[] buffer;
public byte[] toarray()
{
throw new notimplementedexception();
}
public void send(client.gamestate client)
{
throw new notimplementedexception();
}
}
}
using system;
using system.collections.generic;
using system.linq;
using system.text;
namespace fighter.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];
}
}
}
}
gamecryptographykey
gamecryptographykey = "ql0uvcxb6by9txb2";
| الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| مكتبة الكلينتات ال2دى وال3دي والكلاسيك | virus7x | تطوير سيرفرات كونكر | 192 | 2026-11-27 06:26 PM |
| اضافه ابيك القرصان للسورسات العاديه | Hazem | تطوير سيرفرات كونكر | 47 | 2021-09-15 08:07 PM |
| الموضوع الاهم فى عالم السورسات ال2دي | virus7x | تطوير سيرفرات كونكر | 27 | 2020-12-19 02:11 AM |
| شرح كيفيت تغيير gameMap من 3دي ال2دي وا العكس شرح فديو | ElSaher | تطوير سيرفرات كونكر | 0 | 2019-08-09 06:32 AM |