Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions client/Frontend/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ private async void Application_Startup(object sender, StartupEventArgs e)
Settings.RedactOneDriveCommercial = true;
break;

case "-redact-networking":
Settings.RedactNetworking = true;
break;

case "-dont-upload":
Settings.DontUpload = true;
break;
Expand Down
18 changes: 0 additions & 18 deletions client/Frontend/StartButtons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -194,23 +193,6 @@

</Grid>

<Grid Grid.Row="2" Grid.Column="0">

<Border CornerRadius="8"
BorderThickness="2"
BorderBrush="#576277"
Margin="2"/>

<CheckBox Name="RedactNetworkingCheckbox"
HorizontalAlignment="Center"
VerticalAlignment="Center" Content=" Redact Network"
Checked="RedactNetworkingOn" Unchecked="RedactNetworkingOff"
Style="{DynamicResource CheckBoxStyle1}"
Width="120" Foreground="White"
FontFamily="Consolas" VerticalContentAlignment="Center"/>

</Grid>



</Grid>
Expand Down
10 changes: 0 additions & 10 deletions client/Frontend/StartButtons.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ private void SerialNumberOff(object sender, RoutedEventArgs e)
Settings.RedactSerialNumber = false;
}

private void RedactNetworkingOn(object sender, RoutedEventArgs e)
{
Settings.RedactNetworking = true;
}

private void RedactNetworkingOff(object sender, RoutedEventArgs e)
{
Settings.RedactNetworking = false;
}

private void DebugLogToggleOn(object sender, RoutedEventArgs e)
{
Settings.EnableDebug = true;
Expand Down
1 change: 0 additions & 1 deletion client/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ public static class Settings
public static bool RedactUsername { get; set; } = false;
public static bool RedactSerialNumber { get; set; } = false;
public static bool RedactOneDriveCommercial { get; set; } = false;
public static bool RedactNetworking { get; set; } = false;
public static bool DontUpload { get; set; } = false;
public static bool Headless { get; set; } = false;
public static bool LocalCulture { get; set; } = false;
Expand Down
58 changes: 20 additions & 38 deletions client/data/Methods/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,21 @@ public static async Task MakeNetworkData()
{
DebugLog.Region region = DebugLog.Region.Networking;
await DebugLog.StartRegion(region);
if (Settings.RedactNetworking)
{
NetAdapters = new List<Dictionary<string, object>>();
NetAdapters2 = new List<Dictionary<string, object>>();
IPRoutes = new List<Dictionary<string, object>>();
TCPConnections = new List<TCPConnection>();
UDPEndpoints = new List<Dictionary<string, object>>();
HostsFile = "";
HostsFileHash = "";

await DebugLog.LogEventAsync("Networking redaction enabled. NICs, routes, hosts file, and network connections were skipped.", region);
}
else
{
NetAdapters = Utils.GetWmi("Win32_NetworkAdapterConfiguration",
"Description, DHCPEnabled, DHCPServer, DNSDomain, DNSDomainSuffixSearchOrder, DNSHostName, "
+ "DNSServerSearchOrder, IPEnabled, IPAddress, IPSubnet, DHCPLeaseObtained, DHCPLeaseExpires, "
+ "DefaultIPGateway, MACAddress, InterfaceIndex");
NetAdapters = Utils.GetWmi("Win32_NetworkAdapterConfiguration",
"Description, DHCPEnabled, DHCPServer, DNSDomain, DNSDomainSuffixSearchOrder, DNSHostName, "
+ "DNSServerSearchOrder, IPEnabled, IPAddress, IPSubnet, DHCPLeaseObtained, DHCPLeaseExpires, "
+ "DefaultIPGateway, MACAddress, InterfaceIndex");

NetAdapters2 = Utils.GetWmi("MSFT_NetAdapter",
"*",
@"root\standardcimv2");
IPRoutes = Utils.GetWmi("Win32_IP4RouteTable",
"Description, Destination, Mask, NextHop, Metric1, InterfaceIndex");
NetAdapters2 = Utils.GetWmi("MSFT_NetAdapter",
"*",
@"root\standardcimv2");
IPRoutes = Utils.GetWmi("Win32_IP4RouteTable",
"Description, Destination, Mask, NextHop, Metric1, InterfaceIndex");

await DebugLog.LogEventAsync("Networking WMI Information Retrieved.", region);
await DebugLog.LogEventAsync("Networking WMI Information Retrieved.", region);

GetAdapterProperties();
CombineAdapterInformation();
}
GetAdapterProperties();
CombineAdapterInformation();

var rssWmi = Utils.GetWmi("MSFT_NetOffloadGlobalSetting", "ReceiveSideScaling", "root\\standardcimv2").FirstOrDefault();
rssWmi.TryWmiRead("ReceiveSideScaling", out byte? rcvSideScaling);
Expand All @@ -60,17 +45,14 @@ public static async Task MakeNetworkData()

AutoTuningLevelLocal = GetAutoTuningLevels();

if (!Settings.RedactNetworking)
{
HostsFile = GetHostsFile();
HostsFileHash = GetHostsFileHash();
await DebugLog.LogEventAsync("Hosts file retrieved.", region);

TCPConnections = GetTCPConnections();
UDPEndpoints = Utils.GetWmi("MSFT_NetUDPEndpoint", "LocalAddress,LocalPort,OwningProcess",
@"root\standardcimv2");
await DebugLog.LogEventAsync("Network Connections Information retrieved.", region);
}
HostsFile = GetHostsFile();
HostsFileHash = GetHostsFileHash();
await DebugLog.LogEventAsync("Hosts file retrieved.", region);

TCPConnections = GetTCPConnections();
UDPEndpoints = Utils.GetWmi("MSFT_NetUDPEndpoint", "LocalAddress,LocalPort,OwningProcess",
@"root\standardcimv2");
await DebugLog.LogEventAsync("Network Connections Information retrieved.", region);

await DebugLog.EndRegion(DebugLog.Region.Networking);
}
Expand Down
236 changes: 0 additions & 236 deletions client/specify_client.csproj.bak

This file was deleted.

Loading
Loading