コード例 #1
0
        static bool QueryPortRegistered(IProcessManagerSync pm, string value)
        {
            var output = pm.LaunchAndGrabToolCmd(new ProcessStartInfo("netsh", "http show urlacl"), "netsh");

            return(output.StandardOutput.Contains(value) ||
                   output.StandardError.Contains(value));
        }
コード例 #2
0
 public ServerInfo(IProcessManagerSync pm, IPEndPoint http, IPEndPoint https) {
     IsHttpPortRegistered = (http != null) && QueryPortRegistered(pm, http.ToHttp());
     IsHttpsPortRegistered = (https != null) && QueryPortRegistered(pm, https.ToHttps());
     IsCertRegistered = QueryCertRegistered(pm, https);
     MainLog.Logger.Info(
         $"HttpRegistered: {IsHttpPortRegistered} ({http}), HttpsRegistered: {IsHttpsPortRegistered} ({https}), CertRegistered: {IsCertRegistered}");
 }
コード例 #3
0
        static bool QueryCertRegistered(IProcessManagerSync pm, IPEndPoint value, string thumbprint)
        {
            var output = pm.LaunchAndGrabToolCmd(new ProcessStartInfo("netsh", "http show sslcert"), "netsh");
            var epStr  = value.ToString();

            return(ContainsCert(output.StandardOutput, thumbprint, epStr) ||
                   ContainsCert(output.StandardError, thumbprint, epStr));
        }
コード例 #4
0
 public PortsInfo(IProcessManagerSync pm, IPEndPoint http, IPEndPoint https, string thumbprint)
 {
     //IsHttpPortRegistered = (http != null) && QueryPortRegistered(pm, http.ToHttp());
     //IsHttpsPortRegistered = (https != null) && QueryPortRegistered(pm, https.ToHttps());
     IsCertRegistered = QueryCertRegistered(pm, https, thumbprint);
     MainLog.Logger.Info(
         $"HttpRegistered: {IsHttpPortRegistered} ({http}), HttpsRegistered: {IsHttpsPortRegistered} ({https}), CertRegistered: {IsCertRegistered}");
 }
コード例 #5
0
 public ServerInfo(IProcessManagerSync pm, IPEndPoint http, IPEndPoint https)
 {
     IsHttpPortRegistered  = (http != null) && QueryPortRegistered(pm, http.ToHttp());
     IsHttpsPortRegistered = (https != null) && QueryPortRegistered(pm, https.ToHttps());
     IsCertRegistered      = QueryCertRegistered(pm, https);
     MainLog.Logger.Info(
         $"HttpRegistered: {IsHttpPortRegistered} ({http}), HttpsRegistered: {IsHttpsPortRegistered} ({https}), CertRegistered: {IsCertRegistered}");
 }
コード例 #6
0
ファイル: Entrypoint.cs プロジェクト: MaHuJa/withSIX.Desktop
 static void InstallVcRedist(IProcessManagerSync pm, string exe) {
     pm.Launch(new BasicLaunchInfo(new ProcessStartInfo(
         Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), exe),
         "/q /norestart")));
 }
コード例 #7
0
 static bool QueryCertRegistered(IProcessManagerSync pm, IPEndPoint value) {
     var output = pm.LaunchAndGrabToolCmd(new ProcessStartInfo("netsh", "http show sslcert"), "netsh");
     var epStr = value.ToString();
     return output.StandardOutput.Contains(epStr)
            || output.StandardError.Contains(epStr);
 }
コード例 #8
0
 static bool QueryPortRegistered(IProcessManagerSync pm, string value) {
     var output = pm.LaunchAndGrabToolCmd(new ProcessStartInfo("netsh", "http show urlacl"), "netsh");
     return output.StandardOutput.Contains(value)
            || output.StandardError.Contains(value);
 }
コード例 #9
0
ファイル: Initializer.cs プロジェクト: MaHuJa/withSIX.Desktop
 public ServerInfo(IProcessManagerSync pm) {
     isHttpRegistered = IsHttpRegistered(pm, "http://" + valueHttp);
     isHttpsRegistered = IsHttpRegistered(pm, "https://" + value);
     isCertRegistered = IsCertRegistered(pm, value);
     MainLog.Logger.Write(
         "HttpRegistered: " + isHttpRegistered + ", HttpsRegistered: " + isHttpsRegistered + ", CertRegistered: " +
         isCertRegistered, LogLevel.Info);
 }
コード例 #10
0
 public PortsInfo(IProcessManagerSync pm, IPEndPoint http, IPEndPoint https, string thumbprint) {
     //IsHttpPortRegistered = (http != null) && QueryPortRegistered(pm, http.ToHttp());
     //IsHttpsPortRegistered = (https != null) && QueryPortRegistered(pm, https.ToHttps());
     IsCertRegistered = QueryCertRegistered(pm, https, thumbprint);
     MainLog.Logger.Info(
         $"HttpRegistered: {IsHttpPortRegistered} ({http}), HttpsRegistered: {IsHttpsPortRegistered} ({https}), CertRegistered: {IsCertRegistered}");
 }