-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.js
More file actions
278 lines (245 loc) · 9.96 KB
/
default.js
File metadata and controls
278 lines (245 loc) · 9.96 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
const homeButton = document.querySelector('.home-button');
homeButton.addEventListener('mouseenter', function () {
this.textContent = 'Home';
});
homeButton.addEventListener('mouseleave', function () {
this.textContent = '🏠';
});
const aboutButton = document.querySelector('.about-button');
aboutButton.addEventListener('mouseenter', function () {
this.textContent = 'About';
});
aboutButton.addEventListener('mouseleave', function () {
this.textContent = '❔';
});
function encodeString(str, key) {
let encoded = '';
for (let i = 0; i < str.length; i++) {
let charCode = str.charCodeAt(i);
let keyChar = btoa(key).charCodeAt(i % key.length);
keyChar = keyChar % 256;
charCode = charCode ^ keyChar;
encoded += String.fromCharCode(charCode);
}
return (btoa(btoa(encoded)))
}
function decodeString(encodedStr, key) {
let decoded = '';
encodedStr = atob(atob(encodedStr))
for (let i = 0; i < encodedStr.length; i++) {
let charCode = encodedStr.charCodeAt(i)
let keyChar = btoa(key).charCodeAt(i % key.length);
keyChar = keyChar % 256;
charCode = charCode ^ keyChar;
decoded += String.fromCharCode(charCode);
}
return decoded;
}
function discordBypass(a, b, c) {
if ((a.toLowerCase()).includes('http') && (b.toLowerCase()).includes('http')) {
if (c == '') {
showPopup('success', 'Copied to Clipboard!')
return `[httрs︎︎️:︎︎️//${(((a.replace('https://', '')).replace('http://', ''))).replaceAll('.', '.')}]( ${b} )`
} else {
showPopup('success', 'Copied to Clipboard!')
return `[httрs︎︎️:︎︎️//${(((a.replace('https://', '')).replace('http://', ''))).replaceAll('.', '.')}]( <${b}> )[️]( ${c} )`
}
} else {
showPopup('error', 'Text fields must contain URL.')
}
}
function getSearchParams() {
let searchParams = new URLSearchParams(window.location.search);
let paramsObject = {};
for (let [key, value] of searchParams.entries()) {
paramsObject[key] = value;
}
return paramsObject;
}
function textBypass(str) {
if (a !== '') {
let v1bypass = {
"A": "ΑА",
"B": "ΒВ",
"E": "ΕЕ",
"H": "ΗН",
"J": "Ј",
"K": "Ⲕ",
"M": "ΜМ",
"N": "Ν",
"P": "ΡР",
"S": "Ѕ",
"X": "ΧХ",
"Y": "Υ",
"Z": "Ζ",
"a": "а",
"c": "с",
"d": "ԁ",
"e": "е",
"p": "р",
"q": "ԛ",
"v": "ν",
"x": "х",
"y": "у",
" ": " "
}
let invischaracters = [
'️',
'',
'',
'',
'',
'︎',
'',
]
let tempstr = ''
for (let char of str) {
if (char in v1bypass && (Math.round(Math.random() * 1) == 0)) {
tempstr = tempstr + (v1bypass[char])[Math.floor(Math.random() * v1bypass[char].length)]
} else {
tempstr = tempstr + char
}
for (i=0;i<(Math.round(Math.random() * 3));i++) {
if (Math.round(Math.random() * 1.5) == 1) {
tempstr = tempstr + invischaracters[Math.floor(Math.random() * invischaracters.length)]
}
}
}
showPopup('success', 'Copied to Clipboard!')
return tempstr
} else {
showPopup('error', 'Must include text.')
}
}
function formRedirectLink(redirectURL,customJS,displayURL) {
let tempObj = {};
if (redirectURL.includes('://')) {
let linkTime = Date.now()
tempObj.url = redirectURL;
tempObj.js = customJS;
if (displayURL !== '' && displayURL.toLowerCase().includes('http')) {tempObj.dsp = displayURL} else {
if (displayURL !== '') {
showPopup('error','Display Site URL must be valid.')
}
tempObj.dsp = displayURL
};
showPopup('success','Copied to clipboard!')
return ('https://shall0e.github.io/main?r='+encodeString(JSON.stringify(tempObj),btoa(linkTime))+'&d='+btoa(linkTime))
} else {
showPopup('error','Main URL must be valid.')
}
}
function formVerifyLink(appname,picture,redirect) {
if (redirect.includes('://') && picture.includes('://')) {
if (appname !== '') {
let linkTime = Date.now()
let id = {
appname: appname,
picture: picture,
redirect: redirect
}
showPopup('success','Copied to clipboard!')
encodeString(JSON.stringify(id),btoa(linkTime))
return ('https://shall0e.github.io/verification?id='+encodeString(JSON.stringify(id),btoa(linkTime))+'&d='+btoa(linkTime))
} else {
showPopup('error','Text field must not be empty.')
}
} else {
showPopup('error', 'URLs must be valid.')
}
}
// core
function checkSystem() {
let system = [
'49dd2b753b40409528fc6fa8c465a20d',
'c26c78c2bfad47ac46829a9bf6e584ce'
]
if (window.location.hostname !== '127.0.0.1' && window.location.hostname !== 'shall0e.github.io'){
window.location.href = "https://shall0e.github.io/";
}
}
function showPopup(type, message) {
var popup = document.createElement('div');
popup.classList.add('popup', type);
popup.textContent = message;
document.body.appendChild(popup);
setTimeout(function () {
popup.style.opacity = '1';
popup.style.display = 'block';
setTimeout(function () {
popup.style.opacity = '0';
setTimeout(function () {
popup.parentNode.removeChild(popup);
}, 1000); // fade out duration
}, 3000); // display duration
}, 100); // fade in delay
}
//auth user
let fingerprint;
let userdata;
let storageQuota
let identifyJS={};
document.addEventListener("DOMContentLoaded", async function() {
storageQuota = (await navigator.storage.estimate()).quota
// identify.js, April 2nd 2024, @shall0e
// fallback
identifyJS.gatherCharCode=(function(o){let t={};for(let r in o)if(o.hasOwnProperty(r)){let n=o[r];"string"==typeof n?t[r]=Array.from(n).map(o=>o.charCodeAt(0)).join(""):"number"==typeof n?t[r]=n.toString().split("").map(o=>o.charCodeAt(0)).join(""):t[r]=n}return t});
identifyJS.getGPUInfo=(function(){var e,t=document.createElement("canvas");try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(e){return null}if(!e)return null;var r=e.getExtension("WEBGL_debug_renderer_info");return r?{vendor:e.getParameter(r.UNMASKED_VENDOR_WEBGL),renderer:e.getParameter(r.UNMASKED_RENDERER_WEBGL)}:null});
identifyJS.compressObj=(function(n){let t="";for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];null!==r&&void 0!==r&&(t+=r.toString())}return t});
identifyJS.hash=(async function(input){return (Array.from(new Uint8Array(await crypto.subtle.digest('SHA-256',(new TextEncoder()).encode(input)))).map(byte=>byte.toString(16).padStart(2,'0')).join('')).substring(0,256)});
identifyJS.gatherDeviceInfo=(function(){
let deviceInfo={
platform: navigator.platform,
deviceMemory: navigator.deviceMemory,
GPU: navigator.gpu.wgslLanguageFeatures.size,
maxTouchPoints: navigator.maxTouchPoints,
browserLanguage: navigator.language,
CPUCores: navigator.hardwareConcurrency,
GPUrenderer: identifyJS.getGPUInfo().renderer,
GPUvendor: identifyJS.getGPUInfo().vendor,
userAgent: navigator.userAgent
};
return deviceInfo;
});
identifyJS.getFingerprint = async function(){
return (identifyJS.hash(identifyJS.compressObj(identifyJS.gatherCharCode(identifyJS.gatherDeviceInfo()))));
};
// https://github.com/Shall0e/identifyDOTjs
function packUserdata(usersys) {
localStorage.setItem('userdata',encodeString(JSON.stringify(usersys),storageQuota));
}
fingerprint = await identifyJS.getFingerprint();
if (!localStorage.getItem('userdata')) {
userdata = {
'auth': fingerprint,
'date': Date.now(),
'token': 20
}
showPopup('default', 'Authenticated as '+fingerprint.substring(0,32));
packUserdata(userdata)
}
if(fingerprint == '232b561ed60fe346c0effc84d94044bf'){
showPopup('success','You have been granted 999999 tokens.');
userdata = {
'auth': fingerprint,
'date': Date.now(),
'token': 999999
}
packUserdata(userdata);
console.log(userdata);
userdata = null;
}
});
setInterval(async function(){
if (localStorage.getItem('userdata')) {
userdata = JSON.parse(decodeString(localStorage.getItem('userdata'),storageQuota))
userdata.auth = fingerprint
userdata.date = Date.now()
localStorage.setItem('userdata',encodeString(JSON.stringify(userdata),storageQuota));
} else {
localStorage.setItem('userdata',encodeString(JSON.stringify(userdata),storageQuota));
}
if (fingerprint !== (await identifyJS.getFingerprint())) {
fingerprint = (await identifyJS.getFingerprint());
}
},30)