-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
58 lines (50 loc) · 2.86 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy" content="default-src * data: 'unsafe-eval' 'unsafe-inline' blob:; script-src blob: 'self' 'unsafe-eval' 'unsafe-inline' https://static.cloudflareinsights.com https://cloudflareinsights.com;" />
<title>rebrowser-bot-detector</title>
<meta name="description" content="Set of modern tests for browser automation. Check your Puppeteer and Playwright for leaks and detections." />
<script src="index.js?2"></script>
<link rel="stylesheet" href="index.css?2" />
</head>
<body>
<h1>🕵️ rebrowser-bot-detector </h1>
<div class="text-secondary">Modern tests to detect automated browser behavior. See <a href="https://github.com/rebrowser/rebrowser-bot-detector" target="_blank">github repo</a> for more details. <span onclick="toggleHowTo();" class="text-secondary dashed cursor-pointer">How to properly run the tests?</span></div>
<div id="how-to-run-test" class="d-none">
<p>These tests are designed for Chromium based browsers only.</p>
<p>To properly trigger all the tests you need to add the code below to your automation script and open this page again.</p>
<pre class="codeblock">
/* puppeteer & playwright */
// dummyFn - must be called in the main context
await page.evaluate(() => window.dummyFn())
// exposeFunctionLeak
await page.exposeFunction('exposedFn', () => { console.log('exposedFn call') })
// sourceUrlLeak
await page.evaluate(() => document.getElementById('detections-json'))
// mainWorldExecution - must be called in an isolated context
/* puppeteer */
await page.mainFrame().isolatedRealm().evaluate(() => document.getElementsByClassName('div'))
/*
playwright - there is no way to explicitly evaluate script in an isolated context
follow rebrowser-patches on github for the fix
*/
await page.evaluate(() => document.getElementsByClassName('div'))
</pre>
</div>
<table id="detections-table">
<thead>
<tr>
<th>Test name</th>
<th>Time since load</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<h3>JSON</h3>
<textarea id="detections-json"></textarea>
<footer>Sponsored by <a href="https://rebrowser.net">rebrowser.net</a> — the ultimate stealth browser and scraping solution fueled by AI.</footer>
</body>
</html>