-
Notifications
You must be signed in to change notification settings - Fork 1
/
host.html
126 lines (93 loc) Β· 2.63 KB
/
host.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
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta charset="UTF-8">
<style>
</style>
</head>
<body >
<div class="preload">
<div class="emoji" style="text-align:center; font-size: 50px;">π</div>
</div>
<p id="msg" style="text-align:center;"></p>
<script>
var url = parseURLParams(window.location.href)['url'][0]
renderUsers("https://broodier-aim.000webhostapp.com/hostinjection/index.php?url="+url);
function parseURLParams(url) {
var queryStart = url.indexOf("?") + 1,
queryEnd = url.indexOf("#") + 1 || url.length + 1,
query = url.slice(queryStart, queryEnd - 1),
pairs = query.replace(/\+/g, " ").split("&"),
parms = {}, i, n, v, nv;
if (query === url || query === "") return;
for (i = 0; i < pairs.length; i++) {
nv = pairs[i].split("=", 2);
n = decodeURIComponent(nv[0]);
v = decodeURIComponent(nv[1]);
if (!parms.hasOwnProperty(n)) parms[n] = [];
parms[n].push(nv.length === 2 ? v : null);
}
return parms;
}
const loader = document.querySelector(".preload");
const emoji = loader.querySelector(".emoji");
const emojis = [
"π",
"π",
"π",
"π",
"π",
"π",
"π",
"π",
"π",
"π ",
"π",
"π‘",
"π",
"π’",
"π",
"π£",
"π",
"π€",
"π",
"π₯",
"π",
"π¦",
"π",
"π§",
];
const interval = 125;
const loadEmojis = (arr) => {
setInterval(() => {
emoji.innerText = arr[Math.floor(Math.random() * arr.length)];
//console.log(Math.floor(Math.random() * arr.length))
}, interval);
};
const init = () => {
loadEmojis(emojis);
};
init();
async function getUsers(url) {
try {
let res = await fetch(url);
return await res.json();
} catch (error) {
console.log(error);
}
}
async function renderUsers(url) {
let users = await getUsers(url);
data = '{"Status": "'+users.status+'", "Msg": "'+users.status_message+'"}';
if(JSON.parse(data).Status==200){
document.getElementById("msg").innerHTML = "<h3 style='color:red'> Status: "+JSON.parse(data).Status+" "+JSON.parse(data).Msg+"</h3></br>";
}else{
document.getElementById("msg").innerHTML = "<h3 style='color:green'> Status: "+JSON.parse(data).Status+" "+JSON.parse(data).Msg+"</h3>";
}
document.querySelector(".preload").style.display = "none";
}
</script>
</body>
</html>