-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
152 lines (135 loc) · 6.05 KB
/
index.php
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
header("X-Frame-Options: DENY");
header("Content-Security-Policy: frame-ancestors 'none'", false);
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name=viewport content="width=device-width, initial-scale=1">
<title>#sCaS</title>
<link rel="stylesheet" href="style.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.min.js"></script>
<script>
var opkey = "";
function set_user(name) {
document.getElementById('uname').value = name;
}
function createCookie(name, value, days) {
var expires;
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toGMTString();
}
else {
expires = "";
}
document.cookie = name + "=" + value + expires + "; path=/";
}
function getCookie(c_name) {
if (document.cookie.length > 0) {
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) {
c_end = document.cookie.length;
}
return unescape(document.cookie.substring(c_start, c_end));
}
}
return "";
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function askagin() {
let inkey = document.getElementById('keebox').value;
opkey = inkey;
$.post("verify_key.php",
{kee: inkey},
function(response){
if (response == 1) {
$("#messages").load("gmsg.php?pawd="+opkey);
if (!document.cookie.includes("cvat")) {
let user = "cvat" + Math.floor(Math.random() * (9999 - 1000) + 1000);
set_user(user);
createCookie("usdn", user, 1)
}
else {
set_user(getCookie("usdn"));
}
$(document).ready(function () {
$('#pbost').on('submit', function(e) {
e.preventDefault();
$.ajax({
url : $(this).attr('action'),
type: "POST",
data: $(this).serialize()
});
document.getElementById('message').value = "";
});
});
var auto_refresh = setInterval(
(function () {
$("#messages").load("gmsg.php?pawd="+opkey);
}), 1000);
document.getElementById('inkuy').value = inkey;
document.getElementById('ffm').hidden = true;
document.getElementById('fff').hidden = true;
document.getElementById('pbost').hidden = false;
}
else {
document.getElementById('loginmsg').style.color = "red";
document.getElementById('loginmsg').innerText = "";
setTimeout(() => { document.getElementById('loginmsg').innerText = "Incorrect Key!"; }, 200);
}
}
);
}
window.onload = function() {
if (window.location != "?#messages") {
window.location = "?#messages"
}
}
</script>
</head>
<body>
<form class="vertical-center" onsubmit="askagin();" id="ffm" style="display:flex; justify-content: center;">
<div id="fff" style="width: 360px; height: 200px; background-color: #1e1f27; float: left; padding: 30px; border-radius: 5px;">
<div class="webflow-style-input">
<input class="" type="password" id="keebox" placeholder="Password" style="text-align: center; font-weight: bolder;"></input>
<button disabled><i class="icon ion-android-lock"></i></button>
</div>
<!--<input type="password" placeholder="Password" style="height: 40px; width: 240px; font-size: 20px;" id="keebox">-->
<br/>
<p id="loginmsg" style="font-size: 16px; font-weight: bolder; text-align: center; color: #858ba1;">Enter the Key </p>
<input type="submit" value="Join!" style="width: 300px; height: 45px; text-align: center; background-color: #272b3b; color: #7881a1;">
</div>
</form>
<div id="messages" style="font-size: 16px;">
</div>
<div style="height: 110px"></div>
<center>
<div id="container">
<div id="footer">
<form action="post.php" id="pbost" method="POST" onsubmit="window.scrollTo(0,document.body.scrollHeight);" hidden>
<input hidden type="text" id="uname" name="name" />
<input hidden type="text" name="inkay" id="inkuy">
<p></p>
<div style="text-align: center;">
<input type="text" id="message" class="msag" name="message" style="border-radius: 5px 0px 0px 5px;" placeholder="Write a message..." autofocus />
<input type="submit" value="Send" style="border-radius: 0px 5px 5px 0px;" />
</div>
<input type="checkbox" name="type" value="nojs" style="display:none" checked/>
<br/><br/>
</form>
</div>
</div>
</center>
</body>
<footer>
</footer>
</html>