Пример #1
0
        private void ConnectPS4_Button_Click(object Injecter, EventArgs e)
        {
            try
            {
                ps4.Connect();
                Calling.Notify("ItsJokerZz's\nPayload + ELF Injector\n\nhas connected!\n\n\n", 210);
                selectedProcess = null;
                GetProcesses();

                Invoke((MethodInvoker) delegate
                {
                    CurrentStatus_Label.ForeColor = Color.LimeGreen;
                    CurrentStatus_Label.Text      = "Connected to PS4 using jkPatch!";

                    IP_TextBox.Enabled              = false;
                    Port_TextBox.Enabled            = false;
                    InjectjkPatch_Button.Enabled    = false;
                    ConnectPS4_Button.Enabled       = false;
                    SelectELF_Button.Enabled        = true;
                    InjectELF_Button.Enabled        = true;
                    Proccesses_ComboBox.Enabled     = true;
                    RefreshProcesses_Button.Enabled = true;
                });
            }
            catch (Exception)
            {
                CurrentStatus_Label.ForeColor = Color.Red;
                CurrentStatus_Label.Text      = "Connection to PS4 using jkPatch failed!";
            }
        }
Пример #2
0
        private void JkPatch_BGWorker_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            try
            {
                Invoke((MethodInvoker) delegate
                {
                    CurrentStatus_Label.ForeColor = Color.RoyalBlue;
                    CurrentStatus_Label.Text      = $"Sending payload.bin to {IP_TextBox.Text}:{Port_TextBox.Text}...";
                });
                SocketConnection(IP_TextBox.Text, jkPatch_Payload, Convert.ToInt32(Port_TextBox.Text));
                Thread.Sleep(2000);
                Invoke((MethodInvoker) delegate
                {
                    CurrentStatus_Label.Text = $"Sending kpayload.elf to {IP_TextBox.Text}:9023...";
                });
                SocketConnection(IP_TextBox.Text, jkPatch_ELF, 9023);
                Thread.Sleep(1000);
                Invoke((MethodInvoker) delegate
                {
                    CurrentStatus_Label.ForeColor = Color.LimeGreen;
                    CurrentStatus_Label.Text      = "jkPatch injected successfully!";
                    Calling.Notify("Payload + ELF Injector\nCreated by ItsJokerZz\n\njkPatch injected successfully!\n\n\n", 210);

                    InjectjkPatch_Button.Enabled = false;
                    ConnectPS4_Button.Enabled    = true;
                });
            }
            catch (Exception ex)
            {
                if (ex.HResult == -2147467259)
                {
                    Invoke((MethodInvoker) delegate
                    {
                        CurrentStatus_Label.ForeColor = Color.Red;
                        CurrentStatus_Label.Text      = "jkPatch injection failed!";
                    });
                }
                else
                {
                    MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                }
            }
        }