Skip to content

Commit c044d34

Browse files
committed
Fix some tests that were not working anymore for some reason
1 parent 6b63b14 commit c044d34

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

tests/tests.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,25 @@ def test_http_basic_auth(self):
7676
def test_http_post_auth(self):
7777
credentials_list = process_pcap("samples/http-post-auth.pcap").get_list_of_all_credentials()
7878
print(credentials_list)
79-
self.assertTrue(Credentials('toto', 'Str0ngP4ssw0rd') in credentials_list)
79+
self.assertTrue(
80+
Credentials(
81+
'toto',
82+
'Str0ngP4ssw0rd',
83+
context={'Method': 'POST', 'URL': 'http://192.168.56.101:1337/login'}
84+
) in credentials_list
85+
)
8086
self.assertTrue(len(credentials_list) == 1)
8187

8288
def test_http_get_auth(self):
8389
credentials_list = process_pcap("samples/http-get-auth.pcap").get_list_of_all_credentials()
8490
print(credentials_list)
85-
self.assertTrue(Credentials('admin', 'qwerty1234') in credentials_list)
91+
self.assertTrue(
92+
Credentials(
93+
'admin',
94+
'qwerty1234',
95+
context={'Method': 'GET', 'URL': 'http://192.168.56.101:1337/login?login=admin&password=qwerty1234'}
96+
) in credentials_list
97+
)
8698
self.assertTrue(len(credentials_list) == 1)
8799

88100
def test_ldap(self):
@@ -180,7 +192,7 @@ def test_ntlmssp(self):
180192
self.assertTrue(len(remaining_credentials) == 6)
181193
self.assertTrue(Credentials(hash="administrator::example:ea46e3a07ea448d200000000000000000000000000000000:"
182194
"4d626ea83a02eee710571a2b84241788bd21e3a66ddbf4a5"
183-
":CHALLENGE_NOT_FOUND") in remaining_credentials)
195+
":CHALLENGE_NOT_FOUND", context={'version': 'NETNTLMv1'}) in remaining_credentials)
184196

185197

186198
class ManagerTest(unittest.TestCase):

0 commit comments

Comments
 (0)