-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapi_key_management.html
More file actions
executable file
·515 lines (476 loc) · 22 KB
/
api_key_management.html
File metadata and controls
executable file
·515 lines (476 loc) · 22 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
<html lang="en">
<head>
<meta charset="utf-8">
<title>XposedOrNot: API Key Management</title>
<link rel="dns-prefetch" href="cdnjs.cloudflare.com">
<link rel="dns-prefetch" href="static.hotjar.com">
<link rel="icon" href="/favicon.ico" sizes="16x16 32x32 48x48 64x64 128x128 256x256" type="image/x-icon" />
<link rel="icon" href="/static/images/logos/logo.svg" type="image/svg+xml" />
<link rel="icon" href="/static/images/logos/logo-96x96.png" sizes="96x96" type="image/png" />
<link rel="icon" href="/static/images/logos/logo-32x32.png" sizes="32x32" type="image/png" />
<link rel="icon" href="/static/images/logos/logo-192x192.png" sizes="192x192" type="image/png" />
<link rel="icon" href="/static/images/logos/logo-512x512.png" sizes="512x512" type="image/png" />
<link rel="apple-touch-icon" href="/static/images/logos/logo-180x180.png" />
<link rel=stylesheet
href='https://fonts.googleapis.com/css?family=Poppins%3A300%2C400%2C500%2C600%2C700%2C900&subset'
type=text/css media=all>
<link href="/static/css/style.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/css/bootstrap.min.css"
integrity="sha512-rt/SrQ4UNIaGfDyEXZtNcyWvQeOq0QLygHluFQcSjaGB04IxWhal71tKuzP6K8eYXYB6vJV4pHkXcmFGGQ1/0w=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css"
integrity="sha256-BtbhCIbtfeVWGsqxk1vOHEYXS6qcvQvLMZqjtpWUEx8=" crossorigin="anonymous" />
<script src="/static/scripts/utils.js"></script>
<link href="/static/css/style2.css" type="text/css" rel="stylesheet" defer>
<link href="/static/css/xon-report.css" type="text/css" rel="stylesheet" defer>
<meta name="viewport" content="width=device-width, maximum-scale=5.0, initial-scale=1.0">
<meta name="description" content="XposedOrNot: Get a detailed report of your data breach exposure">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Devanand Premkumar">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.5.3/js/bootstrapValidator.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js"
integrity="sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tippy.js/6.3.7/tippy-bundle.umd.min.js"
integrity="sha512-gbruucq/Opx9jlHfqqZeAg2LNK3Y4BbpXHKDhRC88/tARL/izPOE4Zt2w6X9Sn1UeWaGbL38zW7nkL2jdn5JIw=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<style>
body {
background-color: #f5f5f5;
}
.navbar {
margin-bottom: 20px;
}
.card {
box-shadow: 0px 0px 15px 0px rgba(50, 50, 50, 0.2);
}
h3 {
color: #007bff;
//text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
.benefit-card {
border: none;
border-radius: 10px;
box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
}
.benefit-card:nth-child(even) {
background: #007bff;
color: #fff;
}
.benefit-card:nth-child(odd) {
background: #fff;
color: #007bff;
}
.benefit-card .card-title {
font-weight: 700;
font-size: 1.2em;
}
.benefit-card .card-text {
font-size: 1em;
}
/* Back to Dashboard Button - Modern Style */
.back-btn-wrapper {
text-align: center;
padding: 30px 0;
}
.btn-back-dashboard {
position: relative;
display: inline-flex;
align-items: center;
gap: 12px;
padding: 14px 32px;
font-size: 1rem;
font-weight: 600;
color: #2c3e50;
background: #ffffff;
border: 2px solid #3498db;
border-radius: 50px;
text-decoration: none !important;
overflow: hidden;
transition: all 0.3s ease;
z-index: 1;
box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}
.btn-back-dashboard::before {
content: '';
position: absolute;
top: 100%;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
transition: all 0.3s ease;
z-index: -1;
}
.btn-back-dashboard:hover::before {
top: 0;
}
.btn-back-dashboard:hover {
color: #ffffff !important;
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
border-color: #2980b9;
}
.btn-back-dashboard i {
font-size: 1.1em;
transition: transform 0.3s ease;
}
.btn-back-dashboard:hover i {
transform: translateX(-4px);
}
.btn-header-back {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 20px;
font-size: 0.9rem;
font-weight: 500;
color: #3498db;
background: transparent;
border: 2px solid #3498db;
border-radius: 25px;
text-decoration: none !important;
transition: all 0.3s ease;
}
.btn-header-back:hover {
background: #3498db;
color: #ffffff !important;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}
</style>
<script src="/static/scripts/other-libraries.js" defer></script>
</head>
<body data-gr-c-s-loaded="true" class="" style="" data-new-gr-c-s-check-loaded="8.884.0" data-gr-ext-installed="">
<div class="mobileheader-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="index.html">
<p>XposedorNot</p>
</a>
<button class="hamburger hamburger--squeeze navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto"></ul>
<div class="main-menu-part">
<ul>
<li>
<a href="password.html">Password</a>
</li>
<li>
<a href="faq.html">FAQ</a>
</li>
<li>
<a target="_blank" rel="noopener noreferrer" href="https://blog.xposedornot.com/">Blog</a>
</li>
<li>
<a target="_blank" rel="noopener noreferrer" href="https://twitter.com/XposedOrNot">
<em class="fab fa-twitter"></em>
</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
<header class="header-area">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-3">
<div class="header-left">
<a href="https://XposedOrNot.com">
<p>XposedorNot</p>
</a>
</div>
</div>
<div class="col-lg-9 col-md-9">
<div class="header-right">
<ul>
<li>
<a href="#" class="btn-header-back" id="headerBackBtn">
<i class="fas fa-arrow-left"></i> Back to Dashboard
</a>
</li>
<li>
<a href="faq.html">FAQ</a>
</li>
<li>
<a target="_blank" rel="noopener noreferrer" href="https://blog.xposedornot.com/">Blog</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</header>
<div class="container">
<br>
<div class="row justify-content-center align-items-center" style="height:80vh">
<div class="col-12">
<div class="card" align="center">
<div class="card-body">
<h3 class="text-center mb-5"> XposedOrNot API Key Management</h3>
<p align="center">This is your current API key which can be used to query breaches related to domains
which are verified.
<form id="emailForm">
<div class="form-group">
<div class="input-group">
<input type="text" style="text-align:center; font-weight: bold; font-size:16px;"
class="form-control w-75 form-control" id="api_key" name="api_key"
placeholder="ImRldmEuc2VjdXJpdHlAZ21haWwuY29tIg.ZJpu5g.MrhgMQk60I5TJyYHke6YNqrsabk"
readonly>
<div class="input-group-append">
<button type="submit" class="btn btn-primary" id="submitButton">
<span id="submitText">Reset API Key</span>
<span id="submitSpinner" class="spinner-border spinner-border-sm d-none" role="status"
aria-hidden="true"></span>
</button>
</div>
</div>
</div>
</form>
<div id="rateLimitMessage" class="alert alert-warning mt-3" style="display: none;">
<i class="fas fa-exclamation-triangle"></i> Too many requests. Please slow down and try again
later.
</div>
<div id="successMessage" class="alert alert-success mt-3" style="display: none;">
<i class="fas fa-check-circle"></i> API Reset successfully completed. You may use the new API key.
</div>
<div id="errorMessage" class="alert alert-danger mt-3" style="display: none;">
<i class="fas fa-times-circle"></i> There was an error processing your request. Please try again
later.
</div>
<div id="curl" name="curl" class="alert alert-primary mt-3">
<blockquote>
curl -L -X POST -H "x-api-key: [KEY]" -H "Content-Length: 0"
https://api.xposedornot.com/v1/domain-breaches/
</blockquote>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3 col-md-6 mb-4">
<div class="card benefit-card">
<div class="card-body">
<h5 class="card-title">Breach Checks</h5>
<p class="card-text">Our API allows checks for data breaches, providing an up-to-date
insight into potential user data expsure across all validated domains.</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-4">
<div class="card benefit-card">
<div class="card-body">
<h5 class="card-title">Seamless Integration</h5>
<p class="card-text">Our API is designed to integrate seamlessly with SIEM, SOAR and
other security systems, enhancing your cybersecurity posture.</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-4">
<div class="card benefit-card">
<div class="card-body">
<h5 class="card-title">Real-Time Updates</h5>
<p class="card-text">Our API delivers real-time updates, enabling swift response to any
new or emerging data breaches that could impact your validated domains.</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-4">
<div class="card benefit-card">
<div class="card-body">
<h5 class="card-title">Robust Security</h5>
<p class="card-text">The API is designed with strong security measures, ensuring the
protection of sensitive data while providing a robust tool for breach management.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br><br>
<div align="center">Please read our <a href="api_doc.html">API Documentation</a> and <a
href="xposedornot.apiary.com">API Playground</a> for more details.</div>
</div>
</div>
<div class="back-btn-wrapper">
<a href="#" class="btn-back-dashboard" id="bottomBackBtn">
<i class="fas fa-arrow-left"></i>
<span>Back to Dashboard</span>
</a>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/js/bootstrap.min.js"
integrity="sha512-7rusk8kGPFynZWu26OKbTeI+QPoYchtxsmPeBqkHIEXJxeun4yJ4ISYe7C6sz9wdxeE1Gk3VxsIWgCZTc+vX3g=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-108891851-1" rel="preconnect"></script>
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=_turnstileCb" async defer></script>
<script src="/static/scripts/common.js"></script>
<script type="text/javascript">
$.urlParam = function (name) {
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
return results[1] || 0;
}
let token;
try {
email = decodeURIComponent($.urlParam('email'));
token = decodeURIComponent($.urlParam('token'));
} catch (error) {
window.location.replace("https://xposedornot.com");
}
$(document).ready(function () {
var dashboardUrl = 'breach-dashboard.html?email=' + encodeURIComponent(email) + '&token=' + encodeURIComponent(token);
$('#headerBackBtn, #bottomBackBtn').click(function (e) {
e.preventDefault();
window.location.href = dashboardUrl;
});
});
let api_url = "https://api.xposedornot.com/v1/get-api-key/" + token;
$.ajax({
url: api_url,
type: 'GET',
success: function (res) {
$('#api_key').val(res.api_key);
message = '💡 You may test using this : curl -L -X POST -H "x-api-key: ' + res.api_key + '" -H "Content-Length: 0" https://api.xposedornot.com/v1/domain-breaches/'
document.getElementById('curl').innerText = message
},
error: function (error) {
if (error.responseJSON && error.responseJSON.error === 'invalid_token') {
alert("Invalid token. Please try again.");
}
}
});
document.getElementById('emailForm').addEventListener('submit', function (event) {
event.preventDefault();
hideAllMessages();
resetApiKey();
});
function showRateLimitMessage() {
document.getElementById('rateLimitMessage').style.display = "block";
}
function showSuccessMessage() {
document.getElementById('successMessage').style.display = "block";
}
function showErrorMessage(message) {
document.getElementById('errorMessage').innerText = message;
document.getElementById('errorMessage').style.display = "block";
}
function resetApiKey() {
document.getElementById('submitText').style.display = "none";
document.getElementById('submitSpinner').style.display = "inline-block";
document.getElementById('submitButton').disabled = true;
hideAllMessages();
fetch(`https://api.xposedornot.com/v1/create-api-key/${token}`)
.then(response => {
if (!response.ok) {
if (response.status === 429) {
showRateLimitMessage();
} else {
showErrorMessage('Network response was not ok');
}
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
if (data.status === "success") {
document.getElementById('api_key').value = data.api_key;
showSuccessMessage();
message = '💡 You may test using this : curl -L -X POST -H "x-api-key: ' + data.api_key + '" -H "Content-Length: 0" https://api.xposedornot.com/v1/domain-breaches/'
document.getElementById('curl').innerText = message
} else {
showErrorMessage('Failed to reset API key');
}
})
.catch(() => {
showErrorMessage('An error occurred while resetting your API key. Please try again later.');
})
.finally(() => {
document.getElementById('submitText').style.display = "inline-block";
document.getElementById('submitSpinner').style.display = "none";
document.getElementById('submitButton').disabled = false;
});
}
function hideAllMessages() {
document.getElementById('rateLimitMessage').style.display = "none";
document.getElementById('successMessage').style.display = "none";
document.getElementById('errorMessage').style.display = "none";
}
</script>
</div>
<div class="footer">
<div class="container">
<div style="text-align:center;margin-bottom:30px;">
<p>Join us in shaping this fully open source site! Contributions welcome ❤️ at our <a
href="https://github.com/XposedOrNot" target="_blank" rel="noopener">GitHub</a>.</p>
</div>
<div class="footer-columns">
<div class="footer-group">
<h6>Legal</h6>
<div class="footer-links-wrapper">
<a href="privacy" class="footer-link">Privacy Policy</a>
<a href="terms" class="footer-link">Terms</a>
</div>
</div>
<div class="footer-group">
<h6>Community</h6>
<div class="footer-links-wrapper">
<a href="https://blog.xposedornot.com" class="footer-link">Blog</a>
<a href="our-repository" class="footer-link">Our Repository</a>
</div>
</div>
<div class="footer-group">
<h6>Trust</h6>
<div class="footer-links-wrapper">
<a href="https://stats.uptimerobot.com/3zjQkZ2Caa" target="_blank" rel="noopener" class="footer-link">Status</a>
<a href="transparency" class="footer-link">Transparency</a>
<a href="responsible-disclosure" class="footer-link">Responsible Disclosure</a>
</div>
</div>
<div class="footer-group">
<h6>Follow Us</h6>
<div class="footer-links-wrapper">
<a href="https://twitter.com/xposedornot" target="_blank" rel="noopener" class="footer-link">
<i class="fab fa-twitter"></i> Twitter (X)
</a>
<a href="https://facebook.com/xposedornot" target="_blank" rel="noopener" class="footer-link">
<i class="fab fa-facebook"></i> Facebook
</a>
<a href="https://infosec.exchange/@XposedOrNot" target="_blank" rel="noopener" class="footer-link">
<i class="fab fa-mastodon"></i> Mastodon
</a>
</div>
</div>
</div>
</div>
</div>
<script>
// Footer accordion for mobile
document.addEventListener('DOMContentLoaded', function() {
var footerGroups = document.querySelectorAll('.footer-group h6');
footerGroups.forEach(function(header) {
header.addEventListener('click', function() {
if (window.innerWidth <= 768) {
var group = this.parentElement;
group.classList.toggle('active');
}
});
});
});
</script>
</body>
</html>