private void AttachToProcess(int rowIndex) { string processName = ProcessesListDataGridView.Rows[rowIndex].Cells[0].Value.ToString(); int pid = Convert.ToInt32(ProcessesListDataGridView.Rows[rowIndex].Cells[1].Value); mainForm.SelectedProcess = processName; OrbisDbg.SetProcess(processName); mainForm.SetButtonsEnabled(true); if (!Convert.ToBoolean(ProcessesListDataGridView.Rows[rowIndex].Cells[2].Value)) { ProcessesListDataGridView.Rows[rowIndex].Cells[2].Value = true; for (int i = 0; i < mainForm.pList.Count; i++) { if (mainForm.pList[i].pid == pid) { mainForm.pList[i].attached = 1; break; } } OrbisDbg.AttachProcess(); } }
private void DetachFromProcess(int rowIndex) { string processName = ProcessesListDataGridView.Rows[rowIndex].Cells[0].Value.ToString(); int pid = Convert.ToInt32(ProcessesListDataGridView.Rows[rowIndex].Cells[1].Value); OrbisDbg.SetProcess(processName); if (mainForm.AllowDetach()) { mainForm.SetButtonsEnabled(false); if (mainForm.memoryForm != null) { mainForm.memoryForm.Close(); } if (mainForm.disassemblyForm != null) { mainForm.disassemblyForm.Close(); } if (mainForm.breakpointForm != null) { mainForm.breakpointForm.Close(); } if (mainForm.registersForm != null) { mainForm.registersForm.Close(); } if (Convert.ToBoolean(ProcessesListDataGridView.Rows[rowIndex].Cells[2].Value)) { ProcessesListDataGridView.Rows[rowIndex].Cells[2].Value = false; for (int i = 0; i < mainForm.pList.Count; i++) { if (mainForm.pList[i].pid == pid) { mainForm.pList[i].attached = 0; break; } } OrbisDbg.DetachProcess(); } } else { MessageBox.Show("Please clear breakpoints before detaching from this process", "Process can't detach"); } }
private void ConnectToConsole() { IPAddress = IPAddressToolStripTextBox.Text; OrbisDbg.SetIP(IPAddress); pList = OrbisDbg.GetProcessList(); if (pList.Count > 0) { AttachToolStripButton.Enabled = true; ProcessesToolStripButton.Enabled = true; bool bAnyProcessesAttached = false; for (int i = 0; i < pList.Count; i++) { if (pList[i].attached != 0) { bAnyProcessesAttached = true; } } if (bAnyProcessesAttached) { SelectAttachedTarget selectAttachedTarget = new SelectAttachedTarget(pList); selectAttachedTarget.ShowDialog(); if (selectAttachedTarget.DialogResult == DialogResult.OK) { SelectedProcess = selectAttachedTarget.SelectedProcess; OrbisDbg.SetProcess(selectAttachedTarget.SelectedProcess); SetButtonsEnabled(true); } } processesWindowToolStripMenuItem.Enabled = true; ProcessesToolStripButton.Enabled = true; } else { string message = "Orbis Debugger could not connect to the Playstation 4 System\n" + "Please make sure your console is turned on and the payload has been loaded"; MessageBox.Show(message, "Error Connecting"); } }