-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhidden-flag.html
123 lines (108 loc) · 4.41 KB
/
hidden-flag.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hidden Flag Challenge | HashVault</title>
<link rel="favicon" href="favicon.ico" type="image/x-icon">
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=VT323&display=swap');
body {
font-family: 'Orbitron', sans-serif;
background-color: #0a0a0a;
color: #e0e0e0;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.terminal-text {
font-family: 'VT323', monospace;
color: #48bb78;
}
.challenge-container {
max-width: 1000px;
margin: 0 auto;
padding: 20px;
}
.challenge-card {
background-color: rgba(31, 41, 55, 0.8);
border-radius: 16px;
border: 1px solid rgba(79, 70, 229, 0.3);
padding: 30px;
backdrop-filter: blur(10px);
}
.glitch-text {
animation: glitch 1s infinite;
}
#code-display {
white-space: pre-wrap;
font-family: monospace;
background-color: #1a202c;
padding: 15px;
border-radius: 8px;
display: none;
}
@keyframes glitch {
2%, 64% { transform: translate(2px, 0) skew(0deg); }
4%, 60% { transform: translate(-2px, 0) skew(0deg); }
62% { transform: translate(0, 0) skew(5deg); }
}
</style>
</head>
<body class="bg-black">
<div class="container mx-auto px-4 py-10">
<div class="text-center mb-10">
<h1 class="text-3xl sm:text-4xl font-bold text-white glitch-text">
Code <span class="text-purple-400">Inspection</span> Challenge
</h1>
<p class="mt-4 text-gray-300">Reveal the Hidden Secret</p>
</div>
<div class="challenge-container">
<div class="challenge-card">
<h2 class="text-2xl font-bold text-purple-400 mb-6">Challenge Description</h2>
<p class="text-gray-200 mb-6">
Use the magnifying glass to inspect the page's hidden code. The flag is waiting to be discovered!<a href="hidden-flag.html.txt"><button id="inspect-btn" class="">
🔍
</button></a>
</p>
<div class="challenge-input mb-6 mt-10">
<div style="background-color: #1a202c; border: 1px solid #4a5568; color: #e0e0e0; padding: 16px; border-radius: 8px; margin-top: 10px;">
<span style="font-weight: bold; color: #48bb78; display: block; margin-bottom: 8px;">Flag Format:</span>
<span>HVFLAG{TH1S_IS_4_FL4G}</span>
</div>
</div>
</div>
</div>
</div>
<script>
const submitBtn = document.getElementById('submit-btn');
const flagInput = document.getElementById('flag-input');
const resultDiv = document.getElementById('result');
const inspectBtn = document.getElementById('inspect-btn');
const codeDisplay = document.getElementById('code-display');
// The hidden flag is here in the comment!
/* HVFLAG{C0D3_1NSP3CT0R_CH4LL3NG3} */
const correctFlag = 'HVFLAG{C0D3_1NSP3CT0R_CH4LL3NG3}';
submitBtn.addEventListener('click', () => {
const userInput = flagInput.value.trim();
if (userInput === correctFlag) {
resultDiv.innerHTML = `
<p class="text-green-400 font-bold">
<i class="fas fa-check-circle mr-2"></i>Correct! Flag successfully extracted.
</p>
`;
} else {
resultDiv.innerHTML = `
<p class="text-red-400 font-bold">
<i class="fas fa-times-circle mr-2"></i>Incorrect flag. Keep searching.
</p>
`;
}
});
</script>
</body>
</html>