-
Notifications
You must be signed in to change notification settings - Fork 130
Expand file tree
/
Copy pathtest_altcha.py
More file actions
31 lines (22 loc) · 921 Bytes
/
test_altcha.py
File metadata and controls
31 lines (22 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3
import unittest
try:
from .abstract import AbstractTest
except ImportError:
from abstract import AbstractTest
class AltchaTest(AbstractTest):
def test_all_params(self):
params = {
'pageurl': 'https://mysite.com/page/with/altcha',
'challenge_json': '{"algorithm":"SHA-256","challenge":"a4c9d8e7f1b23a6c...",..."signature":"7b3e2a9d5c8f1046e2d91c3a..."}',
'challenge_url': 'https://example/altcha'
}
sends = {
'method': 'altcha',
'pageurl': 'https://mysite.com/page/with/altcha',
'challenge_json': '{"algorithm":"SHA-256","challenge":"a4c9d8e7f1b23a6c...",..."signature":"7b3e2a9d5c8f1046e2d91c3a..."}',
'challenge_url': 'https://example/altcha'
}
return self.send_return(sends, self.solver.altcha, **params)
if __name__ == '__main__':
unittest.main()