-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·75 lines (75 loc) · 2.87 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Imagetyperz API example - javascript client version</title>
<style>
textarea{
width: 100%;
}
button{
width: 100%;
height: 60px;
font-size: 20px;
}
select, input {
width: 100%;
}
</style>
<script>
// log what's happening to UI and console
function log(txt) {
document.getElementById('log').value += txt + '\n';
console.log(txt);
}
// run captcha type example based on input selection
function run () {
const cType = document.getElementById('captcha-type').value
if (cType === 'image') image()
else if (cType === 'recaptcha') recaptcha()
else if (cType === 'hcaptcha') hcaptcha()
else if (cType === 'geetest') geetest()
else if (cType === 'geetestv4') geetestv4()
else if (cType === 'capy') capy()
else if (cType === 'tiktok') tiktok()
else if (cType === 'funcaptcha') funcaptcha()
else if (cType === 'turnstile') turnstile()
else if (cType === 'task') task()
else log(`Unknown captcha type: ${cType}`)
}
</script>
</head>
<body>
<!-- Element for logging data -->
<textarea id='log' rows=10 autofocus></textarea>
<input type="text" id="token" placeholder="Access token from https://imagetyperz.com" value=""/>
<select id="captcha-type">
<option value="image">image (examples/image.js)</option>
<option value="recaptcha">reCAPTCHA (examples/recaptcha.js)</option>
<option value="hcaptcha">hCaptcha (examples/hcaptcha.js)</option>
<option value="geetest">Geetest (examples/geetest.js)</option>
<option value="geetestv4">GeetestV4 (examples/geetestV4.js)</option>
<option value="capy">Capy (examples/capy.js)</option>
<option value="tiktok">Tiktok (examples/tiktok.js)</option>
<option value="funcaptcha">FunCaptcha (examples/funcaptcha.js)</option>
<option value="turnstile">Turnstile (Cloudflare) (examples/turnstile.js)</option>
<option value="task">Task (examples/task.js)</option>
</select>
<button onclick="run()">Run example</button>
<!-- Load jQuery (dependency) -->
<script src="../vendor/jquery.js"></script>
<!-- Load the library -->
<script src="../lib/imagetyperz-api-client.js"></script>
<!-- Examples (for each captcha type) -->
<script src="image.js"></script>
<script src="recaptcha.js"></script>
<script src="geetest.js"></script>
<script src="geetestV4.js"></script>
<script src="capy.js"></script>
<script src="hcaptcha.js"></script>
<script src="tiktok.js"></script>
<script src="funcaptcha.js"></script>
<script src="turnstile.js"></script>
<script src="task.js"></script>
</body>
</html>