From 6231cced65ee44b663dc86d30912e19578f8ce08 Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Sat, 16 Mar 2024 20:20:27 +0800 Subject: [PATCH] Add UI --- SandboxiePlus/SandMan/Forms/OptionsWindow.ui | 286 +++++++++--------- .../SandMan/Windows/OptionsAdvanced.cpp | 15 +- SandboxiePlus/SandMan/Windows/OptionsWindow.h | 2 + SandboxiePlus/SandMan/sandman_zh_CN.ts | 2 +- 4 files changed, 167 insertions(+), 138 deletions(-) diff --git a/SandboxiePlus/SandMan/Forms/OptionsWindow.ui b/SandboxiePlus/SandMan/Forms/OptionsWindow.ui index 6295f6f2..8d450811 100644 --- a/SandboxiePlus/SandMan/Forms/OptionsWindow.ui +++ b/SandboxiePlus/SandMan/Forms/OptionsWindow.ui @@ -666,10 +666,102 @@ Restrictions - - + + + + + 75 + true + true + + + + Protect the system from sandboxed processes + - Open Windows Credentials Store (user mode) + Network restrictions + + + + + + + Block network files and folders, unless specifically opened. + + + + + + + Prevent change to network and firewall parameters (user mode) + + + + + + + + 75 + true + true + + + + Protect the system from sandboxed processes + + + Printing restrictions + + + + + + + Block access to the printer spooler + + + + + + + Remove spooler restriction, printers can be installed outside the sandbox + + + + + + + + 0 + 0 + + + + Allow the print spooler to print to files outside the sandbox + + + + + + + + 75 + true + true + + + + Protect the system from sandboxed processes + + + Other restrictions + + + + + + + Open System Protected Storage @@ -692,13 +784,65 @@ - - + + - Prevents processes in the sandbox from interfering with power operation + Open Windows Credentials Store (user mode) + + + + Block read access to the clipboard + + + + + + + Allow to read memory of unsandboxed processes (not recommended) + + + + + + + Issue message 2111 when a process access is denied + + + + + + + + + Prevents processes in the sandbox from interfering with power operation + + + + + + + Block obtain an image of an un-sandboxied window through Windows public method + + + + + + + + + Qt::Vertical + + + + 20 + 43 + + + + @@ -712,136 +856,6 @@ - - - - Qt::Vertical - - - - 20 - 43 - - - - - - - - - true - true - - - - Protect the system from sandboxed processes - - - Printing restrictions - - - - - - - Allow to read memory of unsandboxed processes (not recommended) - - - - - - - - 0 - 0 - - - - Allow the print spooler to print to files outside the sandbox - - - - - - - Block read access to the clipboard - - - - - - - Block network files and folders, unless specifically opened. - - - - - - - Remove spooler restriction, printers can be installed outside the sandbox - - - - - - - Block access to the printer spooler - - - - - - - Prevent change to network and firewall parameters (user mode) - - - - - - - - true - true - - - - Protect the system from sandboxed processes - - - Other restrictions - - - - - - - Open System Protected Storage - - - - - - - - true - true - - - - Protect the system from sandboxed processes - - - Network restrictions - - - - - - - Issue message 2111 when a process access is denied - - - diff --git a/SandboxiePlus/SandMan/Windows/OptionsAdvanced.cpp b/SandboxiePlus/SandMan/Windows/OptionsAdvanced.cpp index 40510294..b45b5b75 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsAdvanced.cpp +++ b/SandboxiePlus/SandMan/Windows/OptionsAdvanced.cpp @@ -104,7 +104,8 @@ void COptionsWindow::CreateAdvanced() connect(ui.chkShowHostProcTmpl, SIGNAL(clicked(bool)), this, SLOT(OnShowHostProcTmpl())); connect(ui.chkConfidential, SIGNAL(clicked(bool)), this, SLOT(OnConfidentialChanged())); connect(ui.chkLessConfidential, SIGNAL(clicked(bool)), this, SLOT(OnLessConfidentialChanged())); - connect(ui.chkProtectWindow, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged())); + connect(ui.chkProtectWindow, SIGNAL(clicked(bool)), this, SLOT(OnProtectChanged())); + connect(ui.chkBlockCapture, SIGNAL(clicked(bool)), this, SLOT(OnCaptureChanged())); connect(ui.chkNotifyProtect, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged())); connect(ui.treeInjectDll, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnToggleInjectDll(QTreeWidgetItem *, int))); @@ -264,6 +265,7 @@ void COptionsWindow::LoadAdvanced() ui.chkNotifyProtect->setChecked(m_pBox->GetBool("NotifyBoxProtected", false)); ui.chkProtectWindow->setChecked(m_pBox->GetBool("IsProtectScreen")); + ui.chkBlockCapture->setChecked(m_pBox->GetBool("IsBlockCapture")); QStringList Users = m_pBox->GetText("Enabled").split(","); ui.lstUsers->clear(); @@ -468,6 +470,7 @@ void COptionsWindow::SaveAdvanced() WriteAdvancedCheck(ui.chkNotifyProtect, "NotifyBoxProtected", "y", ""); WriteAdvancedCheck(ui.chkProtectWindow, "IsProtectScreen", "y", "n"); + WriteAdvancedCheck(ui.chkBlockCapture, "IsBlockCapture", "y", "n"); QStringList Users; for (int i = 0; i < ui.lstUsers->count(); i++) @@ -1236,3 +1239,13 @@ void COptionsWindow::SaveDebug() DbgOption.Changed = false; } } +void COptionsWindow::OnCaptureChanged() { + ui.chkProtectWindow->setChecked(FALSE); + ui.chkProtectWindow->setCheckable(FALSE); + OnAdvancedChanged(); +} +void COptionsWindow::OnProtectChanged() { + ui.chkBlockCapture->setChecked(FALSE); + ui.chkBlockCapture->setCheckable(FALSE); + OnAdvancedChanged(); +} diff --git a/SandboxiePlus/SandMan/Windows/OptionsWindow.h b/SandboxiePlus/SandMan/Windows/OptionsWindow.h index 8154553e..bd0b223a 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsWindow.h +++ b/SandboxiePlus/SandMan/Windows/OptionsWindow.h @@ -232,6 +232,8 @@ private slots: void OnAccessChanged(); void OnSysSvcChanged(); void OnAdvancedChanged(); + void OnProtectChanged(); + void OnCaptureChanged(); void OnOpenCOM(); void OnIsolationChanged(); void OnDebugChanged(); diff --git a/SandboxiePlus/SandMan/sandman_zh_CN.ts b/SandboxiePlus/SandMan/sandman_zh_CN.ts index 81adc985..2ee0747a 100644 --- a/SandboxiePlus/SandMan/sandman_zh_CN.ts +++ b/SandboxiePlus/SandMan/sandman_zh_CN.ts @@ -1584,7 +1584,7 @@ Note: The update check is often behind the latest GitHub release to ensure that On Terminate - 在终端内 + 在沙盒终止时