Ejemplo n.º 1
0
 public static string GetCloakCheckInfo(Uri uriRequested)
 {
     string applicationPath = WebHelper.WebAppRootPath;
     var siteCheckerReport = new SiteCheckerReport();
     var criteria = new List<SiteCheckerReport.SiteCheckerCriterion>
                        {
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion =
                                        string.Concat(applicationPath, "images/google_logo_small.jpg"),
                                    Description = "<ResultSuccess>No issues found</ResultSuccess>"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion =
                                        string.Concat(applicationPath, "images/livesearch-logo.jpg"),
                                    Description = "<ResultSuccess>No issues found</ResultSuccess>"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = string.Concat(applicationPath, "images/Yahoo-logo.jpg"),
                                    Description = "<ResultError>1 error found</ResultError>"
                                }
                        };
     siteCheckerReport.Criteria = criteria;
     return SerializeHelper.GetJsonResult<SiteCheckerReport>(siteCheckerReport, pageInformationToolSerializedtype);
 }
Ejemplo n.º 2
0
 public static string GetHeaderInfo(Uri uriRequested)
 {
     var siteCheckerReport = new SiteCheckerReport();
     var criteria = new List<SiteCheckerReport.SiteCheckerCriterion>
                        {
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "Status",
                                    Description = "200 - OK"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "Headers",
                                    Description =
                                        "Date: Fri, 30 May 2008 20:16:06 GMT\nServer: Apache/1.3.39 (Unix) PHP/5.2.5 mod_throttle/3.1.2 mod_psoft_traffic/0.2 mod_ssl/2.8.29\nContent-Type: text/html: charset=iso-8859-1\nClient-Transfer-Encoding: chunked\nP3P: CP='ALL DSP COR CUR ADMo CONo PUBI BUS UNI"
                                }
                        };
     siteCheckerReport.Criteria = criteria;
     return SerializeHelper.GetJsonResult<SiteCheckerReport>(siteCheckerReport, pageInformationToolSerializedtype);
 }
Ejemplo n.º 3
0
 public static string GetSiteInfo(Uri uriRequested)
 {
     var siteCheckerReport = new SiteCheckerReport();
     var criteria = new List<SiteCheckerReport.SiteCheckerCriterion>
                        {
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "Original URL",
                                    Description = "http://www.bruceclay.com"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "Domain",
                                    Description = "bruceclay.com"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "File",
                                    Description = "/"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "DNS IP",
                                    Description =
                                        "<strong>Address:</strong> 65.124.219.55 /<strong>Sites Hosted:</strong>5"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "Ping",
                                    Description = "Successful (Average Ping Time: <strong>129ms</strong>)"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "Robots",
                                    Description =
                                        "User-Agent: *\nDisallow: /cgi-bin/\nDisallow: /LinkMaps/\nDisallow: /dsm/\nDisallow: /whitepapers/*.pdf\nDisallow: /whitepapers/.htm\nSitemap: http://www.bruceclay.com/bruceclaycom.sitemap.xml"
                                },
                            new SiteCheckerReport.SiteCheckerCriterion
                                {
                                    CheckedCriterion = "IP Blocklist",
                                    Description = "<ResultSuccess>No issues found</ResultSuccess>"
                                }
                        };
     siteCheckerReport.Criteria = criteria;
     return SerializeHelper.GetJsonResult<SiteCheckerReport>(siteCheckerReport, pageInformationToolSerializedtype);
 }