-
-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathbot_detection_tests.py
75 lines (59 loc) · 2.36 KB
/
bot_detection_tests.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from botasaurus.browser import browser, Driver
def test_browserscan_bot_detection(driver: Driver):
"""
Tests against BrowserScan's bot detection system.
Visits BrowserScan's bot detection demo page.
"""
print("Running BrowserScan Bot Detection test...")
driver.get("https://www.browserscan.net/bot-detection")
driver.sleep(3)
print("✅ BrowserScan Bot Detection test completed")
def test_fingerprint_bot_detection(driver: Driver):
"""
Tests against Fingerprint's bot detection system.
Visits Fingerprint's bot detection product page.
"""
print("Running Fingerprint Bot Detection test...")
driver.get("https://fingerprint.com/products/bot-detection/")
driver.sleep(4)
print("✅ Fingerprint Bot Detection test completed")
def test_datadome_bot_detection(driver: Driver):
"""
Tests against Datadome's bot detection system.
Visits a demo page protected by Datadome.
"""
print("Running Datadome Bot Detection test...")
driver.get("https://antoinevastel.com/bots/datadome")
driver.sleep(3)
print("✅ Datadome Bot Detection test completed")
def test_cloudflare_turnstile(driver: Driver):
"""
Tests bypassing Cloudflare Turnstile CAPTCHA.
Visits a demo page with Cloudflare Turnstile implementation.
"""
print("Running Cloudflare Turnstile test...")
driver.get("https://turnstile.zeroclover.io/", bypass_cloudflare=True)
driver.sleep(3)
print("✅ Cloudflare Turnstile test completed")
def test_cloudflare_waf(driver: Driver):
"""
Tests bypassing Cloudflare Web Application Firewall (WAF).
Visits a demo page protected by Cloudflare WAF.
"""
print("Running Cloudflare WAF test...")
driver.get("https://nopecha.com/demo/cloudflare", bypass_cloudflare=True)
driver.sleep(3)
print("✅ Cloudflare WAF test completed")
@browser()
def run_bot_tests(driver: Driver, _):
"""
Main function to run all bot detection tests.
Executes various tests to check bypass capabilities against different security systems.
"""
test_cloudflare_waf(driver)
test_browserscan_bot_detection(driver)
test_fingerprint_bot_detection(driver)
test_datadome_bot_detection(driver)
test_cloudflare_turnstile(driver)
if __name__ == "__main__":
run_bot_tests()