-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
54 lines (42 loc) · 1.66 KB
/
Program.cs
File metadata and controls
54 lines (42 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DragonClient
{
static class Program
{
private static void UdpTest()
{
const int UdpHeaderLen = 3;
const short OpCode = DragonClient.Packet.SendOps.FieldMigrate;
var pbody = new byte[] {0x0F,0x8A,0x1B,0xB9,0xC0,0xA8,0x00,0x6B,0x00,0x00};
var packet = new DragonLib.IO.PacketWriter();
packet.WriteBytes(pbody);
var body = packet.ToArray();
byte[] crypted = new byte[1024];
int v1 = 0x03; //opcodes
int v2 = 0x02;
Console.WriteLine(DragonLib.Tools.HexTool.ToString(pbody));
//int len = DragonLib.Network.Crypto.EncryptUDP(pbody, body.Length, v1, v2, crypted);
//byte[] final = new byte[len + UdpHeaderLen];
//final[0] = 0x2; //hardcode udp header
// final[2] = 0xe6; //hardcode udp header
//copy crypted to final, at index 3
//Buffer.BlockCopy(crypted, 0, final, UdpHeaderLen, len);
// Console.WriteLine(DragonLib.Tools.HexTool.ToString(final));
// Console.ReadLine();
}
[STAThread]
static void Main()
{
Console.Title = "DragonClient Console";
Console.ForegroundColor = ConsoleColor.White;
//UdpTest();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}