Ejemplo n.º 1
0
 public void WriteReport(Server server, FormatterManager formatterManager)
 {
     formatterManager.InitializeSection(".NET");
     foreach (var site in server.Sites)
     {
         foreach (var directory in site.VirtualDirectories)
         {
             formatterManager.InitializeRecord();
             formatterManager.WriteValue("Site Name", site.Name);
             formatterManager.WriteValue("Path", directory.Path);
             formatterManager.WriteValue("Site Name", site.Name);
             formatterManager.WriteValue("Path", directory.Path);
             formatterManager.WriteValue("Physical Path", directory.PhysicalPath);
             formatterManager.WriteValue("Authentication Mode", directory.AuthenticationMode);
             formatterManager.WriteValue("Target .NET Framework", directory.TargetDotNetFramework);
             formatterManager.WriteValue("Debug Enabled", directory.DebugEnabled.ToString());
             formatterManager.WriteValue("Reveals Stock Error Pages", directory.RevealsStockErrorPages.ToString());
             formatterManager.WriteValue("Reveals Error Urls", directory.RevealsErrorUrls.ToString());
             formatterManager.WriteValue("Reveals ASP.NET Version Header", directory.RevealsAspNetVersionHeader.ToString());
             formatterManager.WriteValue("Request Validation Disabled", directory.RequestValidationDisabled.ToString());
             formatterManager.WriteValue("JavaScript Can Access Cookies", directory.JavaScriptCanAccessCookies.ToString());
             formatterManager.WriteValue("Insecure Cookies Allowed", directory.InsecureCookiesAllowed.ToString());
             formatterManager.WriteValue("Cookieless Sessions Allowed", directory.CookielessSessionsAllowed.ToString());
             formatterManager.WriteValue("Trace Publicly Enabled", directory.TracePubliclyEnabled.ToString());
         }
     }
 }
Ejemplo n.º 2
0
 public void WriteReport(Server server, FormatterManager formatterManager)
 {
     formatterManager.InitializeSection("Summary");
     formatterManager.InitializeRecord();
     formatterManager.WriteValue("Server Name", server.Name);
     formatterManager.WriteValue("# of App Pools", server.AppPools.Count.ToString());
     formatterManager.WriteValue("# of Sites", server.Sites.Count.ToString());
     formatterManager.WriteValue("# of Bindings with HTTPS", server.Sites.Select(site => site.Bindings.Count(binding => binding.Protocol.ToLower() == "https")).Sum().ToString());
 }
Ejemplo n.º 3
0
        public void WriteReport(Server server, FormatterManager formatterManager)
        {
            formatterManager.InitializeSection("Sites");
            foreach (var site in server.Sites)
            {
                formatterManager.InitializeRecord();
                formatterManager.WriteValue("Name", site.Name);
                formatterManager.WriteValue("Current State", site.CurrentState);
                formatterManager.WriteValue("Auto Start", site.AutoStart.ToString());
                formatterManager.WriteValue("# of Bindings", site.Bindings.Count.ToString());
                formatterManager.WriteValue("# of Virtual Directories", site.VirtualDirectories.Count.ToString());
            }

            formatterManager.InitializeSection("Bindings");
            foreach (var site in server.Sites)
            {
                foreach (var binding in site.Bindings)
                {
                    formatterManager.InitializeRecord();
                    formatterManager.WriteValue("Site Name", site.Name);
                    formatterManager.WriteValue("Protocol", binding.Protocol);
                    formatterManager.WriteValue("IP Address", binding.IpAddress);
                    formatterManager.WriteValue("Port", binding.Port);
                    formatterManager.WriteValue("Host Name", binding.HostName);
                    formatterManager.WriteValue("Certificate Name", binding.CertificateName);
                }
            }

            formatterManager.InitializeSection("Virtual Directories");
            foreach (var site in server.Sites)
            {
                foreach (var directory in site.VirtualDirectories)
                {
                    formatterManager.InitializeRecord();
                    formatterManager.WriteValue("Site Name", site.Name);
                    formatterManager.WriteValue("Path", directory.Path);
                    formatterManager.WriteValue("Physical Path", directory.PhysicalPath);
                    formatterManager.WriteValue("Application Pool", directory.AppPool);
                    formatterManager.WriteValue("Application Path", directory.AppPath);
                }
            }
        }
Ejemplo n.º 4
0
 public void WriteReport(Server server, FormatterManager formatterManager)
 {
     formatterManager.InitializeSection("Application Pools");
     foreach (var appPool in server.AppPools)
     {
         formatterManager.InitializeRecord();
         formatterManager.WriteValue("Name", appPool.Name);
         formatterManager.WriteValue("Current State", appPool.CurrentState);
         formatterManager.WriteValue("Runtime Version", appPool.RuntimeVersion);
         formatterManager.WriteValue("Pipeline Mode", appPool.PipelineMode);
         formatterManager.WriteValue("Auto Start", appPool.AutoStart.ToString());
         formatterManager.WriteValue("Username", appPool.UserName);
         formatterManager.WriteValue("Identity Type", appPool.IdentityType);
     }
 }
Ejemplo n.º 5
0
 public void WriteReport(Server server, FormatterManager formatterManager)
 {
     formatterManager.InitializeSection("Databases");
     foreach (var site in server.Sites)
     {
         foreach (var directory in site.VirtualDirectories)
         {
             foreach (var database in directory.Databases)
             {
                 formatterManager.InitializeRecord();
                 formatterManager.WriteValue("Site Name", site.Name);
                 formatterManager.WriteValue("Path", directory.Path);
                 formatterManager.WriteValue("Connection Name", database.ConnectionName);
                 formatterManager.WriteValue("Provider", database.Provider);
                 formatterManager.WriteValue("Connection String", database.ConnectionString);
             }
         }
     }
 }
Ejemplo n.º 6
0
 public void WriteReport(Server server, FormatterManager formatterManager)
 {
     formatterManager.InitializeSection("JavaScript");
     foreach (var site in server.Sites)
     {
         foreach (var directory in site.VirtualDirectories)
         {
             formatterManager.InitializeRecord();
             formatterManager.WriteValue("Site Name", site.Name);
             formatterManager.WriteValue("Path", directory.Path);
             formatterManager.WriteValue("May Use Angular.js 1.x", directory.FoundAngular1.ToString());
             formatterManager.WriteValue("May Use React.js", directory.FoundReact.ToString());
             formatterManager.WriteValue("May Use Backbone.js", directory.FoundBackbone.ToString());
             formatterManager.WriteValue("May Use Ember.js", directory.FoundEmber.ToString());
             formatterManager.WriteValue("May Use Knockout.js", directory.FoundKnockout.ToString());
             formatterManager.WriteValue("May Use jQuery", directory.FoundjQuery.ToString());
             formatterManager.WriteValue("May Use Underscore/Lodash", directory.FoundUnderscoreOrLodash.ToString());
             formatterManager.WriteValue("May Use Bootstrap CSS", directory.FoundBootstrap.ToString());
         }
     }
 }