From fe9cf9e54157dffe98f5bcee2493294c9254ba3f Mon Sep 17 00:00:00 2001 From: adam <1312adam@gmail.com> Date: Sun, 18 Oct 2026 03:53:31 +0200 Subject: [PATCH 1/2] Add setting for redacting hosts file --- client/Frontend/StartButtons.xaml | 19 ++++++++++++++++++- client/Frontend/StartButtons.xaml.cs | 10 ++++++++++ client/Settings.cs | 1 + client/data/Methods/Network.cs | 15 +++++++++++---- 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/client/Frontend/StartButtons.xaml b/client/Frontend/StartButtons.xaml index 1b1d218..ead0e39 100644 --- a/client/Frontend/StartButtons.xaml +++ b/client/Frontend/StartButtons.xaml @@ -118,7 +118,7 @@ - + @@ -178,6 +178,23 @@ + + + + + + + + >(); TCPConnections = new List(); UDPEndpoints = new List>(); - HostsFile = ""; - HostsFileHash = ""; - await DebugLog.LogEventAsync("Networking redaction enabled. NICs, routes, hosts file, and network connections were skipped.", region); + await DebugLog.LogEventAsync("Networking redaction enabled. NICs, routes, and network connections were skipped.", region); } else { @@ -60,12 +58,21 @@ public static async Task MakeNetworkData() AutoTuningLevelLocal = GetAutoTuningLevels(); - if (!Settings.RedactNetworking) + if (Settings.RedactHostsFile) + { + HostsFile = ""; + HostsFileHash = ""; + await DebugLog.LogEventAsync("Hosts file redaction enabled.", region); + } + else { HostsFile = GetHostsFile(); HostsFileHash = GetHostsFileHash(); await DebugLog.LogEventAsync("Hosts file retrieved.", region); + } + if (!Settings.RedactNetworking) + { TCPConnections = GetTCPConnections(); UDPEndpoints = Utils.GetWmi("MSFT_NetUDPEndpoint", "LocalAddress,LocalPort,OwningProcess", @"root\standardcimv2"); From ff30bd67c6fb6d8bdc3d283b4b99ef19fb118206 Mon Sep 17 00:00:00 2001 From: adam <1312adam@gmail.com> Date: Mon, 19 Oct 2026 13:54:34 +0200 Subject: [PATCH 2/2] Add redaction notice in hosts output --- client/data/Methods/Network.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/data/Methods/Network.cs b/client/data/Methods/Network.cs index fb04899..521739f 100644 --- a/client/data/Methods/Network.cs +++ b/client/data/Methods/Network.cs @@ -60,8 +60,8 @@ public static async Task MakeNetworkData() if (Settings.RedactHostsFile) { - HostsFile = ""; - HostsFileHash = ""; + HostsFile = "[REDACTED]"; + HostsFileHash = "[REDACTED]"; await DebugLog.LogEventAsync("Hosts file redaction enabled.", region); } else