fork download
  1. using System;
  2. using System.Net.NetworkInformation;
  3. using System.Security.Cryptography;
  4.  
  5. public class PersonalComputerSecurityCertification
  6. {
  7. // Perform security check
  8. public static void PerformSecurityCheck()
  9. {
  10. Console.WriteLine("--- Personal Computer Security Certification ---");
  11.  
  12. // Simulate OS check
  13. CheckOperatingSystem();
  14.  
  15. // Simulate network ports check
  16. CheckNetworkPorts();
  17.  
  18. // Perform encryption check
  19. PerformEncryptionCheck();
  20.  
  21. // Simulate privacy settings check
  22. CheckPrivacySettings();
  23. }
  24.  
  25. private static void CheckOperatingSystem()
  26. {
  27. // Simulate OS version check
  28. Console.WriteLine($"OS Version: 10.0.19045");
  29. Console.WriteLine($"OS Caption: Microsoft Windows 10 Pro");
  30. }
  31.  
  32. private static void CheckNetworkPorts()
  33. {
  34. try
  35. {
  36. // Get active TCP connections
  37. IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
  38. var openPorts = properties.GetActiveTcpConnections();
  39.  
  40. Console.WriteLine("Open Network Ports:");
  41. foreach (var port in openPorts)
  42. {
  43. Console.WriteLine($"Local Port: {port.LocalEndPoint.Port}");
  44. }
  45. }
  46. catch (Exception ex)
  47. {
  48. Console.WriteLine($"Error checking network ports: {ex.Message}");
  49. }
  50. }
  51.  
  52. private static void PerformEncryptionCheck()
  53. {
  54. // Perform AES encryption check
  55. using (Aes myAes = Aes.Create())
  56. {
  57. Console.WriteLine($"Encryption Key Size: {myAes.KeySize} bits");
  58. Console.WriteLine($"Encryption Mode: {myAes.Mode}");
  59. }
  60. }
  61.  
  62. private static void CheckPrivacySettings()
  63. {
  64. // Simulate basic privacy settings check
  65. Console.WriteLine("Checking Privacy Settings...");
  66. Console.WriteLine("Note: Full privacy settings check requires system-specific implementation");
  67. }
  68.  
  69. public static void Main()
  70. {
  71. PerformSecurityCheck();
  72. }
  73. }
Success #stdin #stdout 0.06s 30928KB
stdin
Standard input is empty
stdout
--- Personal Computer Security Certification ---
OS Version: 10.0.19045
OS Caption: Microsoft Windows 10 Pro
Open Network Ports:
Encryption Key Size: 256 bits
Encryption Mode: CBC
Checking Privacy Settings...
Note: Full privacy settings check requires system-specific implementation