|
<?xml version="1.0"?>
<mysqldump xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">
<database name="serverdat">
<table_structure name="outenserver">
<field field="id" type="int(10) unsigned" null="no" key="pri" default="" extra="" />
<field field="servername" type="varchar(50)" null="no" key="" default="0" extra="" />
<field field="serverip" type="varchar(128)" null="no" key="" default="0" extra="" />
<field field="serverport" type="int(10) unsigned" null="no" key="" default="0" extra="" />
<field field="flashname" type="varchar(50)" null="no" key="" default="0" extra="" />
<field field="flashicon" type="varchar(50)" null="no" key="" default="0" extra="" />
<field field="flashhint" type="varchar(50)" null="no" key="" default="0" extra="" />
<field field="child" type="int(10) unsigned" null="no" key="" default="0" extra="" />
<field field="picserverip" type="varchar(50)" null="no" key="" default="0" extra="" />
<field field="picserverport" type="int(10) unsigned" null="no" key="" default="0" extra="" />
<field field="bindserverip" type="varchar(50)" null="no" key="" default="0" extra="" />
<field field="bindserverport" type="int(10) unsigned" null="no" key="" default="0" extra="" />
<field field="charges" type="int(10) unsigned" null="no" key="" default="0" extra="" />
<key table="outenserver" non_unique="0" key_name="primary" seq_in_index="1" column_name="id" collation="a" cardinality="165" null="" index_type="btree" comment="" />
<options name="outenserver" engine="myisam" version="10" row_format="dynamic" rows="165" avg_row_length="80" data_length="13316" max_data_length="281474976710655" index_length="4096" data_free="0" create_time="2016-05-09 06:42:48" update_time="2017-05-18 02:21:22" collation="utf8_general_ci" create_options="" comment="" />
</table_structure>
<table_data name="outenserver">
<row>
<field name="id">0</field>
<field name="servername"></field>
<field name="serverip"></field>
<field name="serverport">0</field>
<field name="flashname"></field>
<field name="flashicon"></field>
<field name="flashhint"></field>
<field name="child">17</field>
<field name="picserverip">0</field>
<field name="picserverport">0</field>
<field name="bindserverip">0</field>
<field name="bindserverport">0</field>
<field name="charges">0</field>
</row>
<row>
<field name="id">1</field>
<field name="servername"></field>
<field name="serverip"></field>
<field name="serverport">0</field>
<field name="flashname">group17</field>
<field name="flashicon">group18.swf</field>
<field name="flashhint"></field>
<field name="child">1</field>
<field name="picserverip">0</field>
<field name="picserverport">0</field>
<field name="bindserverip">0</field>
<field name="bindserverport">0</field>
<field name="charges">0</field>
</row>
<row>
<field name="id">101</field>
<field name="servername">vikingconquer</field>
<field name="serverip">192.168.1.3</field>
<field name="serverport">9960</field>
<field name="flashname">vikingconquer</field>
<field name="flashicon">group13/server1.swf</field>
<field name="flashhint"></field>
<field name="child">0</field>
<field name="picserverip">0</field>
<field name="picserverport">0</field>
<field name="bindserverip">0</field>
<field name="bindserverport">0</field>
<field name="charges">0</field>
</row>
</table_data>
</database>
</mysqldump>
public unsafe static void createdhkey
public unsafe static void createdhkey(serversockets.securitysocket obj, serversockets.packet stream)
{
try
{
byte[] buffer = new byte[36];
bool extra = false;
string text = system.text.asciiencoding.ascii.getstring(obj.dhkeybuffer.buffer, 0, obj.dhkeybuffer.length());
if (!text.endswith("tqclient"))
{
system.buffer.blockcopy(obj.encrypteddhkeybuffer.buffer, obj.encrypteddhkeybuffer.length() - 36, buffer, 0, 36);
extra = true;
}
// myconsole.printpacketadvanced(stream.memory, stream.size);
string key;
if (stream.gethandshakereplykey(out key))
{
obj.setdhkey = true;
obj.game.dhkey.handleresponse(key);
var compute_key = obj.game.dhkeyexchance.postprocessdhkey(obj.game.dhkey.tobytes());
//obj.game.crypto.setivs(new byte[8], new byte[8]);
obj.game.crypto.generatekey(compute_key);
obj.game.crypto.reset();
}
else
{
obj.disconnect();
return;
}
if (extra)
{
stream.seek(0);
obj.game.crypto.decrypt(buffer, 0, stream.memory, 0, 36);
stream.size = buffer.length;
stream.size = buffer.length;
stream.seek(2);
ushort packetid = stream.readuint16();
action<client.gameclient, serversockets.packet> hinvoker;
if (msginvoker.trygetinvoker(packetid, out hinvoker))
{
hinvoker(obj.game, stream);
}
else
{
obj.disconnect();
myconsole.writeline("dh key not found the packet ----> " + packetid);
}
}
}
catch (exception e) { myconsole.writeexception(e); }
}
<?xml version="1.0"?>
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="serverdat">
<table_structure name="outenserver">
<field Field="id" Type="int(10) unsigned" Null="NO" Key="PRI" Default="" Extra="" />
<field Field="ServerName" Type="varchar(50)" Null="NO" Key="" Default="0" Extra="" />
<field Field="ServerIP" Type="varchar(128)" Null="NO" Key="" Default="0" Extra="" />
<field Field="ServerPort" Type="int(10) unsigned" Null="NO" Key="" Default="0" Extra="" />
<field Field="FlashName" Type="varchar(50)" Null="NO" Key="" Default="0" Extra="" />
<field Field="FlashIcon" Type="varchar(50)" Null="NO" Key="" Default="0" Extra="" />
<field Field="FlashHint" Type="varchar(50)" Null="NO" Key="" Default="0" Extra="" />
<field Field="Child" Type="int(10) unsigned" Null="NO" Key="" Default="0" Extra="" />
<field Field="PicServerIP" Type="varchar(50)" Null="NO" Key="" Default="0" Extra="" />
<field Field="PicServerPort" Type="int(10) unsigned" Null="NO" Key="" Default="0" Extra="" />
<field Field="BindServerIP" Type="varchar(50)" Null="NO" Key="" Default="0" Extra="" />
<field Field="BindServerPort" Type="int(10) unsigned" Null="NO" Key="" Default="0" Extra="" />
<field Field="Charges" Type="int(10) unsigned" Null="NO" Key="" Default="0" Extra="" />
<key Table="outenserver" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="165" Null="" Index_type="BTREE" Comment="" />
<options Name="outenserver" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="165" Avg_row_length="80" Data_length="13316" Max_data_length="281474976710655" Index_length="4096" Data_free="0" Create_time="2016-05-09 06:42:48" Update_time="2017-05-18 02:21:22" Collation="utf8_general_ci" Create_options="" Comment="" />
</table_structure>
<table_data name="outenserver">
<row>
<field name="id">0</field>
<field name="ServerName"></field>
<field name="ServerIP"></field>
<field name="ServerPort">0</field>
<field name="FlashName"></field>
<field name="FlashIcon"></field>
<field name="FlashHint"></field>
<field name="Child">17</field>
<field name="PicServerIP">0</field>
<field name="PicServerPort">0</field>
<field name="BindServerIP">0</field>
<field name="BindServerPort">0</field>
<field name="Charges">0</field>
</row>
<row>
<field name="id">1</field>
<field name="ServerName"></field>
<field name="ServerIP"></field>
<field name="ServerPort">0</field>
<field name="FlashName">Group17</field>
<field name="FlashIcon">Group18.swf</field>
<field name="FlashHint"></field>
<field name="Child">1</field>
<field name="PicServerIP">0</field>
<field name="PicServerPort">0</field>
<field name="BindServerIP">0</field>
<field name="BindServerPort">0</field>
<field name="Charges">0</field>
</row>
<row>
<field name="id">101</field>
<field name="ServerName">VikingConquer</field>
<field name="ServerIP">192.168.1.3</field>
<field name="ServerPort">9960</field>
<field name="FlashName">VikingConquer</field>
<field name="FlashIcon">Group13/server1.swf</field>
<field name="FlashHint"></field>
<field name="Child">0</field>
<field name="PicServerIP">0</field>
<field name="PicServerPort">0</field>
<field name="BindServerIP">0</field>
<field name="BindServerPort">0</field>
<field name="Charges">0</field>
</row>
</table_data>
</database>
</mysqldump>
public unsafe static void CreateDHKey
public unsafe static void CreateDHKey(ServerSockets.SecuritySocket obj, ServerSockets.Packet Stream)
{
try
{
byte[] buffer = new byte[36];
bool extra = false;
string text = System.Text.ASCIIEncoding.ASCII.GetString(obj.DHKeyBuffer.buffer, 0, obj.DHKeyBuffer.Length());
if (!text.EndsWith("TQClient"))
{
System.Buffer.BlockCopy(obj.EncryptedDHKeyBuffer.buffer, obj.EncryptedDHKeyBuffer.Length() - 36, buffer, 0, 36);
extra = true;
}
// MyConsole.PrintPacketAdvanced(Stream.Memory, Stream.Size);
string key;
if (Stream.GetHandshakeReplyKey(out key))
{
obj.SetDHKey = true;
obj.Game.DHKey.HandleResponse(key);
var compute_key = obj.Game.DHKeyExchance.PostProcessDHKey(obj.Game.DHKey.ToBytes());
//obj.Game.Crypto.SetIVs(new byte[8], new byte[8]);
obj.Game.Crypto.GenerateKey(compute_key);
obj.Game.Crypto.Reset();
}
else
{
obj.Disconnect();
return;
}
if (extra)
{
Stream.Seek(0);
obj.Game.Crypto.Decrypt(buffer, 0, Stream.Memory, 0, 36);
Stream.Size = buffer.Length;
Stream.Size = buffer.Length;
Stream.Seek(2);
ushort PacketID = Stream.ReadUInt16();
Action<Client.GameClient, ServerSockets.Packet> hinvoker;
if (MsgInvoker.TryGetInvoker(PacketID, out hinvoker))
{
hinvoker(obj.Game, Stream);
}
else
{
obj.Disconnect();
MyConsole.WriteLine("DH KEY Not found the packet ----> " + PacketID);
}
}
}
catch (Exception e) { MyConsole.WriteException(e); }
}
الذين يشاهدون محتوى الموضوع الآن : 4 ( الأعضاء 0 والزوار 4) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
سورسه لعبه Viking الي عا التوب 100 | Mr. Co | سورسات كونكر | 334 | 2024-10-28 06:56 PM |
لودر csv3config العادي معظم الناس محتاجه .. | AMREL3FREIT | البرامج والودرات | 171 | 2024-10-08 04:52 PM |
سورس Viking بي الانيما مبروك عليكم :D | محمودمحمدسالم | سورسات كونكر | 147 | 2024-08-04 03:37 PM |
ازاي اشغل ام الباتش بتاع سورس Viking الانيما؟ | Mr3bdallahPro | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-04-29 11:42 PM |
اضافت vip 7 وا vip8 في السورسات العادي | ElSaher | تطوير سيرفرات كونكر | 4 | 2019-08-10 07:37 PM |