-
Notifications
You must be signed in to change notification settings - Fork 2
/
html_temp.py
54 lines (54 loc) · 1.64 KB
/
html_temp.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
CHALLENGE_HTML = """
<!DOCTYPE html>
<html lang="zh" class="h-full w-full">
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
body {{
color: #495057;
background-color: #f5f5f5;
}}
</style>
</head>
<body class="h-full w-full">
<div class="container mx-auto h-full w-full">
<div class="flex flex-col h-full w-full">
<div class="m-auto w-full max-w-xl">
<div class="rounded-t-lg bg-white ring-0 ring-black ring-opacity-20 m-auto text-6xl
submit m-4 transition duration-500 ease-in-out transform hover:-translate-y-1 hover:scale-105 ">
<button class="w-full p-4 2" id="submit">点击开始验证</button>
</div>
</div>
</div>
</div>
</body>
<script src="./gt.js"></script>
<script>
window.initGeetest(
{{
gt: "{0}",
challenge: "{1}",
new_captcha: true,
offline: false,
product: "bind",
https: true,
}},
(captcha) => {{
captcha.appendTo("submit");
captcha.onSuccess(() => {{
document.getElementById("submit").innerHTML = "验证成功,页面跳转中...";
window.location.href = "https://t.me/{2}?start=challenge_" + captcha.getValidate().geetest_validate;
}});
captcha.onError(function (error) {{
document.getElementById("submit").innerHTML = "发生错误:" + error.msg;
}});
document.getElementById("submit").onclick = () => {{
return captcha.verify();
}};
}}
)
</script>
</html>
"""