예제 #1
0
파일: http_basic.py 프로젝트: sgnls/yawast
def get_server_banner_issues(server: str, raw: str, url: str,
                             headers: Dict) -> List[Result]:
    results: List[Result] = []

    results += apache_httpd.check_banner(server, raw, url)
    results += nginx.check_banner(server, raw, url)
    results += iis.check_version(server, raw, url, headers)
    results += python.check_banner(server, raw, url)

    return results
예제 #2
0
    def test_nginx_check_banner_outdated(self):
        res = nginx.check_banner("nginx/1.0.0", "head_data", "http://example.com")

        self.assertTrue(any("Nginx Outdated" in r.message for r in res))
예제 #3
0
    def test_nginx_check_banner_gen(self):
        res = nginx.check_banner("nginx", "head_data", "http://example.com")

        self.assertTrue(
            any("Generic Nginx Server Banner Found" in r.message for r in res)
        )