-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecond.html
More file actions
234 lines (227 loc) · 5.86 KB
/
second.html
File metadata and controls
234 lines (227 loc) · 5.86 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
<style>
.t4s-header__wrapper.t4s-pr.t4s-header-layout_logo_left,
footer#t4s-footer {
display: none;
}
.section {
min-height: 100vh;
margin: 0;
background: linear-gradient(180deg, #0a1a2f 0%, #15325c 100%);
font-family: "Inter", sans-serif;
display: flex;
align-items: center;
justify-content: center;
}
.container {
width: 100%;
max-width: 620px;
margin: 0 auto;
text-align: center;
padding: 32px 16px;
background: transparent;
}
h1 {
color: #fff;
font-size: 6.5rem;
font-weight: 700;
margin-bottom: 18px;
line-height: 1.15;
}
.subtitle {
color: #c9d6e3;
font-size: 2.7rem;
font-weight: 400;
margin-bottom: 32px;
line-height: 1.3;
}
.scan-form {
display: flex;
flex-direction: column;
gap: 16px;
margin-bottom: 18px;
}
.input-wrapper {
display: flex;
align-items: center;
background: #fff;
border-radius: 8px;
padding: 10px 15px;
box-shadow: 0 2px 8px rgba(10, 26, 47, 0.05);
}
.input-wrapper .emoji {
font-size: 2rem;
margin-right: 8px;
}
.scan-form input[type="email"] {
border: none;
outline: none;
font-size: 2.3rem;
font-family: inherit;
padding: 10px 0;
background: transparent;
flex: 1;
color: #1a2a3c;
}
.scan-form button {
background: #3971f7;
color: #fff;
font-size: 2.1rem;
font-weight: 600;
border: none;
border-radius: 8px;
padding: 25px 0;
cursor: pointer;
transition: ease-in-out 0.2s;
}
.scan-form button:hover {
background: #2656c7;
}
.note {
color: #c9d6e3;
font-size: 2rem;
margin-top: 8px;
}
#result {
margin-top: 18px;
font-size: 1.05rem;
min-height: 32px;
}
.navbar {
position: absolute;
top: 10px;
left: 0;
width: 100%;
padding: 10px 0;
}
.navbar-text {
color: #fff;
font-size: 3rem;
font-weight: 700;
font-style: italic;
text-align: center;
}
@media (max-width: 500px) {
.container {
max-width: 95vw;
padding: 24px 4vw;
}
h1 {
font-size: 2rem;
}
.subtitle {
font-size: 1rem;
}
}
.btn-loader {
font-size: 2.1rem;
color: #fff;
letter-spacing: 2px;
animation: blink 1s infinite steps(1, end);
}
@keyframes blink {
50% {
opacity: 0.5;
}
}
</style>
<div class="section">
<div class="navbar">
<a
href="https://whynotprivacy.com"
target="_blank"
rel="noopener noreferrer"
>
<p class="navbar-text">WhyNotPrivacy</p>
</a>
</div>
<div class="container">
<h1>See What Hackers<br />Know About You</h1>
<p class="subtitle">
Check if your email, passwords, or other<br />
personal data were leaked online.
</p>
<form class="scan-form" id="scanForm">
<div class="input-wrapper">
<span class="emoji">👋</span>
<input
type="email"
id="emailInput"
placeholder="Email address"
required
/>
</div>
<button type="submit" id="scanBtn">
<span class="btn-text">Scan Now</span>
<span class="btn-loader" style="display: none"
>●●● Running...</span
>
</button>
</form>
<p class="note">Instant and free. No account required</p>
<div id="result"></div>
</div>
</div>
<script>
const form = document.getElementById("scanForm");
const emailInput = document.getElementById("emailInput");
const resultDiv = document.getElementById("result");
const scanBtn = document.getElementById("scanBtn");
const btnText = scanBtn.querySelector(".btn-text");
const btnLoader = scanBtn.querySelector(".btn-loader");
form.addEventListener("submit", async (e) => {
e.preventDefault();
const email = emailInput.value.trim();
if (!email) return;
// UI: Show loading state
resultDiv.innerHTML = "";
btnText.style.display = "none";
btnLoader.style.display = "inline";
scanBtn.disabled = true;
try {
const res = await fetch(
`https://data-breach-production.up.railway.app/scan?email=${encodeURIComponent(
email
)}`
// For local testing, use: `http://localhost:3000/scan?email=${encodeURIComponent(email)}`
);
const data = await res.json();
if (res.ok) {
// Show the searched email
let html = `<div style="color:#fff;font-size:1.1rem;margin-bottom:8px;">Results for: <strong>${data.email}</strong></div>`;
if (Array.isArray(data.data) && data.data.length > 0) {
html += data.data
.map(
(breach) => `
<div class="breach-item" style="background:#fff;padding:12px;margin-bottom:12px;border-radius:8px;text-align:left;">
<strong style="font-size:1.2rem;color:#0a1a2f;">${
breach.Name
}</strong><br/>
<span style="color:#3b4c66;">Domain:</span> ${
breach.Domain || "N/A"
}<br/>
<span style="color:#3b4c66;">Breach Date:</span> ${
breach.BreachDate || "Unknown"
}
</div>
`
)
.join("");
} else {
html += `<div class="no-breaches" style="color:#fff;font-size:1.1rem;margin-top:8px;">🎉 No breaches found!</div>`;
}
resultDiv.innerHTML = html;
} else {
resultDiv.innerHTML = `<span style="color:red;font-weight:bold;">⚠️ ${
data.error || "Something went wrong."
}</span>`;
}
} catch (err) {
console.error(err);
resultDiv.innerHTML = `<span style="color:red;font-weight:bold;">⚠️ Something went wrong. Please try again later.</span>`;
}
// Reset UI
btnText.style.display = "inline";
btnLoader.style.display = "none";
scanBtn.disabled = false;
});
</script>