Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Form1 : Form
- {
- public string server = "74.86.170.188";//"us1.auth.garena.com";
- public int port = 8687;//7456;
- private Socket socket;
- public Form1()
- {
- InitializeComponent();
- socket = ConnectSocket(server, port);
- }
- private static Socket ConnectSocket(string server, int port)
- {
- Socket s = new TcpClient().Client;
- s.Connect(server, port);
- return s;
- }
- private void button1_Click(object sender, EventArgs e)
- {
- byte[] receive = new byte[1040];
- byte[] packet0 = File.ReadAllBytes(@"./joinroom_3.ga");
- byte[] packet1 = File.ReadAllBytes(@"./joinroom_login.ga");
- byte[] packet2 = File.ReadAllBytes(@"./joinroom_3-czsk1.ga");
- socket.Send(packet0, packet0.Length, SocketFlags.None);
- socket.Send(packet1, packet1.Length, SocketFlags.None);
- socket.Send(packet2, packet2.Length, SocketFlags.None);
- socket.Receive(receive);
- foreach (byte r in receive)
- textBox1.Text += r.ToString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement