Exemplo n.º 1
0
    def test_bad_response(self, warn, exit):

        ldap_brute.common.LDAP_GLOBALS.bad_string = BAD_STRING
        with HTTMock(always_bad):
            ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(ldap_brute.common.LDAP_GLOBALS.total_requests, warn.call_count - 1)
Exemplo n.º 2
0
    def test_bad_response(self, warn, exit):

        ldap_brute.common.LDAP_GLOBALS.bad_string = BAD_STRING
        with HTTMock(always_bad):
            ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(ldap_brute.common.LDAP_GLOBALS.total_requests,
                          warn.call_count - 1)
Exemplo n.º 3
0
    def test_wildcard_multiple(self):
        with HTTMock(wildcard_adm_hckr):
            res = ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(
            ['admin2', 'hacker'], res,
            "Result should contain the two entries hacker and admin2.")
Exemplo n.º 4
0
    def test_wildcard_basic(self):
        with HTTMock(wildcard_admin):
            res = ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(['admin'], res, "Result should contain admin")
Exemplo n.º 5
0
    def test_status_code(self, warn, exit):
        with HTTMock(always_404):
            ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(ldap_brute.common.LDAP_GLOBALS.total_requests, warn.call_count - 1)
Exemplo n.º 6
0
    def test_wildcard_weird(self):
        charset_custom_set("x!w.")
        with HTTMock(wildcard_weird_chars):
            res = ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(["w!."], res, "Should contain the weird result.")
Exemplo n.º 7
0
    def test_wildcard_multiple(self):
        with HTTMock(wildcard_adm_hckr):
            res = ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(['admin2', 'hacker'], res, "Result should contain the two entries hacker and admin2.")
Exemplo n.º 8
0
    def test_wildcard_basic(self):
        with HTTMock(wildcard_admin):
            res = ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(['admin'], res, "Result should contain admin")
Exemplo n.º 9
0
    def test_status_code(self, warn, exit):
        with HTTMock(always_404):
            ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(ldap_brute.common.LDAP_GLOBALS.total_requests,
                          warn.call_count - 1)
Exemplo n.º 10
0
    def test_wildcard_weird(self):
        charset_custom_set("x!w.")
        with HTTMock(wildcard_weird_chars):
            res = ldap_brute.brute(BASE_URL, TRUE_STRING)

        self.assertEquals(["w!."], res, "Should contain the weird result.")