Esempio n. 1
0
 def test_get_url_stem(self):
     """
     Tests that the URL stem method works
     """
     
     stem = 'http://www.acme.com'
     self.assertEqual(get_url_stem(stem + '/foo/bar'), stem)
Esempio n. 2
0
 def test_has_wp_login(self, url):
     """
     By default, Wordpress ships with a login page at /wp-login.php
     """
     
     if self.page_cache[get_url_stem(url) + '/wp-login.php'].contains_pattern('loginform'):
         return 1
     else:
         return 0
Esempio n. 3
0
 def test_has_portals_default(self, url):
     """
     DotNetNuke likes to store CSS and other resources in a Portals/_default folder.
     """
     
     if self.page_cache[get_url_stem(url)].contains_pattern('="/Portals/_default'):
         return 1
     else:
         return 0
Esempio n. 4
0
 def test_has_sharepoint_error_page(self, url):
     """
     SharePoint has a distinct error page under /_layouts/error.aspx.
     """
     
     if self.page_cache[get_url_stem(url)+'/_layouts/error.aspx'].contains_pattern('Troubleshoot issues with Microsoft SharePoint Foundation'):
         return 1
     else:
         return 0
Esempio n. 5
0
    def test_has_umbraco_login(self, url):
        """
        Umbraco sites have a login page under the URL '/umbraco/login.aspx'.

        """
        
        if self.page_cache[get_url_stem(url) + '/umbraco/login.aspx'].contains_pattern('Umbraco'):
            return 1
        else:
            return 0
Esempio n. 6
0
 def test_has_administrator_login(self, url):
     """
     Joomla! sites have a management area under the URL '/adminstrator'.
     
     If you go to this URL, you should see a login page.
     """
     
     if self.page_cache[get_url_stem(url) + '/administrator'].contains_pattern('Joomla'):
         return 1
     else:
         return 0
Esempio n. 7
0
 def test_has_episerver_login(self, url):
     """
     EPiServer sites usually have a login page under the url /util/login.aspx.
     
     The existence of this page yields a high confidence of EPiServer being used.
     """
     
     if self.page_cache[get_url_stem(url) + '/util/login.aspx'].contains_pattern('ctl00_FullRegion_LoginControl_UserName'):
         return 1
     else:
         return 0