dragon-games-preview-7739 1.2.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Encryption+aboutBlanker.js +40 -54
- package/Launcher.html +3 -20
- package/menu.html +417 -122
- package/menu1.html +1162 -0
- package/package.json +1 -1
|
@@ -1,63 +1,49 @@
|
|
|
1
|
+
|
|
1
2
|
const HASH = "33f976e96ea7c369955545d98b9c909dda505eeb8efbe67946c3076e2ccd54da";
|
|
3
|
+
const url = "https://unpkg.com/dragon-games-preview-7739/menu.html";
|
|
2
4
|
|
|
3
|
-
async function
|
|
4
|
-
|
|
5
|
+
async function authenticate() {
|
|
6
|
+
const passwordInput = prompt("Enter the Secret Passphrase to Enter the Lair:");
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
alert("Authentication cancelled.");
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
8
|
+
if (passwordInput === null) return false;
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const msgBuffer = new TextEncoder().encode(passwordInput);
|
|
11
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", msgBuffer);
|
|
12
|
+
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
13
|
+
const hashHex = hashArray.map(b => b.toString(16).padStart(2, "0")).join("");
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
|
|
15
|
+
if (hashHex === HASH) return true;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} else {
|
|
20
|
-
alert("The dragons are not pleased");
|
|
21
|
-
}
|
|
17
|
+
alert("Access Denied! The dragons are not pleased.");
|
|
18
|
+
return false;
|
|
22
19
|
}
|
|
23
20
|
|
|
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
|
-
</body>
|
|
53
|
-
</html>
|
|
54
|
-
`);
|
|
55
|
-
newWindow.document.close();
|
|
56
|
-
console.log('Opened in about:blank with iframe');
|
|
57
|
-
window.close(); // Close the original window/tab
|
|
58
|
-
} else {
|
|
59
|
-
// Fallback: open in same tab if popup blocked
|
|
60
|
-
console.log('Popup blocked, opening in same tab');
|
|
61
|
-
window.location.href = targetUrl;
|
|
62
|
-
}
|
|
21
|
+
// Opens in a regular browser tab
|
|
22
|
+
async function openRegularTab() {
|
|
23
|
+
if (await authenticate()) {
|
|
24
|
+
window.open(url, "_blank");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Opens in a cloaked about:blank tab
|
|
29
|
+
async function askPassword() {
|
|
30
|
+
if (!(await authenticate())) return;
|
|
31
|
+
|
|
32
|
+
const newWindow = window.open("about:blank", "_blank");
|
|
33
|
+
|
|
34
|
+
if (newWindow) {
|
|
35
|
+
newWindow.document.write(`
|
|
36
|
+
<html>
|
|
37
|
+
<head><title>Dragon Games | The Lair</title></head>
|
|
38
|
+
<body style="margin:0;overflow:hidden;background:#000;">
|
|
39
|
+
<iframe src="${url}"
|
|
40
|
+
style="width:100%;height:100vh;border:none;">
|
|
41
|
+
</iframe>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
44
|
+
`);
|
|
45
|
+
newWindow.document.close();
|
|
46
|
+
} else {
|
|
47
|
+
alert("Please allow pop-ups to open Dragon Games.");
|
|
48
|
+
}
|
|
63
49
|
}
|
package/Launcher.html
CHANGED
|
@@ -167,30 +167,14 @@
|
|
|
167
167
|
</style>
|
|
168
168
|
|
|
169
169
|
<h1>DRAGON GAMES</h1>
|
|
170
|
-
<h2>
|
|
171
|
-
|
|
170
|
+
<h2>3 THOUSAND New Games!</h2>
|
|
171
|
+
|
|
172
172
|
<div>
|
|
173
173
|
</div>
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
<script>
|
|
178
|
-
function openSite() {
|
|
179
|
-
// 1. Set password
|
|
180
|
-
var password = "15=15^2";
|
|
181
|
-
|
|
182
|
-
// 2. Ask the user for the password
|
|
183
|
-
var response = prompt("Enter the Secret Passphrase to Enter the Lair:");
|
|
184
|
-
|
|
185
|
-
if (response === password) {
|
|
186
|
-
// 3. If correct, open the site in a new tab
|
|
187
|
-
window.open("https://unpkg.com/dragon-games-preview-7739/menu.html", "_blank");
|
|
188
|
-
} else {
|
|
189
|
-
// 4. If wrong, give an alert
|
|
190
|
-
alert("Access Denied! The dragons are not pleased.");
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
178
|
function createFire() {
|
|
195
179
|
var colorArray = ["#ffa812", "#F2920A"]
|
|
196
180
|
var randomColor = Math.floor(Math.random() * colorArray.length);
|
|
@@ -217,8 +201,7 @@ createFire();
|
|
|
217
201
|
<script src="Encryption+aboutBlanker.js"></script>
|
|
218
202
|
<p class="hint">Opens in a cloaked about:blank tab</p>
|
|
219
203
|
|
|
220
|
-
<
|
|
221
|
-
<button onclick="openSite()">ENTER THE LAIR</button>
|
|
204
|
+
<button onclick="openRegularTab()">ENTER THE LAIR</button>
|
|
222
205
|
<p class="hint">Opens in a regular tab</p>
|
|
223
206
|
|
|
224
207
|
|