Add RDP user consent popup before screen sharing
When rdp_start arrives, agent first spawns a WPF consent dialog in the user session (via schtasks). User has 30s to accept or deny. On deny, agent sends rdp_denied to browser which shows "Zugriff abgelehnt". On accept, screen capture starts as before. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
agent-cs/ConsentModeRunner.cs
Normal file
21
agent-cs/ConsentModeRunner.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using ITNexusAgent.UI;
|
||||
|
||||
namespace ITNexusAgent;
|
||||
|
||||
// Läuft als User-Prozess (via schtasks), zeigt Consent-Dialog und sendet Antwort via TCP
|
||||
public static class ConsentModeRunner
|
||||
{
|
||||
public static void Run(string portStr)
|
||||
{
|
||||
if (!int.TryParse(portStr, out var port) || port <= 0) return;
|
||||
|
||||
var app = new System.Windows.Application();
|
||||
app.ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose;
|
||||
|
||||
var win = new RdpConsentWindow(port);
|
||||
win.Topmost = true;
|
||||
win.Show();
|
||||
win.Activate();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user