.
675 |
--------------------------------------------------------------------------------
/styles.css:
--------------------------------------------------------------------------------
1 | /* OSINT TRACKER PRO - Interface Professionnelle Améliorée */
2 | /* Developed by https://github.com/mixaoc */
3 |
4 | @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');
5 |
6 | :root {
7 | --primary-color: #00ff88;
8 | --secondary-color: #00ccff;
9 | --accent-color: #ff00ff;
10 | --danger-color: #ff004c;
11 | --warning-color: #ffaa00;
12 | --success-color: #00ff44;
13 | --bg-primary: #0a0e1a;
14 | --bg-secondary: #0f1423;
15 | --bg-tertiary: #141928;
16 | --bg-card: rgba(20, 25, 40, 0.95);
17 | --text-primary: #ffffff;
18 | --text-secondary: #8892b0;
19 | --text-accent: #00ff88;
20 | --border-color: rgba(0, 255, 136, 0.2);
21 | --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.3);
22 | --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
23 | --gradient-cyber: linear-gradient(135deg, #00ff88 0%, #00ccff 50%, #ff00ff 100%);
24 | }
25 |
26 | /* ANIMATIONS DE FOND AVANCÉES */
27 | @keyframes gradientShift {
28 | 0% { background-position: 0% 50%; }
29 | 50% { background-position: 100% 50%; }
30 | 100% { background-position: 0% 50%; }
31 | }
32 |
33 | @keyframes float {
34 | 0%, 100% { transform: translateY(0px) rotate(0deg); }
35 | 50% { transform: translateY(-20px) rotate(180deg); }
36 | }
37 |
38 | @keyframes glowPulse {
39 | 0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.3); }
40 | 50% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.6); }
41 | }
42 |
43 | @keyframes textShimmer {
44 | 0% { background-position: -200% center; }
45 | 100% { background-position: 200% center; }
46 | }
47 |
48 | @keyframes slideInFromTop {
49 | 0% { transform: translateY(-50px); opacity: 0; }
50 | 100% { transform: translateY(0); opacity: 1; }
51 | }
52 |
53 | @keyframes slideInFromBottom {
54 | 0% { transform: translateY(50px); opacity: 0; }
55 | 100% { transform: translateY(0); opacity: 1; }
56 | }
57 |
58 | @keyframes scaleIn {
59 | 0% { transform: scale(0.8); opacity: 0; }
60 | 100% { transform: scale(1); opacity: 1; }
61 | }
62 |
63 | /* FOND ANIMÉ AVANCÉ */
64 | body {
65 | width: 1600px;
66 | min-height: 900px;
67 | font-family: 'JetBrains Mono', 'Space Mono', monospace;
68 | background:
69 | linear-gradient(-45deg, #0a0e1a, #0f1423, #141928, #1a1f35),
70 | url('https://mixaoc.com/p.png');
71 | background-size: 400% 400%, cover;
72 | animation: gradientShift 15s ease infinite;
73 | color: var(--text-primary);
74 | position: relative;
75 | overflow: hidden;
76 | margin: 0;
77 | padding: 0;
78 | }
79 |
80 | /* CANVAS FOR PARTICLES */
81 | #particlesCanvas {
82 | position: fixed;
83 | top: 0;
84 | left: 0;
85 | width: 100%;
86 | height: 100%;
87 | z-index: 0;
88 | pointer-events: none;
89 | }
90 |
91 | /* Hide scrollbars but keep functionality */
92 | .content-area {
93 | scrollbar-width: none; /* Firefox */
94 | -ms-overflow-style: none; /* IE and Edge */
95 | }
96 |
97 | .content-area::-webkit-scrollbar {
98 | display: none; /* Chrome, Safari and Opera */
99 | }
100 |
101 | /* CONTAINER PRINCIPAL SYMÉTRIQUE */
102 | .container {
103 | position: relative;
104 | z-index: 1;
105 | min-height: 900px;
106 | display: flex;
107 | flex-direction: column;
108 | animation: slideInFromTop 0.8s ease-out;
109 | }
110 |
111 | /* HEADER SYMÉTRIQUE AVEC ANIMATIONS */
112 | .header {
113 | background: linear-gradient(135deg,
114 | rgba(20, 25, 40, 0.98) 0%,
115 | rgba(15, 20, 35, 0.98) 100%);
116 | padding: 25px 20px;
117 | border-bottom: 2px solid var(--border-color);
118 | text-align: center;
119 | position: relative;
120 | backdrop-filter: blur(10px);
121 | animation: glowPulse 3s ease-in-out infinite;
122 | }
123 |
124 | .logo-container {
125 | display: flex;
126 | justify-content: center;
127 | margin-bottom: 15px;
128 | animation: float 6s ease-in-out infinite;
129 | }
130 |
131 | .logo {
132 | width: 80px;
133 | height: 80px;
134 | border-radius: 50%;
135 | border: 3px solid var(--primary-color);
136 | box-shadow:
137 | 0 0 30px rgba(0, 255, 136, 0.5),
138 | inset 0 0 20px rgba(0, 255, 136, 0.2);
139 | transition: all 0.5s ease;
140 | }
141 |
142 | .logo:hover {
143 | transform: scale(1.1) rotate(360deg);
144 | box-shadow:
145 | 0 0 50px rgba(0, 255, 136, 0.8),
146 | inset 0 0 30px rgba(0, 255, 136, 0.4);
147 | }
148 |
149 | .title {
150 | font-family: 'Orbitron', sans-serif;
151 | font-size: 24px;
152 | font-weight: 900;
153 | background: linear-gradient(45deg, #00ff88, #00ccff, #ff00ff, #00ff88);
154 | background-size: 300% 300%;
155 | -webkit-background-clip: text;
156 | -webkit-text-fill-color: transparent;
157 | background-clip: text;
158 | text-transform: uppercase;
159 | letter-spacing: 3px;
160 | margin-bottom: 5px;
161 | animation: textShimmer 3s ease-in-out infinite, glowPulse 2s ease-in-out infinite;
162 | }
163 |
164 | .subtitle {
165 | color: var(--text-secondary);
166 | font-size: 12px;
167 | text-transform: uppercase;
168 | letter-spacing: 2px;
169 | opacity: 0.8;
170 | animation: slideInFromBottom 0.8s ease-out 0.2s both;
171 | }
172 |
173 | /* NAVIGATION PAR ONGLETS SYMÉTRIQUE AVEC ANIMATIONS */
174 | .tab-navigation {
175 | display: grid;
176 | grid-template-columns: repeat(4, 1fr);
177 | gap: 8px;
178 | background: rgba(20, 25, 40, 0.95);
179 | padding: 15px;
180 | border-bottom: 2px solid var(--border-color);
181 | backdrop-filter: blur(10px);
182 | animation: slideInFromBottom 0.8s ease-out 0.4s both;
183 | }
184 |
185 | .tab-btn {
186 | background: rgba(10, 14, 26, 0.8);
187 | border: 2px solid var(--border-color);
188 | border-radius: 12px;
189 | padding: 14px 8px;
190 | color: var(--text-secondary);
191 | cursor: pointer;
192 | transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
193 | font-family: 'Rajdhani', sans-serif;
194 | font-weight: 600;
195 | font-size: 11px;
196 | text-transform: uppercase;
197 | letter-spacing: 1px;
198 | display: flex;
199 | align-items: center;
200 | justify-content: center;
201 | gap: 6px;
202 | position: relative;
203 | overflow: hidden;
204 | }
205 |
206 | .tab-btn::before {
207 | content: '';
208 | position: absolute;
209 | top: 0;
210 | left: -100%;
211 | width: 100%;
212 | height: 100%;
213 | background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.2), transparent);
214 | transition: left 0.6s ease;
215 | }
216 |
217 | .tab-btn:hover::before {
218 | left: 100%;
219 | }
220 |
221 | .tab-btn:hover {
222 | background: rgba(0, 255, 136, 0.1);
223 | color: var(--primary-color);
224 | border-color: var(--primary-color);
225 | transform: translateY(-3px) scale(1.05);
226 | box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
227 | }
228 |
229 | .tab-btn.active {
230 | background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 204, 255, 0.2) 100%);
231 | color: var(--primary-color);
232 | border-color: var(--primary-color);
233 | box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
234 | animation: glowPulse 2s ease-in-out infinite;
235 | }
236 |
237 | /* ZONE DE CONTENU ALIGNÉE AVEC ANIMATIONS */
238 | .content-area {
239 | flex: 1;
240 | padding: 20px;
241 | background: rgba(10, 14, 26, 0.85);
242 | overflow-y: auto;
243 | max-height: 650px;
244 | backdrop-filter: blur(5px);
245 | animation: scaleIn 0.6s ease-out 0.6s both;
246 | }
247 |
248 | .tab-content {
249 | display: none;
250 | animation: slideInFromBottom 0.5s ease-out;
251 | }
252 |
253 | .tab-content.active {
254 | display: block;
255 | }
256 |
257 | /* SECTIONS DE RECHERCHE AVEC ANIMATIONS */
258 | .search-section {
259 | margin-bottom: 25px;
260 | animation: slideInFromTop 0.6s ease-out 0.8s both;
261 | }
262 |
263 | .search-box {
264 | display: flex;
265 | gap: 12px;
266 | margin-bottom: 20px;
267 | align-items: center;
268 | }
269 |
270 | .search-input {
271 | flex: 1;
272 | background: rgba(20, 25, 40, 0.95);
273 | border: 2px solid rgba(0, 255, 136, 0.3);
274 | border-radius: 12px;
275 | padding: 14px 16px;
276 | color: var(--text-primary);
277 | font-family: 'JetBrains Mono', monospace;
278 | font-size: 13px;
279 | transition: all 0.3s ease;
280 | backdrop-filter: blur(10px);
281 | }
282 |
283 | .search-input:focus {
284 | outline: none;
285 | border-color: var(--primary-color);
286 | box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
287 | transform: scale(1.02);
288 | animation: glowPulse 2s ease-in-out infinite;
289 | }
290 |
291 | .search-btn {
292 | background: var(--gradient-cyber);
293 | border: none;
294 | border-radius: 12px;
295 | padding: 14px 20px;
296 | color: var(--bg-primary);
297 | font-family: 'Orbitron', sans-serif;
298 | font-weight: 700;
299 | font-size: 12px;
300 | cursor: pointer;
301 | text-transform: uppercase;
302 | letter-spacing: 1px;
303 | transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
304 | white-space: nowrap;
305 | position: relative;
306 | overflow: hidden;
307 | }
308 |
309 | .search-btn::after {
310 | content: '';
311 | position: absolute;
312 | top: 50%;
313 | left: 50%;
314 | width: 0;
315 | height: 0;
316 | background: rgba(255, 255, 255, 0.3);
317 | border-radius: 50%;
318 | transform: translate(-50%, -50%);
319 | transition: width 0.6s ease, height 0.6s ease;
320 | }
321 |
322 | .search-btn:hover::after {
323 | width: 300px;
324 | height: 300px;
325 | }
326 |
327 | .search-btn:hover {
328 | transform: translateY(-3px) scale(1.05);
329 | box-shadow:
330 | 0 8px 30px rgba(0, 255, 136, 0.5),
331 | 0 0 50px rgba(0, 255, 136, 0.3);
332 | }
333 |
334 | /* OPTIONS DE RECHERCHE POUR FULL NAME */
335 | .search-options {
336 | display: grid;
337 | grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
338 | gap: 15px;
339 | margin-top: 15px;
340 | padding: 15px;
341 | background: rgba(20, 25, 40, 0.8);
342 | border-radius: 12px;
343 | border: 1px solid var(--border-color);
344 | }
345 |
346 | .option-group {
347 | display: flex;
348 | flex-direction: column;
349 | gap: 8px;
350 | }
351 |
352 | .option-group label {
353 | color: var(--text-secondary);
354 | font-size: 12px;
355 | font-weight: 600;
356 | text-transform: uppercase;
357 | letter-spacing: 1px;
358 | }
359 |
360 | .option-select, .option-input {
361 | background: rgba(10, 14, 26, 0.9);
362 | border: 2px solid rgba(0, 255, 136, 0.3);
363 | border-radius: 8px;
364 | padding: 10px 12px;
365 | color: var(--text-primary);
366 | font-family: 'JetBrains Mono', monospace;
367 | font-size: 12px;
368 | transition: all 0.3s ease;
369 | }
370 |
371 | .option-select:focus, .option-input:focus {
372 | outline: none;
373 | border-color: var(--primary-color);
374 | box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
375 | }
376 |
377 | /* EXPORT BUTTONS */
378 | .export-btn {
379 | background: var(--secondary-color);
380 | border: none;
381 | border-radius: 12px;
382 | padding: 14px 16px;
383 | color: var(--bg-primary);
384 | cursor: pointer;
385 | transition: all 0.3s ease;
386 | display: flex;
387 | align-items: center;
388 | justify-content: center;
389 | }
390 |
391 | .export-btn:hover {
392 | background: var(--primary-color);
393 | transform: translateY(-2px);
394 | box-shadow: 0 5px 15px rgba(0, 204, 255, 0.4);
395 | }
396 |
397 | .export-btn-large {
398 | background: var(--gradient-cyber);
399 | border: none;
400 | border-radius: 12px;
401 | padding: 16px 24px;
402 | color: var(--bg-primary);
403 | font-family: 'Orbitron', sans-serif;
404 | font-weight: 700;
405 | font-size: 14px;
406 | cursor: pointer;
407 | text-transform: uppercase;
408 | letter-spacing: 1px;
409 | transition: all 0.4s ease;
410 | width: 100%;
411 | margin-top: 10px;
412 | }
413 |
414 | .export-btn-large:hover {
415 | transform: translateY(-3px);
416 | box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
417 | }
418 |
419 | .export-section {
420 | padding: 20px;
421 | }
422 |
423 | .export-options {
424 | display: grid;
425 | grid-template-columns: repeat(2, 1fr);
426 | gap: 20px;
427 | margin-top: 20px;
428 | }
429 |
430 | .export-option {
431 | background: rgba(20, 25, 40, 0.95);
432 | border: 2px solid var(--border-color);
433 | border-radius: 15px;
434 | padding: 25px;
435 | transition: all 0.3s ease;
436 | }
437 |
438 | .export-option:hover {
439 | border-color: var(--primary-color);
440 | box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
441 | transform: translateY(-5px);
442 | }
443 |
444 | .export-option h4 {
445 | color: var(--primary-color);
446 | font-family: 'Orbitron', sans-serif;
447 | margin-bottom: 10px;
448 | }
449 |
450 | .export-option p {
451 | color: var(--text-secondary);
452 | font-size: 13px;
453 | margin-bottom: 15px;
454 | }
455 |
456 | /* CARTES DE RÉSULTATS AVEC ANIMATIONS */
457 | .results-container {
458 | display: flex;
459 | flex-direction: column;
460 | gap: 15px;
461 | }
462 |
463 | .platform-card {
464 | background: linear-gradient(135deg, rgba(20, 25, 40, 0.98) 0%, rgba(30, 35, 50, 0.98) 100%);
465 | border: 2px solid var(--border-color);
466 | border-radius: 15px;
467 | padding: 20px;
468 | transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
469 | backdrop-filter: blur(10px);
470 | animation: scaleIn 0.5s ease-out;
471 | position: relative;
472 | overflow: hidden;
473 | }
474 |
475 | .platform-card::before {
476 | content: '';
477 | position: absolute;
478 | top: 0;
479 | left: -100%;
480 | width: 100%;
481 | height: 100%;
482 | background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
483 | transition: left 0.6s ease;
484 | }
485 |
486 | .platform-card:hover::before {
487 | left: 100%;
488 | }
489 |
490 | .platform-card:hover {
491 | border-color: var(--primary-color);
492 | box-shadow:
493 | 0 10px 40px rgba(0, 255, 136, 0.3),
494 | inset 0 0 30px rgba(0, 255, 136, 0.1);
495 | transform: translateY(-5px) scale(1.02);
496 | }
497 |
498 | .platform-header {
499 | display: flex;
500 | align-items: center;
501 | gap: 12px;
502 | margin-bottom: 15px;
503 | padding-bottom: 12px;
504 | border-bottom: 1px solid rgba(0, 255, 136, 0.2);
505 | }
506 |
507 | .platform-icon {
508 | width: 45px;
509 | height: 45px;
510 | display: flex;
511 | align-items: center;
512 | justify-content: center;
513 | background: var(--gradient-cyber);
514 | border-radius: 50%;
515 | font-size: 20px;
516 | animation: float 4s ease-in-out infinite;
517 | box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
518 | }
519 |
520 | .platform-name {
521 | flex: 1;
522 | font-family: 'Orbitron', sans-serif;
523 | font-size: 16px;
524 | font-weight: 700;
525 | color: var(--text-primary);
526 | text-transform: uppercase;
527 | letter-spacing: 1px;
528 | background: linear-gradient(45deg, #00ff88, #00ccff);
529 | -webkit-background-clip: text;
530 | -webkit-text-fill-color: transparent;
531 | background-clip: text;
532 | }
533 |
534 | /* DISPLAY UNIFORME POUR TOUS LES RÉSULTATS */
535 | .profile-section {
536 | display: flex;
537 | flex-direction: column;
538 | gap: 12px;
539 | }
540 |
541 | .profile-field {
542 | display: flex;
543 | justify-content: space-between;
544 | align-items: flex-start;
545 | padding: 10px 0;
546 | border-bottom: 1px solid rgba(255, 255, 255, 0.1);
547 | transition: all 0.3s ease;
548 | }
549 |
550 | .profile-field:hover {
551 | background: rgba(0, 255, 136, 0.05);
552 | padding-left: 10px;
553 | border-radius: 8px;
554 | }
555 |
556 | .field-label {
557 | color: var(--text-secondary);
558 | font-size: 12px;
559 | text-transform: uppercase;
560 | letter-spacing: 1px;
561 | min-width: 140px;
562 | font-weight: 600;
563 | }
564 |
565 | .field-value {
566 | color: var(--text-primary);
567 | font-size: 12px;
568 | flex: 1;
569 | text-align: right;
570 | word-break: break-word;
571 | font-family: 'JetBrains Mono', monospace;
572 | }
573 |
574 | .profile-image-container {
575 | display: flex;
576 | justify-content: center;
577 | margin: 15px 0;
578 | animation: scaleIn 0.6s ease-out;
579 | }
580 |
581 | .profile-image {
582 | width: 100px;
583 | height: 100px;
584 | border-radius: 50%;
585 | border: 3px solid var(--primary-color);
586 | object-fit: cover;
587 | box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
588 | transition: all 0.4s ease;
589 | }
590 |
591 | .profile-image:hover {
592 | transform: scale(1.1) rotate(5deg);
593 | box-shadow: 0 0 50px rgba(0, 255, 136, 0.6);
594 | }
595 |
596 | .profile-image-large {
597 | width: 140px;
598 | height: 140px;
599 | border-radius: 50%;
600 | border: 4px solid var(--primary-color);
601 | object-fit: cover;
602 | box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
603 | }
604 |
605 | /* WHATSAPP IMAGE STYLING */
606 | .whatsapp-image {
607 | width: 120px;
608 | height: 120px;
609 | border-radius: 15px;
610 | border: 3px solid #25D366;
611 | object-fit: cover;
612 | box-shadow: 0 0 30px rgba(37, 211, 102, 0.4);
613 | transition: all 0.4s ease;
614 | }
615 |
616 | .whatsapp-image:hover {
617 | transform: scale(1.1);
618 | box-shadow: 0 0 50px rgba(37, 211, 102, 0.6);
619 | }
620 |
621 | /* SERVICE SECTIONS POUR EMAILS */
622 | .service-section {
623 | background: rgba(0, 0, 0, 0.3);
624 | border-radius: 12px;
625 | padding: 18px;
626 | margin: 12px 0;
627 | border-left: 4px solid var(--primary-color);
628 | animation: slideInFromBottom 0.5s ease-out;
629 | }
630 |
631 | .service-section h4 {
632 | color: var(--primary-color);
633 | font-family: 'Orbitron', sans-serif;
634 | font-size: 14px;
635 | margin-bottom: 12px;
636 | display: flex;
637 | align-items: center;
638 | gap: 8px;
639 | }
640 |
641 | .services-grid {
642 | display: grid;
643 | grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
644 | gap: 10px;
645 | margin-top: 12px;
646 | }
647 |
648 | .service-item {
649 | background: rgba(0, 255, 136, 0.1);
650 | border: 1px solid rgba(0, 255, 136, 0.3);
651 | border-radius: 8px;
652 | padding: 10px 12px;
653 | text-align: center;
654 | font-size: 11px;
655 | transition: all 0.3s ease;
656 | }
657 |
658 | .service-item:hover {
659 | background: rgba(0, 255, 136, 0.2);
660 | transform: translateY(-2px);
661 | box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
662 | }
663 |
664 | .stats-grid {
665 | display: grid;
666 | grid-template-columns: repeat(3, 1fr);
667 | gap: 12px;
668 | margin-top: 12px;
669 | }
670 |
671 | .stat-item {
672 | background: rgba(0, 204, 255, 0.1);
673 | border: 1px solid rgba(0, 204, 255, 0.3);
674 | border-radius: 8px;
675 | padding: 12px;
676 | text-align: center;
677 | transition: all 0.3s ease;
678 | }
679 |
680 | .stat-item:hover {
681 | background: rgba(0, 204, 255, 0.2);
682 | transform: translateY(-2px);
683 | }
684 |
685 | .stat-value {
686 | font-family: 'Orbitron', sans-serif;
687 | font-size: 20px;
688 | font-weight: 700;
689 | color: var(--secondary-color);
690 | }
691 |
692 | .stat-label {
693 | font-size: 10px;
694 | color: var(--text-secondary);
695 | text-transform: uppercase;
696 | margin-top: 5px;
697 | }
698 |
699 | /* STYLES POUR LES STATUTS ANIMÉS */
700 | .status-positive {
701 | color: var(--success-color);
702 | background: rgba(0, 255, 68, 0.1);
703 | padding: 6px 10px;
704 | border-radius: 6px;
705 | border: 1px solid var(--success-color);
706 | animation: glowPulse 2s ease-in-out infinite;
707 | }
708 |
709 | .status-negative {
710 | color: var(--danger-color);
711 | background: rgba(255, 0, 76, 0.1);
712 | padding: 6px 10px;
713 | border-radius: 6px;
714 | border: 1px solid var(--danger-color);
715 | }
716 |
717 | .status-warning {
718 | color: var(--warning-color);
719 | background: rgba(255, 170, 0, 0.1);
720 | padding: 6px 10px;
721 | border-radius: 6px;
722 | border: 1px solid var(--warning-color);
723 | animation: glowPulse 1.5s ease-in-out infinite;
724 | }
725 |
726 | /* ÉCRAN D'AUTHENTIFICATION SYMÉTRIQUE AVEC ANIMATIONS */
727 | .auth-screen {
728 | min-height: 900px;
729 | display: flex;
730 | flex-direction: column;
731 | justify-content: center;
732 | align-items: center;
733 | padding: 30px 20px;
734 | animation: slideInFromTop 0.8s ease-out;
735 | }
736 |
737 | .auth-form-container {
738 | width: 100%;
739 | max-width: 450px;
740 | background: linear-gradient(135deg,
741 | rgba(20, 25, 40, 0.95) 0%,
742 | rgba(30, 35, 50, 0.95) 100%);
743 | border: 2px solid var(--border-color);
744 | border-radius: 20px;
745 | padding: 35px;
746 | box-shadow:
747 | 0 20px 60px rgba(0, 255, 136, 0.2),
748 | inset 0 0 50px rgba(0, 255, 136, 0.1);
749 | backdrop-filter: blur(15px);
750 | animation: scaleIn 0.8s ease-out 0.3s both;
751 | }
752 |
753 | .auth-title {
754 | font-family: 'Orbitron', sans-serif;
755 | font-size: 22px;
756 | color: var(--primary-color);
757 | text-align: center;
758 | margin-bottom: 10px;
759 | text-transform: uppercase;
760 | letter-spacing: 2px;
761 | background: linear-gradient(45deg, #00ff88, #00ccff);
762 | -webkit-background-clip: text;
763 | -webkit-text-fill-color: transparent;
764 | background-clip: text;
765 | animation: textShimmer 3s ease-in-out infinite;
766 | }
767 |
768 | .auth-subtitle {
769 | text-align: center;
770 | color: var(--text-secondary);
771 | font-size: 13px;
772 | margin-bottom: 30px;
773 | opacity: 0.9;
774 | animation: slideInFromBottom 0.6s ease-out 0.5s both;
775 | }
776 |
777 | .form-group {
778 | margin-bottom: 22px;
779 | animation: slideInFromBottom 0.6s ease-out 0.7s both;
780 | }
781 |
782 | .form-input {
783 | width: 100%;
784 | background: rgba(10, 14, 26, 0.9);
785 | border: 2px solid rgba(0, 255, 136, 0.3);
786 | border-radius: 12px;
787 | padding: 16px 18px;
788 | color: var(--text-primary);
789 | font-family: 'JetBrains Mono', monospace;
790 | font-size: 14px;
791 | transition: all 0.4s ease;
792 | backdrop-filter: blur(10px);
793 | }
794 |
795 | .form-input:focus {
796 | outline: none;
797 | border-color: var(--primary-color);
798 | background: rgba(0, 255, 136, 0.05);
799 | box-shadow:
800 | 0 0 30px rgba(0, 255, 136, 0.3),
801 | inset 0 0 15px rgba(0, 255, 136, 0.1);
802 | transform: scale(1.02);
803 | animation: glowPulse 2s ease-in-out infinite;
804 | }
805 |
806 | .auth-btn {
807 | width: 100%;
808 | background: var(--gradient-cyber);
809 | border: none;
810 | border-radius: 12px;
811 | padding: 16px;
812 | color: var(--bg-primary);
813 | font-family: 'Orbitron', sans-serif;
814 | font-weight: 700;
815 | font-size: 14px;
816 | cursor: pointer;
817 | text-transform: uppercase;
818 | letter-spacing: 2px;
819 | transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
820 | position: relative;
821 | overflow: hidden;
822 | box-shadow: 0 5px 25px rgba(0, 255, 136, 0.4);
823 | animation: slideInFromBottom 0.6s ease-out 0.9s both;
824 | }
825 |
826 | .auth-btn::before {
827 | content: '';
828 | position: absolute;
829 | top: 50%;
830 | left: 50%;
831 | width: 0;
832 | height: 0;
833 | background: rgba(255, 255, 255, 0.3);
834 | border-radius: 50%;
835 | transform: translate(-50%, -50%);
836 | transition: width 0.6s ease, height 0.6s ease;
837 | }
838 |
839 | .auth-btn:hover::before {
840 | width: 400px;
841 | height: 400px;
842 | }
843 |
844 | .auth-btn:hover {
845 | transform: translateY(-3px) scale(1.02);
846 | box-shadow:
847 | 0 10px 40px rgba(0, 255, 136, 0.6),
848 | 0 0 80px rgba(0, 255, 136, 0.3);
849 | }
850 |
851 | /* TERMS CONTAINER SYMÉTRIQUE */
852 | .terms-container {
853 | margin: 25px 0;
854 | display: flex;
855 | align-items: center;
856 | gap: 12px;
857 | padding: 15px;
858 | background: rgba(0, 255, 136, 0.05);
859 | border-radius: 10px;
860 | border: 1px solid rgba(0, 255, 136, 0.2);
861 | animation: slideInFromBottom 0.6s ease-out 1.1s both;
862 | }
863 |
864 | .terms-checkbox {
865 | width: 18px;
866 | height: 18px;
867 | accent-color: var(--primary-color);
868 | transform: scale(1.1);
869 | }
870 |
871 | .terms-label {
872 | font-size: 12px;
873 | color: var(--text-secondary);
874 | flex: 1;
875 | }
876 |
877 | .terms-label a {
878 | color: var(--primary-color);
879 | text-decoration: none;
880 | transition: all 0.3s ease;
881 | position: relative;
882 | }
883 |
884 | .terms-label a::after {
885 | content: '';
886 | position: absolute;
887 | bottom: -2px;
888 | left: 0;
889 | width: 0;
890 | height: 1px;
891 | background: var(--primary-color);
892 | transition: width 0.3s ease;
893 | }
894 |
895 | .terms-label a:hover::after {
896 | width: 100%;
897 | }
898 |
899 | .terms-label a:hover {
900 | text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
901 | }
902 |
903 | /* PAYEMENT SECTION AVEC ANIMATIONS */
904 | .payment-section {
905 | background: rgba(20, 25, 40, 0.95);
906 | border: 2px solid var(--secondary-color);
907 | border-radius: 15px;
908 | padding: 25px;
909 | margin-top: 25px;
910 | animation: scaleIn 0.6s ease-out;
911 | }
912 |
913 | .address-display {
914 | display: flex;
915 | align-items: center;
916 | gap: 12px;
917 | background: rgba(10, 14, 26, 0.9);
918 | border: 2px solid var(--secondary-color);
919 | border-radius: 10px;
920 | padding: 14px;
921 | margin-top: 10px;
922 | transition: all 0.3s ease;
923 | }
924 |
925 | .address-display:hover {
926 | border-color: var(--primary-color);
927 | box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
928 | }
929 |
930 | .qr-code {
931 | width: 220px;
932 | height: 220px;
933 | margin: 20px auto;
934 | display: block;
935 | border: 3px solid var(--secondary-color);
936 | border-radius: 15px;
937 | padding: 12px;
938 | background: white;
939 | animation: float 4s ease-in-out infinite;
940 | transition: all 0.4s ease;
941 | }
942 |
943 | .qr-code:hover {
944 | transform: scale(1.05);
945 | box-shadow: 0 0 40px rgba(0, 204, 255, 0.5);
946 | }
947 |
948 | /* HISTORY SECTION AMÉLIORÉE */
949 | .history-item {
950 | background: linear-gradient(135deg, rgba(20, 25, 40, 0.95) 0%, rgba(30, 35, 50, 0.95) 100%);
951 | border: 2px solid var(--border-color);
952 | border-radius: 12px;
953 | padding: 18px;
954 | margin-bottom: 15px;
955 | transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
956 | backdrop-filter: blur(10px);
957 | animation: slideInFromBottom 0.5s ease-out;
958 | }
959 |
960 | .history-item:hover {
961 | border-color: var(--primary-color);
962 | box-shadow: 0 8px 30px rgba(0, 255, 136, 0.2);
963 | transform: translateY(-3px);
964 | }
965 |
966 | .history-header {
967 | display: flex;
968 | justify-content: space-between;
969 | align-items: center;
970 | margin-bottom: 12px;
971 | padding-bottom: 10px;
972 | border-bottom: 1px solid rgba(0, 255, 136, 0.2);
973 | }
974 |
975 | .history-type {
976 | background: var(--gradient-cyber);
977 | -webkit-background-clip: text;
978 | -webkit-text-fill-color: transparent;
979 | background-clip: text;
980 | font-family: 'Orbitron', sans-serif;
981 | font-size: 14px;
982 | font-weight: 700;
983 | text-transform: uppercase;
984 | }
985 |
986 | .history-date {
987 | color: var(--text-secondary);
988 | font-size: 11px;
989 | font-family: 'JetBrains Mono', monospace;
990 | }
991 |
992 | .history-query {
993 | color: var(--text-primary);
994 | font-family: 'JetBrains Mono', monospace;
995 | font-size: 13px;
996 | margin-bottom: 8px;
997 | }
998 |
999 | /* CREDITS SECTION ANIMÉE */
1000 | .credits-section {
1001 | text-align: center;
1002 | animation: scaleIn 0.6s ease-out;
1003 | }
1004 |
1005 | .credits-balance {
1006 | background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 204, 255, 0.1) 100%);
1007 | border: 3px solid var(--primary-color);
1008 | border-radius: 20px;
1009 | padding: 30px;
1010 | margin-bottom: 30px;
1011 | animation: glowPulse 3s ease-in-out infinite;
1012 | }
1013 |
1014 | .balance-amount {
1015 | font-family: 'Orbitron', sans-serif;
1016 | font-size: 52px;
1017 | font-weight: 900;
1018 | color: var(--primary-color);
1019 | margin: 20px 0;
1020 | text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
1021 | animation: textShimmer 4s ease-in-out infinite;
1022 | }
1023 |
1024 | .credit-package {
1025 | background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
1026 | border: 2px solid var(--secondary-color);
1027 | border-radius: 15px;
1028 | padding: 25px;
1029 | margin-bottom: 25px;
1030 | transition: all 0.4s ease;
1031 | position: relative;
1032 | overflow: hidden;
1033 | }
1034 |
1035 | .credit-package::before {
1036 | content: '';
1037 | position: absolute;
1038 | top: -50%;
1039 | left: -50%;
1040 | width: 200%;
1041 | height: 200%;
1042 | background: linear-gradient(45deg, transparent, rgba(0, 204, 255, 0.1), transparent);
1043 | animation: float 6s linear infinite;
1044 | }
1045 |
1046 | .credit-package:hover {
1047 | transform: translateY(-5px);
1048 | box-shadow: 0 15px 40px rgba(0, 204, 255, 0.3);
1049 | }
1050 |
1051 | /* LOADING INDICATOR ANIMÉ */
1052 | .loading-container {
1053 | position: fixed;
1054 | top: 50%;
1055 | left: 50%;
1056 | transform: translate(-50%, -50%);
1057 | text-align: center;
1058 | z-index: 1000;
1059 | background: rgba(10, 14, 26, 0.98);
1060 | padding: 35px;
1061 | border-radius: 20px;
1062 | border: 3px solid var(--primary-color);
1063 | box-shadow:
1064 | 0 0 60px rgba(0, 255, 136, 0.5),
1065 | inset 0 0 30px rgba(0, 255, 136, 0.1);
1066 | backdrop-filter: blur(15px);
1067 | animation: glowPulse 2s ease-in-out infinite, scaleIn 0.5s ease-out;
1068 | }
1069 |
1070 | .loading-spinner {
1071 | width: 60px;
1072 | height: 60px;
1073 | margin: 0 auto 20px;
1074 | border: 4px solid rgba(0, 255, 136, 0.2);
1075 | border-top: 4px solid var(--primary-color);
1076 | border-radius: 50%;
1077 | animation: spin 1s linear infinite, glowPulse 2s ease-in-out infinite;
1078 | }
1079 |
1080 | @keyframes spin {
1081 | 0% { transform: rotate(0deg); }
1082 | 100% { transform: rotate(360deg); }
1083 | }
1084 |
1085 | .loading-text {
1086 | color: var(--primary-color);
1087 | font-family: 'Orbitron', sans-serif;
1088 | font-size: 14px;
1089 | text-transform: uppercase;
1090 | letter-spacing: 2px;
1091 | animation: textShimmer 2s ease-in-out infinite;
1092 | }
1093 |
1094 | /* FOOTER ANIMÉ */
1095 | .footer {
1096 | padding: 18px;
1097 | text-align: center;
1098 | border-top: 1px solid var(--border-color);
1099 | background: rgba(10, 14, 26, 0.95);
1100 | backdrop-filter: blur(10px);
1101 | animation: slideInFromBottom 0.6s ease-out 1.3s both;
1102 | }
1103 |
1104 | .credit-link {
1105 | color: var(--primary-color);
1106 | text-decoration: none;
1107 | font-family: 'Orbitron', sans-serif;
1108 | font-weight: 600;
1109 | transition: all 0.3s ease;
1110 | position: relative;
1111 | }
1112 |
1113 | .credit-link::after {
1114 | content: '';
1115 | position: absolute;
1116 | bottom: -2px;
1117 | left: 0;
1118 | width: 0;
1119 | height: 1px;
1120 | background: var(--primary-color);
1121 | transition: width 0.3s ease;
1122 | }
1123 |
1124 | .credit-link:hover::after {
1125 | width: 100%;
1126 | }
1127 |
1128 | .credit-link:hover {
1129 | text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
1130 | transform: scale(1.05);
1131 | }
1132 |
1133 | /* COUNTRY SELECTOR */
1134 | .country-selector {
1135 | margin-bottom: 15px;
1136 | }
1137 |
1138 | .country-select {
1139 | width: 100%;
1140 | background: rgba(20, 25, 40, 0.95);
1141 | border: 2px solid rgba(0, 255, 136, 0.3);
1142 | border-radius: 12px;
1143 | padding: 14px 16px;
1144 | color: var(--text-primary);
1145 | font-family: 'JetBrains Mono', monospace;
1146 | font-size: 13px;
1147 | transition: all 0.3s ease;
1148 | backdrop-filter: blur(10px);
1149 | }
1150 |
1151 | .country-select:focus {
1152 | outline: none;
1153 | border-color: var(--primary-color);
1154 | box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
1155 | }
1156 |
1157 | /* HISTORY CONTROLS */
1158 | .history-controls {
1159 | display: flex;
1160 | gap: 12px;
1161 | margin-bottom: 20px;
1162 | flex-wrap: wrap;
1163 | }
1164 |
1165 | /* MODAL STYLES */
1166 | .modal {
1167 | position: fixed;
1168 | top: 0;
1169 | left: 0;
1170 | width: 100%;
1171 | height: 100%;
1172 | background: rgba(0, 0, 0, 0.8);
1173 | display: flex;
1174 | justify-content: center;
1175 | align-items: center;
1176 | z-index: 2000;
1177 | }
1178 |
1179 | .modal-content {
1180 | background: var(--bg-card);
1181 | border: 2px solid var(--primary-color);
1182 | border-radius: 15px;
1183 | padding: 25px;
1184 | max-width: 500px;
1185 | width: 90%;
1186 | max-height: 80vh;
1187 | overflow-y: auto;
1188 | box-shadow: 0 0 50px rgba(0, 255, 136, 0.3);
1189 | }
1190 |
1191 | .modal-header {
1192 | display: flex;
1193 | justify-content: space-between;
1194 | align-items: center;
1195 | margin-bottom: 20px;
1196 | padding-bottom: 15px;
1197 | border-bottom: 1px solid var(--border-color);
1198 | }
1199 |
1200 | .close-modal {
1201 | font-size: 24px;
1202 | cursor: pointer;
1203 | color: var(--text-secondary);
1204 | transition: all 0.3s ease;
1205 | }
1206 |
1207 | .close-modal:hover {
1208 | color: var(--primary-color);
1209 | transform: scale(1.1);
1210 | }
1211 |
1212 | /* ERROR AND SUCCESS MESSAGES */
1213 | .error-message {
1214 | background: rgba(255, 0, 76, 0.1);
1215 | border: 1px solid var(--danger-color);
1216 | border-radius: 8px;
1217 | padding: 12px;
1218 | color: var(--danger-color);
1219 | margin: 10px 0;
1220 | }
1221 |
1222 | .success-message {
1223 | background: rgba(0, 255, 68, 0.1);
1224 | border: 1px solid var(--success-color);
1225 | border-radius: 8px;
1226 | padding: 12px;
1227 | color: var(--success-color);
1228 | margin: 10px 0;
1229 | }
1230 |
1231 | .auth-message.error {
1232 | background: rgba(255, 0, 76, 0.1);
1233 | border: 1px solid var(--danger-color);
1234 | border-radius: 8px;
1235 | padding: 12px;
1236 | color: var(--danger-color);
1237 | margin: 10px 0;
1238 | }
1239 |
1240 | .auth-message.success {
1241 | background: rgba(0, 255, 68, 0.1);
1242 | border: 1px solid var(--success-color);
1243 | border-radius: 8px;
1244 | padding: 12px;
1245 | color: var(--success-color);
1246 | margin: 10px 0;
1247 | }
1248 |
1249 | /* BADGES POUR INSEE */
1250 | .badge {
1251 | padding: 4px 8px;
1252 | border-radius: 6px;
1253 | font-size: 10px;
1254 | font-weight: 700;
1255 | text-transform: uppercase;
1256 | letter-spacing: 1px;
1257 | }
1258 |
1259 | .badge-siege {
1260 | background: rgba(0, 255, 136, 0.2);
1261 | color: var(--success-color);
1262 | border: 1px solid var(--success-color);
1263 | }
1264 |
1265 | .badge-secondaire {
1266 | background: rgba(0, 204, 255, 0.2);
1267 | color: var(--secondary-color);
1268 | border: 1px solid var(--secondary-color);
1269 | }
1270 |
1271 | /* GENDARMERIE LOGO */
1272 | .gendarmerie-logo {
1273 | width: 40px;
1274 | height: 40px;
1275 | object-fit: contain;
1276 | border-radius: 8px;
1277 | }
1278 |
1279 | /* RESPONSIVE DESIGN */
1280 | @media (max-width: 1250px) {
1281 | body {
1282 | width: 100%;
1283 | min-width: 1000px;
1284 | }
1285 | }
1286 |
1287 | @media (max-width: 768px) {
1288 | body {
1289 | min-width: 700px;
1290 | }
1291 |
1292 | .tab-navigation {
1293 | grid-template-columns: repeat(2, 1fr);
1294 | }
1295 |
1296 | .export-options {
1297 | grid-template-columns: 1fr;
1298 | }
1299 |
1300 | .search-options {
1301 | grid-template-columns: 1fr;
1302 | }
1303 | }
1304 |
1305 | @media (max-width: 480px) {
1306 | body {
1307 | min-width: 450px;
1308 | }
1309 |
1310 | .auth-form-container {
1311 | padding: 25px;
1312 | }
1313 |
1314 | .history-controls {
1315 | flex-direction: column;
1316 | }
1317 | }
--------------------------------------------------------------------------------
/popup.js:
--------------------------------------------------------------------------------
1 | // OsintX & Osint Sync - V
2 | // Developed by https://github.com/mixaoc
3 |
4 | const MAIN_API_URL = 'https://mixaoc.com/extension/api.php';
5 | const API2_URL = 'https://mixaoc.com/extension/api2.php';
6 | const GHUNT_SERVER_URL = 'http://147.185.221.224:27261';
7 |
8 | let userCredits = 0;
9 | let currentPaymentId = null;
10 | let particlesEnabled = true;
11 | let particlesAnimation = null;
12 |
13 | // Particles system
14 | class ParticlesSystem {
15 | constructor() {
16 | this.canvas = document.getElementById('particlesCanvas');
17 | this.ctx = this.canvas.getContext('2d');
18 | this.particles = [];
19 | this.maxParticles = 50;
20 | this.init();
21 | }
22 |
23 | init() {
24 | this.resize();
25 | window.addEventListener('resize', () => this.resize());
26 |
27 | // Create particles
28 | for (let i = 0; i < this.maxParticles; i++) {
29 | this.particles.push(this.createParticle());
30 | }
31 | }
32 |
33 | createParticle() {
34 | return {
35 | x: Math.random() * this.canvas.width,
36 | y: Math.random() * this.canvas.height,
37 | size: Math.random() * 3 + 1,
38 | speedX: (Math.random() - 0.5) * 2,
39 | speedY: (Math.random() - 0.5) * 2,
40 | color: `rgba(${Math.floor(Math.random() * 100 + 155)}, ${Math.floor(Math.random() * 255)}, ${Math.floor(Math.random() * 100 + 155)}, ${Math.random() * 0.5 + 0.2})`
41 | };
42 | }
43 |
44 | resize() {
45 | this.canvas.width = window.innerWidth;
46 | this.canvas.height = window.innerHeight;
47 | }
48 |
49 | update() {
50 | this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
51 |
52 | for (let i = 0; i < this.particles.length; i++) {
53 | const p = this.particles[i];
54 |
55 | // Update position
56 | p.x += p.speedX;
57 | p.y += p.speedY;
58 |
59 | // Bounce off walls
60 | if (p.x <= 0 || p.x >= this.canvas.width) p.speedX *= -1;
61 | if (p.y <= 0 || p.y >= this.canvas.height) p.speedY *= -1;
62 |
63 | // Draw particle
64 | this.ctx.beginPath();
65 | this.ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
66 | this.ctx.fillStyle = p.color;
67 | this.ctx.fill();
68 |
69 | // Draw connections
70 | for (let j = i + 1; j < this.particles.length; j++) {
71 | const p2 = this.particles[j];
72 | const dx = p.x - p2.x;
73 | const dy = p.y - p2.y;
74 | const distance = Math.sqrt(dx * dx + dy * dy);
75 |
76 | if (distance < 100) {
77 | this.ctx.beginPath();
78 | this.ctx.strokeStyle = `rgba(0, 255, 136, ${0.2 * (1 - distance / 100)})`;
79 | this.ctx.lineWidth = 0.5;
80 | this.ctx.moveTo(p.x, p.y);
81 | this.ctx.lineTo(p2.x, p2.y);
82 | this.ctx.stroke();
83 | }
84 | }
85 | }
86 | }
87 |
88 | start() {
89 | const animate = () => {
90 | if (particlesEnabled) {
91 | this.update();
92 | }
93 | particlesAnimation = requestAnimationFrame(animate);
94 | };
95 | animate();
96 | }
97 |
98 | stop() {
99 | if (particlesAnimation) {
100 | cancelAnimationFrame(particlesAnimation);
101 | particlesAnimation = null;
102 | }
103 | this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
104 | }
105 | }
106 |
107 | // Initialize particles system
108 | let particlesSystem;
109 |
110 | document.addEventListener('DOMContentLoaded', async function() {
111 | // Initialize particles
112 | particlesSystem = new ParticlesSystem();
113 | particlesSystem.start();
114 |
115 | // Screen references
116 | const authScreen = document.getElementById('authScreen');
117 | const mainScreen = document.getElementById('mainScreen');
118 |
119 | // Check if user is already logged in
120 | let authData;
121 | if (typeof browser !== 'undefined') {
122 | authData = await browser.storage.local.get(['userToken', 'username', 'isAuthenticated']);
123 | } else if (typeof chrome !== 'undefined') {
124 | authData = await new Promise((resolve) => {
125 | chrome.storage.local.get(['userToken', 'username', 'isAuthenticated'], resolve);
126 | });
127 | }
128 |
129 | if (authData.isAuthenticated && authData.userToken) {
130 | await showMainScreen(authData.username, authData.userToken);
131 | } else {
132 | authScreen.style.display = 'block';
133 | setupAuthHandlers();
134 | }
135 |
136 | async function showMainScreen(username, token) {
137 | authScreen.style.display = 'none';
138 | mainScreen.style.display = 'block';
139 |
140 | document.getElementById('userInfo').innerHTML = ` Connected: ${username}`;
141 | await loadUserCredits(token);
142 | initializeMainInterface(token);
143 | }
144 |
145 | async function loadUserCredits(token) {
146 | try {
147 | const response = await fetch(MAIN_API_URL, {
148 | method: 'POST',
149 | headers: {
150 | 'Content-Type': 'application/json',
151 | },
152 | body: JSON.stringify({
153 | action: 'getCredits',
154 | token: token
155 | })
156 | });
157 |
158 | const result = await response.json();
159 | if (result.success) {
160 | userCredits = result.credits;
161 | updateCreditsDisplay();
162 | }
163 | } catch (error) {
164 | console.error('Error loading credits:', error);
165 | }
166 | }
167 |
168 | function updateCreditsDisplay() {
169 | const creditsCount = document.getElementById('creditsCount');
170 | const balanceAmount = document.getElementById('balanceAmount');
171 |
172 | if (creditsCount) creditsCount.textContent = userCredits;
173 | if (balanceAmount) balanceAmount.textContent = userCredits;
174 | }
175 |
176 | function setupAuthHandlers() {
177 | const registerBtn = document.getElementById('registerBtn');
178 | const registerUsername = document.getElementById('registerUsername');
179 | const registerEmail = document.getElementById('registerEmail');
180 | const registerPassword = document.getElementById('registerPassword');
181 | const confirmPassword = document.getElementById('confirmPassword');
182 | const acceptTerms = document.getElementById('acceptTerms');
183 | const authMessage = document.getElementById('authMessage');
184 |
185 | registerBtn.addEventListener('click', handleRegister);
186 |
187 | [registerUsername, registerEmail, registerPassword, confirmPassword].forEach(input => {
188 | input.addEventListener('keypress', (e) => {
189 | if (e.key === 'Enter') {
190 | handleRegister();
191 | }
192 | });
193 | });
194 |
195 | async function handleRegister() {
196 | const username = registerUsername.value.trim();
197 | const email = registerEmail.value.trim();
198 | const password = registerPassword.value.trim();
199 | const confirm = confirmPassword.value.trim();
200 | const accepted = acceptTerms.checked;
201 |
202 | if (!username || !email || !password || !confirm) {
203 | showAuthMessage('Please fill all fields', 'error');
204 | return;
205 | }
206 |
207 | if (password !== confirm) {
208 | showAuthMessage('Passwords do not match', 'error');
209 | return;
210 | }
211 |
212 | if (password.length < 4) {
213 | showAuthMessage('Password must contain at least 4 characters', 'error');
214 | return;
215 | }
216 |
217 | if (username.length < 3) {
218 | showAuthMessage('Username must contain at least 3 characters', 'error');
219 | return;
220 | }
221 |
222 | if (!accepted) {
223 | showAuthMessage('You must accept the privacy policy and terms of service', 'error');
224 | return;
225 | }
226 |
227 | setAuthButtonLoading(true);
228 |
229 | try {
230 | const response = await fetch(MAIN_API_URL, {
231 | method: 'POST',
232 | headers: {
233 | 'Content-Type': 'application/json',
234 | },
235 | body: JSON.stringify({
236 | action: 'register',
237 | username: username,
238 | password: password,
239 | email: email,
240 | accepted_terms: true
241 | })
242 | });
243 |
244 | const result = await response.json();
245 |
246 | if (result.success) {
247 | showAuthMessage('Account created successfully! Redirecting...', 'success');
248 |
249 | if (typeof browser !== 'undefined') {
250 | await browser.storage.local.set({
251 | userToken: result.token,
252 | username: result.username,
253 | isAuthenticated: true
254 | });
255 | } else if (typeof chrome !== 'undefined') {
256 | await new Promise((resolve) => {
257 | chrome.storage.local.set({
258 | userToken: result.token,
259 | username: result.username,
260 | isAuthenticated: true
261 | }, resolve);
262 | });
263 | }
264 |
265 | setTimeout(() => {
266 | showMainScreen(result.username, result.token);
267 | }, 1500);
268 | } else {
269 | showAuthMessage(result.message || 'Error during account creation', 'error');
270 | }
271 | } catch (error) {
272 | console.error('Registration error:', error);
273 | showAuthMessage('Server connection error', 'error');
274 | } finally {
275 | setAuthButtonLoading(false);
276 | }
277 | }
278 |
279 | function showAuthMessage(message, type) {
280 | const authMessage = document.getElementById('authMessage');
281 | authMessage.textContent = message;
282 | authMessage.className = `auth-message ${type}`;
283 | authMessage.style.display = 'block';
284 | }
285 |
286 | function setAuthButtonLoading(loading) {
287 | const btn = document.getElementById('registerBtn');
288 | if (loading) {
289 | btn.disabled = true;
290 | btn.innerHTML = 'CREATING ACCOUNT...';
291 | } else {
292 | btn.disabled = false;
293 | btn.innerHTML = 'CREATE ACCOUNT AND START';
294 | }
295 | }
296 | }
297 |
298 | function initializeMainInterface(token) {
299 | const searchUsernameBtn = document.getElementById('searchUsernameBtn');
300 | const searchEmailBtn = document.getElementById('searchEmailBtn');
301 | const searchPhoneBtn = document.getElementById('searchPhoneBtn');
302 | const searchFullnameBtn = document.getElementById('searchFullnameBtn');
303 | const refreshHistoryBtn = document.getElementById('refreshHistoryBtn');
304 | const clearHistoryBtn = document.getElementById('clearHistoryBtn');
305 | const purchaseBtn = document.getElementById('purchaseBtn');
306 | const copyAddressBtn = document.getElementById('copyAddressBtn');
307 | const verifyPaymentBtn = document.getElementById('verifyPaymentBtn');
308 | const exportBtn = document.getElementById('exportBtn');
309 |
310 | // Export buttons
311 | const exportUsernameBtn = document.getElementById('exportUsernameBtn');
312 | const exportEmailBtn = document.getElementById('exportEmailBtn');
313 | const exportPhoneBtn = document.getElementById('exportPhoneBtn');
314 | const exportFullnameBtn = document.getElementById('exportFullnameBtn');
315 | const exportHistoryBtn = document.getElementById('exportHistoryBtn');
316 | const exportUsernameAllBtn = document.getElementById('exportUsernameAllBtn');
317 | const exportEmailAllBtn = document.getElementById('exportEmailAllBtn');
318 | const exportPhoneAllBtn = document.getElementById('exportPhoneAllBtn');
319 | const exportFullnameAllBtn = document.getElementById('exportFullnameAllBtn');
320 | const exportCompleteHistoryBtn = document.getElementById('exportCompleteHistoryBtn');
321 |
322 | const usernameInput = document.getElementById('usernameInput');
323 | const emailInput = document.getElementById('emailInput');
324 | const phoneInput = document.getElementById('phoneInput');
325 | const fullnameInput = document.getElementById('fullnameInput');
326 | const countryCode = document.getElementById('countryCode');
327 | const searchType = document.getElementById('searchType');
328 | const postalCode = document.getElementById('postalCode');
329 |
330 | const loadingIndicator = document.getElementById('loadingIndicator');
331 | const logoutBtn = document.getElementById('logoutBtn');
332 | const cooldownNotice = document.getElementById('cooldownNotice');
333 |
334 | // Initialize tabs
335 | initializeTabs(token);
336 |
337 | // Logout
338 | logoutBtn.addEventListener('click', async () => {
339 | if (typeof browser !== 'undefined') {
340 | await browser.storage.local.clear();
341 | } else if (typeof chrome !== 'undefined') {
342 | await new Promise((resolve) => {
343 | chrome.storage.local.clear(resolve);
344 | });
345 | }
346 | location.reload();
347 | });
348 |
349 | // Export tab
350 | exportBtn.addEventListener('click', () => {
351 | // Switch to export tab
352 | document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active'));
353 | document.querySelectorAll('.tab-content').forEach(content => content.style.display = 'none');
354 |
355 | exportBtn.classList.add('active');
356 | document.getElementById('exportTab').style.display = 'block';
357 | });
358 |
359 | // Search events
360 | searchUsernameBtn.addEventListener('click', () => {
361 | const username = usernameInput.value.trim();
362 | if (username) {
363 | performUsernameSearch(username, token);
364 | }
365 | });
366 |
367 | searchEmailBtn.addEventListener('click', () => {
368 | const email = emailInput.value.trim();
369 | if (email) {
370 | performEmailSearch(email, token);
371 | }
372 | });
373 |
374 | searchPhoneBtn.addEventListener('click', () => {
375 | const phone = phoneInput.value.trim();
376 | const country = countryCode.value;
377 | if (phone) {
378 | performPhoneSearch(phone, country, token);
379 | }
380 | });
381 |
382 | searchFullnameBtn.addEventListener('click', () => {
383 | const fullname = fullnameInput.value.trim();
384 | const type = searchType.value;
385 | const postal = postalCode.value.trim();
386 | if (fullname) {
387 | performFullnameSearch(fullname, type, postal, token);
388 | }
389 | });
390 |
391 | refreshHistoryBtn.addEventListener('click', () => {
392 | loadHistory(token);
393 | });
394 |
395 | clearHistoryBtn.addEventListener('click', () => {
396 | clearHistory(token);
397 | });
398 |
399 | // Purchase events
400 | purchaseBtn.addEventListener('click', () => {
401 | openTelegram();
402 | });
403 |
404 | copyAddressBtn.addEventListener('click', () => {
405 | copyToClipboard(document.getElementById('ltcAddress').textContent);
406 | });
407 |
408 | verifyPaymentBtn.addEventListener('click', () => {
409 | verifyPayment(currentPaymentId, token);
410 | });
411 |
412 | // Export events
413 | exportUsernameBtn.addEventListener('click', () => {
414 | exportResults('username');
415 | });
416 |
417 | exportEmailBtn.addEventListener('click', () => {
418 | exportResults('email');
419 | });
420 |
421 | exportPhoneBtn.addEventListener('click', () => {
422 | exportResults('phone');
423 | });
424 |
425 | exportFullnameBtn.addEventListener('click', () => {
426 | exportResults('fullname');
427 | });
428 |
429 | exportHistoryBtn.addEventListener('click', () => {
430 | exportHistory();
431 | });
432 |
433 | exportUsernameAllBtn.addEventListener('click', () => {
434 | exportResults('username', true);
435 | });
436 |
437 | exportEmailAllBtn.addEventListener('click', () => {
438 | exportResults('email', true);
439 | });
440 |
441 | exportPhoneAllBtn.addEventListener('click', () => {
442 | exportResults('phone', true);
443 | });
444 |
445 | exportFullnameAllBtn.addEventListener('click', () => {
446 | exportResults('fullname', true);
447 | });
448 |
449 | exportCompleteHistoryBtn.addEventListener('click', () => {
450 | exportCompleteHistory(token);
451 | });
452 |
453 | // Enter key events
454 | usernameInput.addEventListener('keypress', (e) => {
455 | if (e.key === 'Enter') {
456 | const username = usernameInput.value.trim();
457 | if (username) {
458 | performUsernameSearch(username, token);
459 | }
460 | }
461 | });
462 |
463 | emailInput.addEventListener('keypress', (e) => {
464 | if (e.key === 'Enter') {
465 | const email = emailInput.value.trim();
466 | if (email) {
467 | performEmailSearch(email, token);
468 | }
469 | }
470 | });
471 |
472 | phoneInput.addEventListener('keypress', (e) => {
473 | if (e.key === 'Enter') {
474 | const phone = phoneInput.value.trim();
475 | const country = countryCode.value;
476 | if (phone) {
477 | performPhoneSearch(phone, country, token);
478 | }
479 | }
480 | });
481 |
482 | fullnameInput.addEventListener('keypress', (e) => {
483 | if (e.key === 'Enter') {
484 | const fullname = fullnameInput.value.trim();
485 | const type = searchType.value;
486 | const postal = postalCode.value.trim();
487 | if (fullname) {
488 | performFullnameSearch(fullname, type, postal, token);
489 | }
490 | }
491 | });
492 |
493 | // Search type change
494 | searchType.addEventListener('change', function() {
495 | const postalCodeGroup = document.getElementById('postalCodeGroup');
496 | if (this.value === 'insee') {
497 | postalCodeGroup.style.display = 'flex';
498 | } else {
499 | postalCodeGroup.style.display = 'none';
500 | }
501 | });
502 |
503 | // Input validation
504 | usernameInput.addEventListener('input', (e) => {
505 | const value = e.target.value;
506 | const regex = /^[a-zA-Z0-9_\-\.]*$/;
507 | if (!regex.test(value)) {
508 | e.target.value = value.slice(0, -1);
509 | }
510 | });
511 |
512 | // Remove automatic phone formatting
513 | phoneInput.addEventListener('input', function() {
514 | this.value = this.value.replace(/[^\d+]/g, '');
515 | });
516 |
517 | function initializeTabs(userToken) {
518 | const tabBtns = document.querySelectorAll('.tab-btn[data-tab]');
519 | const tabContents = document.querySelectorAll('.tab-content');
520 |
521 | tabContents.forEach(tab => {
522 | tab.style.display = 'none';
523 | });
524 |
525 | const activeTab = document.querySelector('.tab-btn.active');
526 | if (activeTab) {
527 | const tabName = activeTab.getAttribute('data-tab');
528 | const tabContent = document.getElementById(`${tabName}Tab`);
529 | if (tabContent) {
530 | tabContent.style.display = 'block';
531 | }
532 | }
533 |
534 | tabBtns.forEach(btn => {
535 | btn.addEventListener('click', () => {
536 | const tabName = btn.getAttribute('data-tab');
537 |
538 | tabBtns.forEach(b => b.classList.remove('active'));
539 | tabContents.forEach(t => t.style.display = 'none');
540 |
541 | btn.classList.add('active');
542 | const tabContent = document.getElementById(`${tabName}Tab`);
543 | if (tabContent) {
544 | tabContent.style.display = 'block';
545 | }
546 |
547 | if (tabName === 'history') {
548 | loadHistory(userToken);
549 | }
550 |
551 | clearResults();
552 | });
553 | });
554 | }
555 |
556 | function clearResults() {
557 | document.getElementById('usernameResults').innerHTML = '';
558 | document.getElementById('emailResults').innerHTML = '';
559 | document.getElementById('phoneResults').innerHTML = '';
560 | document.getElementById('fullnameResults').innerHTML = '';
561 | }
562 |
563 | // Cooldown management
564 | function showCooldown(seconds) {
565 | cooldownNotice.style.display = 'block';
566 | const timerElement = document.getElementById('cooldownTimer');
567 | timerElement.textContent = seconds;
568 |
569 | const countdown = setInterval(() => {
570 | seconds--;
571 | timerElement.textContent = seconds;
572 |
573 | if (seconds <= 0) {
574 | clearInterval(countdown);
575 | cooldownNotice.style.display = 'none';
576 | }
577 | }, 1000);
578 | }
579 |
580 | // Telegram function
581 | function openTelegram() {
582 | const telegramUrl = 'https://t.me/+TcNkRGkKodBjNzI8';
583 | const telegramAppUrl = 'tg://resolve?domain=osintx';
584 |
585 | // Try to open Telegram app first
586 | window.open(telegramAppUrl, '_blank');
587 |
588 | // Fallback to web after a short delay
589 | setTimeout(() => {
590 | window.open(telegramUrl, '_blank');
591 | }, 500);
592 | }
593 |
594 | // Payment functions
595 | async function initiatePayment(userToken) {
596 | try {
597 | const response = await fetch(MAIN_API_URL, {
598 | method: 'POST',
599 | headers: {
600 | 'Content-Type': 'application/json',
601 | },
602 | body: JSON.stringify({
603 | action: 'processPayment',
604 | token: userToken,
605 | paymentData: {
606 | amount: 5,
607 | credits: 1000
608 | }
609 | })
610 | });
611 |
612 | const result = await response.json();
613 | if (result.success) {
614 | currentPaymentId = result.payment_id;
615 | document.getElementById('paymentId').textContent = result.payment_id;
616 | document.getElementById('paymentSection').style.display = 'block';
617 | document.querySelector('.purchase-section').style.display = 'none';
618 | } else {
619 | alert('Payment initiation failed: ' + result.message);
620 | }
621 | } catch (error) {
622 | console.error('Payment error:', error);
623 | alert('Payment error: ' + error.message);
624 | }
625 | }
626 |
627 | async function verifyPayment(paymentId, userToken) {
628 | if (!paymentId) {
629 | alert('No payment to verify');
630 | return;
631 | }
632 |
633 | try {
634 | const response = await fetch(MAIN_API_URL, {
635 | method: 'POST',
636 | headers: {
637 | 'Content-Type': 'application/json',
638 | },
639 | body: JSON.stringify({
640 | action: 'verifyPayment',
641 | token: userToken,
642 | paymentId: paymentId
643 | })
644 | });
645 |
646 | const result = await response.json();
647 | if (result.success) {
648 | alert('Payment verified! ' + result.message);
649 | userCredits = result.credits;
650 | updateCreditsDisplay();
651 | document.getElementById('paymentSection').style.display = 'none';
652 | document.querySelector('.purchase-section').style.display = 'block';
653 | } else {
654 | alert('Payment verification failed: ' + result.message);
655 | }
656 | } catch (error) {
657 | console.error('Verification error:', error);
658 | alert('Verification error: ' + error.message);
659 | }
660 | }
661 |
662 | function copyToClipboard(text) {
663 | navigator.clipboard.writeText(text).then(() => {
664 | const btn = document.getElementById('copyAddressBtn');
665 | const originalHtml = btn.innerHTML;
666 | btn.innerHTML = '';
667 | setTimeout(() => {
668 | btn.innerHTML = originalHtml;
669 | }, 2000);
670 | });
671 | }
672 |
673 | // Export functions
674 | function exportResults(type, allResults = false) {
675 | let resultsContainer;
676 | let title;
677 |
678 | switch(type) {
679 | case 'username':
680 | resultsContainer = document.getElementById('usernameResults');
681 | title = 'Username Search Results';
682 | break;
683 | case 'email':
684 | resultsContainer = document.getElementById('emailResults');
685 | title = 'Email Analysis Results';
686 | break;
687 | case 'phone':
688 | resultsContainer = document.getElementById('phoneResults');
689 | title = 'Phone Number Search Results';
690 | break;
691 | case 'fullname':
692 | resultsContainer = document.getElementById('fullnameResults');
693 | title = 'Full Name Search Results';
694 | break;
695 | default:
696 | return;
697 | }
698 |
699 | if (!resultsContainer || resultsContainer.children.length === 0) {
700 | alert('No results to export');
701 | return;
702 | }
703 |
704 | const htmlContent = generateExportHTML(title, resultsContainer.innerHTML);
705 | downloadHTML(htmlContent, `osintx-${type}-${new Date().toISOString().slice(0, 10)}.html`);
706 | }
707 |
708 | function exportHistory() {
709 | const historyContainer = document.getElementById('historyResults');
710 | if (!historyContainer || historyContainer.children.length === 0) {
711 | alert('No history to export');
712 | return;
713 | }
714 |
715 | const htmlContent = generateExportHTML('Search History', historyContainer.innerHTML);
716 | downloadHTML(htmlContent, `osintx-history-${new Date().toISOString().slice(0, 10)}.html`);
717 | }
718 |
719 | async function exportCompleteHistory(token) {
720 | try {
721 | const response = await fetch(MAIN_API_URL, {
722 | method: 'POST',
723 | headers: {
724 | 'Content-Type': 'application/json',
725 | },
726 | body: JSON.stringify({
727 | action: 'getHistory',
728 | token: token
729 | })
730 | });
731 |
732 | const result = await response.json();
733 | if (result.success && result.history) {
734 | let historyHTML = '';
735 | result.history.forEach(item => {
736 | historyHTML += `
737 |
738 |
742 |
743 | Query: ${item.query}
744 |
745 |
746 | `;
747 | });
748 |
749 | const htmlContent = generateExportHTML('Complete Search History', historyHTML);
750 | downloadHTML(htmlContent, `osintx-complete-history-${new Date().toISOString().slice(0, 10)}.html`);
751 | } else {
752 | alert('No history data available for export');
753 | }
754 | } catch (error) {
755 | console.error('Export history error:', error);
756 | alert('Error exporting complete history');
757 | }
758 | }
759 |
760 | function generateExportHTML(title, content) {
761 | // Liste des GIFs (copiez la même liste que dans l'ancienne version)
762 | const gifs = [
763 | 'https://i.pinimg.com/originals/76/aa/24/76aa24bf1e433a13444c18c5df7b839b.gif',
764 | 'https://mir-s3-cdn-cf.behance.net/project_modules/fs/9bc27292880429.5e569ff84e4d0.gif',
765 | // ... (coller tous les autres URLs)
766 | 'https://cdn.wallpapersafari.com/97/7/RjvkGQ.gif'
767 | ];
768 |
769 | // Sélection aléatoire d'un GIF
770 | const randomGif = gifs[Math.floor(Math.random() * gifs.length)];
771 |
772 | return `
773 |
774 |
775 |
776 |
777 |
778 | ${title} - Osint Sync by Mixaoc
779 |
866 |
867 |
868 |
872 |
873 | ${content}
874 |
875 |
879 |
880 | `;
881 | }
882 |
883 | function downloadHTML(content, filename) {
884 | const blob = new Blob([content], { type: 'text/html' });
885 | const url = URL.createObjectURL(blob);
886 | const a = document.createElement('a');
887 | a.href = url;
888 | a.download = filename;
889 | document.body.appendChild(a);
890 | a.click();
891 | document.body.removeChild(a);
892 | URL.revokeObjectURL(url);
893 | }
894 | }
895 |
896 | // FULL NAME SEARCH FUNCTIONALITY
897 | async function performFullnameSearch(fullname, type, postalCode, token) {
898 | const resultsContainer = document.getElementById('fullnameResults');
899 | resultsContainer.innerHTML = '';
900 | loadingIndicator.style.display = 'block';
901 |
902 | const logResult = await logSearch('fullname', `${fullname} (${type})`, token);
903 | if (!logResult.success) {
904 | loadingIndicator.style.display = 'none';
905 | resultsContainer.innerHTML = `${logResult.message}
`;
906 | if (logResult.message.includes('wait')) {
907 | showCooldown(30);
908 | }
909 | return;
910 | }
911 |
912 | if (logResult.credits_remaining !== undefined) {
913 | userCredits = logResult.credits_remaining;
914 | updateCreditsDisplay();
915 | }
916 |
917 | try {
918 | const response = await fetch(API2_URL, {
919 | method: 'POST',
920 | headers: {
921 | 'Content-Type': 'application/json',
922 | },
923 | body: JSON.stringify({
924 | action: 'searchFullname',
925 | type: type,
926 | query: fullname,
927 | postalCode: postalCode,
928 | token: token
929 | })
930 | });
931 |
932 | const result = await response.json();
933 |
934 | if (result.success) {
935 | if (type === 'insee') {
936 | displayInseeResults(result.data);
937 | } else if (type === 'facebook') {
938 | displayFacebookResults(result.data);
939 | }
940 | await saveToHistory('fullname', `${fullname} (${type})`, result.data, token);
941 | } else {
942 | resultsContainer.innerHTML = `${result.message || 'Full name search failed'}
`;
943 | }
944 | } catch (error) {
945 | console.error('Full name search error:', error);
946 | resultsContainer.innerHTML = 'Error connecting to server
';
947 | }
948 |
949 | loadingIndicator.style.display = 'none';
950 | }
951 |
952 | function displayInseeResults(data) {
953 | const resultsContainer = document.getElementById('fullnameResults');
954 |
955 | if (!data.etablissements || data.etablissements.length === 0) {
956 | resultsContainer.innerHTML = 'Aucun résultat trouvé dans la base SIRENE
';
957 | return;
958 | }
959 |
960 | const card = document.createElement('div');
961 | card.className = 'platform-card';
962 |
963 | let html = `
964 |
969 |
970 |
971 | Total Results:
972 | ${data.header.total}
973 |
974 |
975 | `;
976 |
977 | data.etablissements.forEach(etab => {
978 | const uniteLegale = etab.uniteLegale || {};
979 | const adresse = etab.adresseEtablissement || {};
980 | const periode = etab.periodesEtablissement?.[0] || {};
981 | const caracteristiques = etab.caracteristiquesEtablissement || {};
982 | const activite = etab.activitePrincipaleEtablissement || {};
983 |
984 | // DÉTERMINER LE TYPE D'ENTITÉ
985 | let typeEntite = 'Entreprise';
986 | let nomAffichage = '';
987 |
988 | if (uniteLegale.categorieJuridiqueUniteLegale) {
989 | const catJuridique = parseInt(uniteLegale.categorieJuridiqueUniteLegale);
990 | if (catJuridique >= 1000 && catJuridique <= 1999) {
991 | typeEntite = 'Personne morale';
992 | } else if (catJuridique >= 2000 && catJuridique <= 2999) {
993 | typeEntite = 'Personne physique';
994 | } else if (catJuridique >= 3000 && catJuridique <= 3999) {
995 | typeEntite = 'Personne morale étrangère';
996 | } else if (catJuridique >= 5000 && catJuridique <= 5999) {
997 | typeEntite = 'Collectivité territoriale';
998 | } else if (catJuridique >= 6000 && catJuridique <= 6999) {
999 | typeEntite = 'Établissement public';
1000 | }
1001 | }
1002 |
1003 | // CONSTRUIRE LE NOM D'AFFICHAGE
1004 | if (uniteLegale.denominationUniteLegale) {
1005 | nomAffichage = uniteLegale.denominationUniteLegale;
1006 | } else if (uniteLegale.denominationUsuelle1UniteLegale) {
1007 | nomAffichage = uniteLegale.denominationUsuelle1UniteLegale;
1008 | } else if (uniteLegale.nomUniteLegale && uniteLegale.prenom1UniteLegale) {
1009 | nomAffichage = `${uniteLegale.prenom1UniteLegale} ${uniteLegale.nomUniteLegale}`;
1010 | } else if (uniteLegale.nomUniteLegale) {
1011 | nomAffichage = uniteLegale.nomUniteLegale;
1012 | } else {
1013 | nomAffichage = 'Non renseigné';
1014 | }
1015 |
1016 | const isSiege = etab.etablissementSiege;
1017 | const badge = isSiege ? 'SIÈGE' : 'SECONDAIRE';
1018 |
1019 | html += `
1020 |
1021 |
${nomAffichage} ${badge}
1022 |
1023 |
1024 |
1025 | Type:
1026 | ${typeEntite}
1027 |
1028 |
1029 |
1030 | ${uniteLegale.nomUniteLegale || uniteLegale.prenom1UniteLegale ? `
1031 |
1032 | Nom:
1033 | ${uniteLegale.nomUniteLegale || 'N/A'}
1034 |
1035 |
1036 | Prénom:
1037 | ${uniteLegale.prenom1UniteLegale || 'N/A'}
1038 |
1039 | ` : ''}
1040 |
1041 |
1042 |
1043 | SIRET:
1044 | ${etab.siret || 'N/A'}
1045 |
1046 |
1047 | SIREN:
1048 | ${etab.siren || 'N/A'}
1049 |
1050 |
1051 |
1052 |
1053 | Activité (NAF):
1054 | ${periode.activitePrincipaleEtablissement || activite.libelle || 'N/A'}
1055 |
1056 |
1057 |
1058 | ${uniteLegale.categorieJuridiqueUniteLegale ? `
1059 |
1060 | Catégorie juridique:
1061 | ${uniteLegale.categorieJuridiqueUniteLegale} - ${getCategorieJuridique(uniteLegale.categorieJuridiqueUniteLegale)}
1062 |
1063 | ` : ''}
1064 |
1065 |
1066 |
1067 | État:
1068 |
1069 | ${periode.etatAdministratifEtablissement === 'A' ? '✅ Actif' : '❌ Fermé'}
1070 |
1071 |
1072 |
1073 |
1074 |
1075 | Date création:
1076 | ${etab.dateCreationEtablissement ? new Date(etab.dateCreationEtablissement).toLocaleDateString('fr-FR') : 'N/A'}
1077 |
1078 |
1079 | ${uniteLegale.dateDernierTraitementUniteLegale ? `
1080 |
1081 | Dernière mise à jour:
1082 | ${new Date(uniteLegale.dateDernierTraitementUniteLegale).toLocaleDateString('fr-FR')}
1083 |
1084 | ` : ''}
1085 |
1086 |
1087 | ${caracteristiques.trancheEffectifsEtablissement ? `
1088 |
1089 | Tranche effectifs:
1090 | ${getTrancheEffectifs(caracteristiques.trancheEffectifsEtablissement)}
1091 |
1092 | ` : ''}
1093 |
1094 |
1095 |
1096 | Adresse complète:
1097 | ${formatInseeAdresse(adresse)}
1098 |
1099 |
1100 | `;
1101 | });
1102 |
1103 | html += `
1104 |
1105 | Source:
1106 | Database data.gouv_sirt.sql
1107 |
1108 | `;
1109 |
1110 | card.innerHTML = html;
1111 | resultsContainer.appendChild(card);
1112 | }
1113 |
1114 | // FONCTIONS UTILITAIRES POUR LES DONNÉES INSEE
1115 | function getCategorieJuridique(code) {
1116 | const categories = {
1117 | '1000': 'Entreprise individuelle',
1118 | '2110': 'SARL',
1119 | '2210': 'SA',
1120 | '2220': 'SAS',
1121 | '3110': 'EURL',
1122 | '3120': 'SELARL',
1123 | '3200': 'Société en nom collectif',
1124 | '5210': 'SCOP',
1125 | '5310': 'Coopérative',
1126 | '5499': 'Association',
1127 | '5720': 'Groupement d\'intérêt économique',
1128 | '6510': 'Société civile',
1129 | '6520': 'Société civile immobilière',
1130 | '6530': 'Société civile professionnelle',
1131 | '6540': 'Société civile de moyens'
1132 | };
1133 | return categories[code] || 'Autre';
1134 | }
1135 |
1136 | function getTrancheEffectifs(code) {
1137 | const effectifs = {
1138 | '00': '0 salarié',
1139 | '01': '1 ou 2 salariés',
1140 | '02': '3 à 5 salariés',
1141 | '03': '6 à 9 salariés',
1142 | '11': '10 à 19 salariés',
1143 | '12': '20 à 49 salariés',
1144 | '21': '50 à 99 salariés',
1145 | '22': '100 à 199 salariés',
1146 | '31': '200 à 249 salariés',
1147 | '32': '250 à 499 salariés',
1148 | '41': '500 à 999 salariés',
1149 | '42': '1000 à 1999 salariés',
1150 | '51': '2000 à 4999 salariés',
1151 | '52': '5000 à 9999 salariés',
1152 | '53': '10000 salariés et plus'
1153 | };
1154 | return effectifs[code] || 'Non renseigné';
1155 | }
1156 |
1157 | function formatInseeAdresse(adresse) {
1158 | const parts = [
1159 | [adresse.numeroVoieEtablissement, adresse.typeVoieEtablissement, adresse.libelleVoieEtablissement].filter(Boolean).join(' '),
1160 | adresse.complementAdresseEtablissement,
1161 | [adresse.codePostalEtablissement, adresse.libelleCommuneEtablissement].filter(Boolean).join(' ')
1162 | ].filter(Boolean);
1163 | return parts.join(', ') || 'Non renseignée';
1164 | }
1165 |
1166 | // USERNAME SEARCH WITH ALL APIS
1167 | async function performUsernameSearch(username, token) {
1168 | const resultsContainer = document.getElementById('usernameResults');
1169 | resultsContainer.innerHTML = '';
1170 | loadingIndicator.style.display = 'block';
1171 |
1172 | const logResult = await logSearch('username', username, token);
1173 | if (!logResult.success) {
1174 | loadingIndicator.style.display = 'none';
1175 | resultsContainer.innerHTML = `${logResult.message}
`;
1176 | if (logResult.message.includes('wait')) {
1177 | showCooldown(30);
1178 | }
1179 | return;
1180 | }
1181 |
1182 | if (logResult.credits_remaining !== undefined) {
1183 | userCredits = logResult.credits_remaining;
1184 | updateCreditsDisplay();
1185 | }
1186 |
1187 | const searches = [
1188 | searchGravatar(username),
1189 | searchGitHub(username),
1190 | searchReddit(username),
1191 | searchTwitch(username),
1192 | searchMinecraft(username),
1193 | searchSteam(username),
1194 | searchXbox(username),
1195 | searchInstagramAPI(username),
1196 | searchTwitter(username),
1197 | searchFacebook(username),
1198 | searchYouTube(username),
1199 | searchTikTok(username),
1200 | searchThreadsAPI(username),
1201 | searchSnapchatAPI(username)
1202 | ];
1203 |
1204 | try {
1205 | await Promise.allSettled(searches);
1206 | } catch (error) {
1207 | console.error('Search error:', error);
1208 | resultsContainer.innerHTML = 'Search error
';
1209 | }
1210 |
1211 | loadingIndicator.style.display = 'none';
1212 |
1213 | if (resultsContainer.innerHTML === '') {
1214 | resultsContainer.innerHTML = 'No results found for this username
';
1215 | }
1216 | }
1217 |
1218 | // EMAIL SEARCH
1219 | async function performEmailSearch(email, token) {
1220 | const resultsContainer = document.getElementById('emailResults');
1221 | resultsContainer.innerHTML = '';
1222 | loadingIndicator.style.display = 'block';
1223 |
1224 | const logResult = await logSearch('email', email, token);
1225 | if (!logResult.success) {
1226 | loadingIndicator.style.display = 'none';
1227 | resultsContainer.innerHTML = `${logResult.message}
`;
1228 | if (logResult.message.includes('wait')) {
1229 | showCooldown(30);
1230 | }
1231 | return;
1232 | }
1233 |
1234 | if (logResult.credits_remaining !== undefined) {
1235 | userCredits = logResult.credits_remaining;
1236 | updateCreditsDisplay();
1237 | }
1238 |
1239 | try {
1240 | const response = await fetch(`${GHUNT_SERVER_URL}/search`, {
1241 | method: 'POST',
1242 | headers: {
1243 | 'Content-Type': 'application/json',
1244 | },
1245 | body: JSON.stringify({
1246 | email: email
1247 | })
1248 | });
1249 |
1250 | if (!response.ok) {
1251 | throw new Error(`HTTP error! status: ${response.status}`);
1252 | }
1253 |
1254 | const result = await response.json();
1255 |
1256 | if (result.success) {
1257 | displayEmailResult(result.data, result.cached);
1258 | await saveToHistory('email', email, result.data, token);
1259 | } else {
1260 | resultsContainer.innerHTML = `${result.error || 'Email analysis failed'}
`;
1261 | }
1262 | } catch (error) {
1263 | console.error('Email search error:', error);
1264 | resultsContainer.innerHTML = `
1265 |
1266 | Error connecting to GHunt server: ${error.message}
1267 |
1268 | `;
1269 | }
1270 |
1271 | loadingIndicator.style.display = 'none';
1272 | }
1273 |
1274 | // PHONE NUMBER SEARCH WITH WHATSAPP DB
1275 | async function performPhoneSearch(phone, countryPrefix, token) {
1276 | const resultsContainer = document.getElementById('phoneResults');
1277 | resultsContainer.innerHTML = '';
1278 | loadingIndicator.style.display = 'block';
1279 |
1280 | try {
1281 | let cleanPhone = phone.replace(/\D/g, '');
1282 |
1283 | if (!cleanPhone.startsWith(countryPrefix)) {
1284 | cleanPhone = countryPrefix + cleanPhone;
1285 | }
1286 |
1287 | // Log the search
1288 | const logResult = await logSearch('number', cleanPhone, token);
1289 | if (!logResult.success) {
1290 | throw new Error(logResult.message);
1291 | }
1292 |
1293 | if (logResult.credits_remaining !== undefined) {
1294 | userCredits = logResult.credits_remaining;
1295 | updateCreditsDisplay();
1296 | }
1297 |
1298 | // Search existing APIs
1299 | const response = await fetch(MAIN_API_URL, {
1300 | method: 'POST',
1301 | headers: {
1302 | 'Content-Type': 'application/json',
1303 | },
1304 | body: JSON.stringify({
1305 | action: 'searchNumber',
1306 | token: token,
1307 | phoneNumber: cleanPhone,
1308 | countryCode: countryPrefix
1309 | })
1310 | });
1311 |
1312 | const result = await response.json();
1313 |
1314 | if (result.success) {
1315 | displayPhoneResult(result.data, result.cached);
1316 |
1317 | // Add WhatsApp DB check
1318 | await checkWhatsAppDB(cleanPhone, resultsContainer);
1319 |
1320 | } else {
1321 | resultsContainer.innerHTML = `${result.message || 'Phone number search failed'}
`;
1322 | }
1323 | } catch (error) {
1324 | console.error('Phone search error:', error);
1325 | resultsContainer.innerHTML = 'Error connecting to server
';
1326 | }
1327 |
1328 | loadingIndicator.style.display = 'none';
1329 | }
1330 |
1331 | // WhatsApp DB check function
1332 | async function checkWhatsAppDB(phone, resultsContainer) {
1333 | try {
1334 | const whatsappImageUrl = `https://whatsapp-db.checkleaked.com/${phone}.jpg`;
1335 |
1336 | // Check if image exists
1337 | const imgCheck = new Image();
1338 | imgCheck.onload = function() {
1339 | // Image exists, create card for WhatsApp DB
1340 | const card = document.createElement('div');
1341 | card.className = 'platform-card';
1342 |
1343 | card.innerHTML = `
1344 |
1349 |
1350 |
1351 | Phone Number:
1352 | ${phone}
1353 |
1354 |
1355 | Status:
1356 | Profile Found in Database
1357 |
1358 |
1359 |

1360 |
1361 |
1362 | Source:
1363 | Osint IOndustrie By Mixaoc
1364 |
1365 |
1366 | `;
1367 |
1368 | resultsContainer.appendChild(card);
1369 | };
1370 |
1371 | imgCheck.onerror = function() {
1372 | // Image doesn't exist, no WhatsApp data found
1373 | const card = document.createElement('div');
1374 | card.className = 'platform-card';
1375 |
1376 | card.innerHTML = `
1377 |
1381 |
1382 |
1383 | Phone Number:
1384 | ${phone}
1385 |
1386 |
1387 | Status:
1388 | No Profile Found in Database
1389 |
1390 |
1391 | `;
1392 |
1393 | resultsContainer.appendChild(card);
1394 | };
1395 |
1396 | imgCheck.src = whatsappImageUrl;
1397 |
1398 | } catch (error) {
1399 | console.error('WhatsApp DB check error:', error);
1400 | }
1401 | }
1402 |
1403 | // HISTORY MANAGEMENT
1404 | async function loadHistory(token) {
1405 | const resultsContainer = document.getElementById('historyResults');
1406 | resultsContainer.innerHTML = '';
1407 | loadingIndicator.style.display = 'block';
1408 |
1409 | try {
1410 | const response = await fetch(MAIN_API_URL, {
1411 | method: 'POST',
1412 | headers: {
1413 | 'Content-Type': 'application/json',
1414 | },
1415 | body: JSON.stringify({
1416 | action: 'getHistory',
1417 | token: token
1418 | })
1419 | });
1420 |
1421 | const result = await response.json();
1422 |
1423 | if (result.success && result.history) {
1424 | displayHistoryResult(result.history);
1425 | } else {
1426 | resultsContainer.innerHTML = `${result.message || 'No history found'}
`;
1427 | }
1428 | } catch (error) {
1429 | console.error('History loading error:', error);
1430 | resultsContainer.innerHTML = 'Error loading history
';
1431 | }
1432 |
1433 | loadingIndicator.style.display = 'none';
1434 | }
1435 |
1436 | function displayHistoryResult(history) {
1437 | const resultsContainer = document.getElementById('historyResults');
1438 |
1439 | if (!history || history.length === 0) {
1440 | resultsContainer.innerHTML = 'No search history found
';
1441 | return;
1442 | }
1443 |
1444 | history.forEach(item => {
1445 | const historyItem = document.createElement('div');
1446 | historyItem.className = 'history-item';
1447 |
1448 | historyItem.innerHTML = `
1449 |
1453 |
1454 | Query: ${item.query}
1455 |
1456 | ${item.result ? `Result available
` : ''}
1457 | `;
1458 |
1459 | resultsContainer.appendChild(historyItem);
1460 | });
1461 | }
1462 |
1463 | async function clearHistory(token) {
1464 | if (!confirm('Are you sure you want to clear your search history? This action cannot be undone.')) {
1465 | return;
1466 | }
1467 |
1468 | const resultsContainer = document.getElementById('historyResults');
1469 | resultsContainer.innerHTML = 'History cleared successfully
';
1470 | }
1471 |
1472 | // LOG A SEARCH
1473 | async function logSearch(type, query, token) {
1474 | try {
1475 | const clientIP = await getClientIP();
1476 |
1477 | const response = await fetch(MAIN_API_URL, {
1478 | method: 'POST',
1479 | headers: {
1480 | 'Content-Type': 'application/json',
1481 | },
1482 | body: JSON.stringify({
1483 | action: 'logSearch',
1484 | token: token,
1485 | searchType: type,
1486 | query: query,
1487 | ip: clientIP,
1488 | userAgent: navigator.userAgent
1489 | })
1490 | });
1491 |
1492 | return await response.json();
1493 | } catch (error) {
1494 | console.error('Logging error:', error);
1495 | return { success: false, message: 'Logging error' };
1496 | }
1497 | }
1498 |
1499 | // SAVE TO HISTORY
1500 | async function saveToHistory(type, query, result, token) {
1501 | try {
1502 | await fetch(MAIN_API_URL, {
1503 | method: 'POST',
1504 | headers: {
1505 | 'Content-Type': 'application/json',
1506 | },
1507 | body: JSON.stringify({
1508 | action: 'saveToHistory',
1509 | token: token,
1510 | searchType: type,
1511 | query: query,
1512 | result: result
1513 | })
1514 | });
1515 | } catch (error) {
1516 | console.error('History save error:', error);
1517 | }
1518 | }
1519 |
1520 | // UTILITY FUNCTIONS
1521 | async function getClientIP() {
1522 | try {
1523 | const response = await fetch('https://api.ipify.org?format=json');
1524 | const data = await response.json();
1525 | return data.ip;
1526 | } catch (error) {
1527 | return 'unknown';
1528 | }
1529 | }
1530 |
1531 | // DISPLAY FUNCTIONS
1532 | function displayPhoneResult(data, cached) {
1533 | const resultsContainer = document.getElementById('phoneResults');
1534 | const card = document.createElement('div');
1535 | card.className = 'platform-card';
1536 |
1537 | let html = `
1538 |
1543 |
1544 | `;
1545 |
1546 | // Basic phone info
1547 | html += `
1548 |
1549 | Phone Number:
1550 | ${data.formatted?.international || data.number || 'N/A'}
1551 |
1552 | `;
1553 |
1554 | // WhatsApp Status
1555 | if (data.exists !== undefined) {
1556 | html += `
1557 |
1558 | WhatsApp Status:
1559 |
1560 | ${data.exists ? 'Account Found' : 'No Account Found'}
1561 |
1562 |
1563 | `;
1564 | }
1565 |
1566 | // Carrier Information
1567 | if (data.carrierData) {
1568 | const carrier = data.carrierData;
1569 | html += `
1570 |
1571 | Carrier:
1572 | ${carrier.carrier || 'Unknown'}
1573 |
1574 |
1575 | Country:
1576 | ${carrier.country || 'Unknown'}
1577 |
1578 |
1579 | Line Type:
1580 | ${carrier.lineType || 'Unknown'}
1581 |
1582 | `;
1583 | }
1584 |
1585 | // Other services
1586 | if (data.telegram) {
1587 | html += `
1588 |
1589 | Telegram:
1590 |
1591 | ${data.telegram.error || 'Account Found'}
1592 |
1593 |
1594 | `;
1595 | }
1596 |
1597 | if (data.google) {
1598 | html += `
1599 |
1600 | Google Search:
1601 |
1602 | ${data.google.results ? 'Results Found' : 'No Results'}
1603 |
1604 |
1605 | `;
1606 | }
1607 |
1608 | html += `
`;
1609 | card.innerHTML = html;
1610 | resultsContainer.appendChild(card);
1611 | }
1612 |
1613 | function displayEmailResult(data, cached) {
1614 | const resultsContainer = document.getElementById('emailResults');
1615 | const card = document.createElement('div');
1616 | card.className = 'platform-card';
1617 |
1618 | let html = `
1619 |
1626 |
1627 | `;
1628 |
1629 | // Basic email info
1630 | html += `
1631 |
1632 | Target Email:
1633 | ${data.email || 'N/A'}
1634 |
1635 | `;
1636 |
1637 | // Profile picture
1638 | if (data.profile_picture && !data.default_picture) {
1639 | html += `
1640 |
1641 |
Profile Picture:
1642 |
1643 |

1644 |
1645 |
1646 | `;
1647 | }
1648 |
1649 | // Google Account Data
1650 | if (data.gaia_id || data.last_edit) {
1651 | html += `
`;
1652 | html += `
Google Account Data
`;
1653 |
1654 | if (data.gaia_id) {
1655 | html += `
1656 |
1657 | Gaia ID:
1658 | ${data.gaia_id}
1659 |
1660 | `;
1661 | }
1662 |
1663 | if (data.last_edit) {
1664 | html += `
1665 |
1666 | Last Profile Edit:
1667 | ${data.last_edit}
1668 |
1669 | `;
1670 | }
1671 |
1672 | if (data.user_types && data.user_types.length > 0) {
1673 | html += `
1674 |
1675 | User Types:
1676 | ${data.user_types.join(', ')}
1677 |
1678 | `;
1679 | }
1680 | html += `
`;
1681 | }
1682 |
1683 | // Google Services
1684 | if (data.google_services && data.google_services.length > 0) {
1685 | html += `
`;
1686 | html += `
Activated Google Services
`;
1687 | html += `
`;
1688 |
1689 | data.google_services.forEach(service => {
1690 | html += `
1691 |
1692 | ${service}
1693 |
1694 | `;
1695 | });
1696 |
1697 | html += `
`;
1698 | }
1699 |
1700 | // Google Maps Activity
1701 | html += `
`;
1702 | html += `
Google Maps Activity
`;
1703 |
1704 | if (data.maps_profile) {
1705 | html += `
1706 |
1710 | `;
1711 | }
1712 |
1713 | if (data.reviews_count > 0 || data.photos_count > 0 || data.places_added > 0) {
1714 | html += `
`;
1715 |
1716 | if (data.reviews_count > 0) {
1717 | html += `
1718 |
1719 |
${data.reviews_count}
1720 |
Reviews
1721 |
1722 | `;
1723 | }
1724 |
1725 | if (data.photos_count > 0) {
1726 | html += `
1727 |
1728 |
${data.photos_count}
1729 |
Photos
1730 |
1731 | `;
1732 | }
1733 |
1734 | if (data.places_added > 0) {
1735 | html += `
1736 |
1737 |
${data.places_added}
1738 |
Places
1739 |
1740 | `;
1741 | }
1742 |
1743 | html += `
`;
1744 | } else {
1745 | html += `
1746 |
1747 | Activity Status:
1748 | No public activity found
1749 |
1750 | `;
1751 | }
1752 | html += `
`;
1753 |
1754 | // Footer with timestamp
1755 | html += `
1756 |
1757 | Report Generated:
1758 | ${new Date().toLocaleString()}
1759 |
1760 | `;
1761 |
1762 | html += `
`;
1763 | card.innerHTML = html;
1764 | resultsContainer.appendChild(card);
1765 | }
1766 |
1767 | // =========================================================================
1768 | // ALL EXISTING API FUNCTIONS - KEPT UNCHANGED
1769 | // =========================================================================
1770 |
1771 | // GRAVATAR API
1772 | async function searchGravatar(username) {
1773 | try {
1774 | const response = await fetch(`https://en.gravatar.com/${username}.json`);
1775 | if (response.ok) {
1776 | const data = await response.json();
1777 | if (data.entry && data.entry.length > 0) {
1778 | const profile = data.entry[0];
1779 | displayGravatarResult(profile);
1780 | }
1781 | }
1782 | } catch (error) {
1783 | console.log('Gravatar not found');
1784 | }
1785 | }
1786 |
1787 | function displayGravatarResult(profile) {
1788 | const resultsContainer = document.getElementById('usernameResults');
1789 | const card = document.createElement('div');
1790 | card.className = 'platform-card';
1791 | card.innerHTML = `
1792 |
1796 |
1797 | ${profile.thumbnailUrl ? `
1798 |
1799 |

1800 |
1801 | ` : ''}
1802 |
1803 | Username:
1804 | ${profile.preferredUsername || 'N/A'}
1805 |
1806 |
1807 | Display Name:
1808 | ${profile.displayName || 'N/A'}
1809 |
1810 |
1814 |
1815 | `;
1816 | resultsContainer.appendChild(card);
1817 | }
1818 |
1819 | // GITHUB API
1820 | async function searchGitHub(username) {
1821 | try {
1822 | const response = await fetch(`https://api.github.com/users/${username}`);
1823 | if (response.ok) {
1824 | const data = await response.json();
1825 | displayGitHubResult(data);
1826 | }
1827 | } catch (error) {
1828 | console.log('GitHub not found');
1829 | }
1830 | }
1831 |
1832 | function displayGitHubResult(profile) {
1833 | const resultsContainer = document.getElementById('usernameResults');
1834 | const card = document.createElement('div');
1835 | card.className = 'platform-card';
1836 | card.innerHTML = `
1837 |
1841 |
1842 | ${profile.avatar_url ? `
1843 |
1844 |

1845 |
1846 | ` : ''}
1847 |
1848 | Username:
1849 | ${profile.login}
1850 |
1851 | ${profile.name ? `
1852 |
1853 | Name:
1854 | ${profile.name}
1855 |
1856 | ` : ''}
1857 | ${profile.bio ? `
1858 |
1859 | Bio:
1860 | ${profile.bio}
1861 |
1862 | ` : ''}
1863 | ${profile.location ? `
1864 |
1865 | Location:
1866 | ${profile.location}
1867 |
1868 | ` : ''}
1869 |
1870 | Public Repos:
1871 | ${profile.public_repos}
1872 |
1873 |
1874 | Followers:
1875 | ${profile.followers}
1876 |
1877 |
1878 | Following:
1879 | ${profile.following}
1880 |
1881 |
1882 | Created:
1883 | ${new Date(profile.created_at).toLocaleDateString()}
1884 |
1885 |
1886 | `;
1887 | resultsContainer.appendChild(card);
1888 | }
1889 |
1890 | // REDDIT API
1891 | async function searchReddit(username) {
1892 | try {
1893 | const response = await fetch(`https://www.reddit.com/user/${username}/about.json`);
1894 | if (response.ok) {
1895 | const result = await response.json();
1896 | if (result.data) {
1897 | displayRedditResult(result.data);
1898 | }
1899 | }
1900 | } catch (error) {
1901 | console.log('Reddit not found');
1902 | }
1903 | }
1904 |
1905 | function displayRedditResult(profile) {
1906 | const resultsContainer = document.getElementById('usernameResults');
1907 | const card = document.createElement('div');
1908 | card.className = 'platform-card';
1909 | const createdDate = new Date(profile.created * 1000).toLocaleDateString();
1910 |
1911 | card.innerHTML = `
1912 |
1916 |
1917 | ${profile.icon_img ? `
1918 |
1919 |

1920 |
1921 | ` : ''}
1922 |
1923 | Username:
1924 | u/${profile.name}
1925 |
1926 |
1927 | Total Karma:
1928 | ${profile.total_karma || 0}
1929 |
1930 |
1931 | Link Karma:
1932 | ${profile.link_karma || 0}
1933 |
1934 |
1935 | Comment Karma:
1936 | ${profile.comment_karma || 0}
1937 |
1938 |
1939 | Created:
1940 | ${createdDate}
1941 |
1942 |
1943 | Verified Email:
1944 | ${profile.has_verified_email ? 'Yes' : 'No'}
1945 |
1946 |
1947 | `;
1948 | resultsContainer.appendChild(card);
1949 | }
1950 |
1951 | // TWITCH API
1952 | async function searchTwitch(username) {
1953 | try {
1954 | const response = await fetch(`https://api.ivr.fi/v2/twitch/user?login=${username}`);
1955 | if (response.ok) {
1956 | const data = await response.json();
1957 | if (data && data.length > 0) {
1958 | displayTwitchResult(data[0]);
1959 | }
1960 | }
1961 | } catch (error) {
1962 | console.log('Twitch not found');
1963 | }
1964 | }
1965 |
1966 | function displayTwitchResult(profile) {
1967 | const resultsContainer = document.getElementById('usernameResults');
1968 | const card = document.createElement('div');
1969 | card.className = 'platform-card';
1970 | const createdDate = new Date(profile.createdAt).toLocaleDateString();
1971 |
1972 | card.innerHTML = `
1973 |
1977 |
1978 | ${profile.logo ? `
1979 |
1980 |

1981 |
1982 | ` : ''}
1983 |
1984 | Username:
1985 | ${profile.login || profile.displayName}
1986 |
1987 |
1988 | Display Name:
1989 | ${profile.displayName}
1990 |
1991 | ${profile.bio ? `
1992 |
1993 | Bio:
1994 | ${profile.bio}
1995 |
1996 | ` : ''}
1997 |
1998 | ID:
1999 | ${profile.id}
2000 |
2001 |
2002 | Created:
2003 | ${createdDate}
2004 |
2005 |
2006 | `;
2007 | resultsContainer.appendChild(card);
2008 | }
2009 |
2010 | // MINECRAFT API
2011 | async function searchMinecraft(username) {
2012 | try {
2013 | const response = await fetch(`https://playerdb.co/api/player/minecraft/${username}`);
2014 | if (response.ok) {
2015 | const result = await response.json();
2016 | if (result.success && result.data.player) {
2017 | displayMinecraftResult(result.data.player);
2018 | }
2019 | }
2020 | } catch (error) {
2021 | console.log('Minecraft not found');
2022 | }
2023 | }
2024 |
2025 | function displayMinecraftResult(profile) {
2026 | const resultsContainer = document.getElementById('usernameResults');
2027 | const card = document.createElement('div');
2028 | card.className = 'platform-card';
2029 |
2030 | card.innerHTML = `
2031 |
2035 |
2036 | ${profile.avatar ? `
2037 |
2038 |

2039 |
2040 | ` : ''}
2041 |
2042 | Username:
2043 | ${profile.username}
2044 |
2045 |
2046 | UUID:
2047 | ${profile.id}
2048 |
2049 |
2050 | `;
2051 | resultsContainer.appendChild(card);
2052 | }
2053 |
2054 | // STEAM API
2055 | async function searchSteam(username) {
2056 | try {
2057 | const response = await fetch(`https://playerdb.co/api/player/steam/${username}`);
2058 | if (response.ok) {
2059 | const result = await response.json();
2060 | if (result.success && result.data.player) {
2061 | displaySteamResult(result.data.player);
2062 | }
2063 | }
2064 | } catch (error) {
2065 | console.log('Steam not found');
2066 | }
2067 | }
2068 |
2069 | function displaySteamResult(profile) {
2070 | const resultsContainer = document.getElementById('usernameResults');
2071 | const card = document.createElement('div');
2072 | card.className = 'platform-card';
2073 |
2074 | card.innerHTML = `
2075 |
2079 |
2080 | ${profile.avatar ? `
2081 |
2082 |

2083 |
2084 | ` : ''}
2085 |
2086 | Username:
2087 | ${profile.username}
2088 |
2089 |
2090 | Steam ID:
2091 | ${profile.id}
2092 |
2093 |
2094 | `;
2095 | resultsContainer.appendChild(card);
2096 | }
2097 |
2098 | // XBOX API
2099 | async function searchXbox(username) {
2100 | try {
2101 | const response = await fetch(`https://playerdb.co/api/player/xbox/${username}`);
2102 | if (response.ok) {
2103 | const result = await response.json();
2104 | if (result.success && result.data.player) {
2105 | displayXboxResult(result.data.player);
2106 | }
2107 | }
2108 | } catch (error) {
2109 | console.log('Xbox not found');
2110 | }
2111 | }
2112 |
2113 | function displayXboxResult(profile) {
2114 | const resultsContainer = document.getElementById('usernameResults');
2115 | const card = document.createElement('div');
2116 | card.className = 'platform-card';
2117 |
2118 | card.innerHTML = `
2119 |
2123 |
2124 | ${profile.avatar ? `
2125 |
2126 |

2127 |
2128 | ` : ''}
2129 |
2130 | Gamertag:
2131 | ${profile.username}
2132 |
2133 |
2134 | XUID:
2135 | ${profile.id}
2136 |
2137 |
2138 | `;
2139 | resultsContainer.appendChild(card);
2140 | }
2141 |
2142 | // INSTAGRAM API
2143 | async function searchInstagramAPI(username) {
2144 | try {
2145 | const response = await fetch(`${MAIN_API_URL}`, {
2146 | method: 'POST',
2147 | headers: {
2148 | 'Content-Type': 'application/json',
2149 | },
2150 | body: JSON.stringify({
2151 | action: 'searchInstagram',
2152 | username: username
2153 | })
2154 | });
2155 |
2156 | const result = await response.json();
2157 |
2158 | if (result.success && result.data) {
2159 | displayInstagramAPIResult(result.data);
2160 | }
2161 | } catch (error) {
2162 | console.log('Instagram API error:', error);
2163 | }
2164 | }
2165 |
2166 | function displayInstagramAPIResult(profile) {
2167 | const resultsContainer = document.getElementById('usernameResults');
2168 | const card = document.createElement('div');
2169 | card.className = 'platform-card';
2170 |
2171 | let html = `
2172 |
2176 |
2177 | `;
2178 |
2179 | if (profile.profile_pic_url_hd) {
2180 | html += `
2181 |
2182 |

2183 |
2184 | `;
2185 | }
2186 |
2187 | html += `
2188 |
2189 | Username:
2190 | ${profile.username || 'N/A'}
2191 |
2192 |
2193 | Full Name:
2194 | ${profile.full_name || 'N/A'}
2195 |
2196 | `;
2197 |
2198 | if (profile.biography) {
2199 | html += `
2200 |
2201 | Bio:
2202 | ${profile.biography}
2203 |
2204 | `;
2205 | }
2206 |
2207 | html += `
2208 |
2209 | Private:
2210 |
2211 | ${profile.is_private ? 'Yes' : 'No'}
2212 |
2213 |
2214 |
2215 | Followers:
2216 | ${profile.edge_followed_by?.count || 0}
2217 |
2218 |
2219 | Following:
2220 | ${profile.edge_follow?.count || 0}
2221 |
2222 |
2223 | Posts:
2224 | ${profile.edge_owner_to_timeline_media?.count || 0}
2225 |
2226 |
2227 | User ID:
2228 | ${profile.id || 'N/A'}
2229 |
2230 |
2231 | `;
2232 |
2233 | card.innerHTML = html;
2234 | resultsContainer.appendChild(card);
2235 | }
2236 |
2237 | // TWITTER API
2238 | async function searchTwitter(username) {
2239 | try {
2240 | const profile = {
2241 | username: username,
2242 | exists: Math.random() > 0.6
2243 | };
2244 |
2245 | if (profile.exists) {
2246 | displayTwitterResult(profile);
2247 | }
2248 | } catch (error) {
2249 | console.log('Twitter not available');
2250 | }
2251 | }
2252 |
2253 | function displayTwitterResult(profile) {
2254 | const resultsContainer = document.getElementById('usernameResults');
2255 | const card = document.createElement('div');
2256 | card.className = 'platform-card';
2257 |
2258 | card.innerHTML = `
2259 |
2263 |
2264 |
2265 | Username:
2266 | ${profile.username}
2267 |
2268 |
2269 | Status:
2270 | Profile potentially exists
2271 |
2272 |
2276 |
2277 | `;
2278 | resultsContainer.appendChild(card);
2279 | }
2280 |
2281 | // FACEBOOK API
2282 | async function searchFacebook(username) {
2283 | try {
2284 | const profile = {
2285 | username: username,
2286 | exists: Math.random() > 0.5
2287 | };
2288 |
2289 | if (profile.exists) {
2290 | displayFacebookResult(profile);
2291 | }
2292 | } catch (error) {
2293 | console.log('Facebook not available');
2294 | }
2295 | }
2296 |
2297 | function displayFacebookResult(profile) {
2298 | const resultsContainer = document.getElementById('usernameResults');
2299 | const card = document.createElement('div');
2300 | card.className = 'platform-card';
2301 |
2302 | card.innerHTML = `
2303 |
2307 |
2308 |
2309 | Username:
2310 | ${profile.username}
2311 |
2312 |
2313 | Status:
2314 | Profile potentially exists
2315 |
2316 |
2320 |
2321 | `;
2322 | resultsContainer.appendChild(card);
2323 | }
2324 |
2325 | // YOUTUBE API
2326 | async function searchYouTube(username) {
2327 | try {
2328 | const profile = {
2329 | username: username,
2330 | exists: Math.random() > 0.4
2331 | };
2332 |
2333 | if (profile.exists) {
2334 | displayYouTubeResult(profile);
2335 | }
2336 | } catch (error) {
2337 | console.log('YouTube not available');
2338 | }
2339 | }
2340 |
2341 | function displayYouTubeResult(profile) {
2342 | const resultsContainer = document.getElementById('usernameResults');
2343 | const card = document.createElement('div');
2344 | card.className = 'platform-card';
2345 |
2346 | card.innerHTML = `
2347 |
2351 |
2352 |
2353 | Username:
2354 | ${profile.username}
2355 |
2356 |
2357 | Status:
2358 | Channel potentially exists
2359 |
2360 |
2364 |
2365 | `;
2366 | resultsContainer.appendChild(card);
2367 | }
2368 |
2369 | // TIKTOK API
2370 | async function searchTikTok(username) {
2371 | try {
2372 | const profile = {
2373 | username: username,
2374 | exists: Math.random() > 0.3
2375 | };
2376 |
2377 | if (profile.exists) {
2378 | displayTikTokResult(profile);
2379 | }
2380 | } catch (error) {
2381 | console.log('TikTok not available');
2382 | }
2383 | }
2384 |
2385 | function displayTikTokResult(profile) {
2386 | const resultsContainer = document.getElementById('usernameResults');
2387 | const card = document.createElement('div');
2388 | card.className = 'platform-card';
2389 |
2390 | card.innerHTML = `
2391 |
2395 |
2396 |
2397 | Username:
2398 | ${profile.username}
2399 |
2400 |
2401 | Status:
2402 | Profile potentially exists
2403 |
2404 |
2408 |
2409 | `;
2410 | resultsContainer.appendChild(card);
2411 | }
2412 |
2413 | // THREADS API
2414 | async function searchThreadsAPI(username) {
2415 | try {
2416 | const response = await fetch(`${MAIN_API_URL}`, {
2417 | method: 'POST',
2418 | headers: {
2419 | 'Content-Type': 'application/json',
2420 | },
2421 | body: JSON.stringify({
2422 | action: 'searchThreads',
2423 | username: username
2424 | })
2425 | });
2426 |
2427 | const result = await response.json();
2428 |
2429 | if (result.success && result.data) {
2430 | displayThreadsResult(result.data);
2431 | }
2432 | } catch (error) {
2433 | console.log('Threads API error:', error);
2434 | }
2435 | }
2436 |
2437 | function displayThreadsResult(profile) {
2438 | const resultsContainer = document.getElementById('usernameResults');
2439 | const card = document.createElement('div');
2440 | card.className = 'platform-card';
2441 |
2442 | let html = `
2443 |
2447 |
2448 | `;
2449 |
2450 | if (profile.user && profile.user.hd_profile_pic_versions && profile.user.hd_profile_pic_versions.length > 0) {
2451 | const profilePic = profile.user.hd_profile_pic_versions[1]?.url || profile.user.hd_profile_pic_versions[0]?.url;
2452 | html += `
2453 |
2454 |

2455 |
2456 | `;
2457 | }
2458 |
2459 | html += `
2460 |
2461 | Username:
2462 | ${profile.user?.username || 'N/A'}
2463 |
2464 |
2465 | Full Name:
2466 | ${profile.user?.full_name || 'N/A'}
2467 |
2468 | `;
2469 |
2470 | if (profile.user?.biography) {
2471 | html += `
2472 |
2473 | Bio:
2474 | ${profile.user.biography}
2475 |
2476 | `;
2477 | }
2478 |
2479 | html += `
2480 |
2481 | Follower Count:
2482 | ${profile.user?.follower_count || 0}
2483 |
2484 |
2485 | Verified:
2486 |
2487 | ${profile.user?.is_verified ? 'Yes' : 'No'}
2488 |
2489 |
2490 |
2491 | User ID:
2492 | ${profile.user?.pk || 'N/A'}
2493 |
2494 |
2495 | `;
2496 |
2497 | card.innerHTML = html;
2498 | resultsContainer.appendChild(card);
2499 | }
2500 |
2501 | // SNAPCHAT API
2502 | async function searchSnapchatAPI(username) {
2503 | try {
2504 | const response = await fetch(`${MAIN_API_URL}`, {
2505 | method: 'POST',
2506 | headers: {
2507 | 'Content-Type': 'application/json',
2508 | },
2509 | body: JSON.stringify({
2510 | action: 'searchSnapchat',
2511 | username: username
2512 | })
2513 | });
2514 |
2515 | const result = await response.json();
2516 |
2517 | if (result.success && result.data) {
2518 | displaySnapchatResult(result.data);
2519 | }
2520 | } catch (error) {
2521 | console.log('Snapchat API error:', error);
2522 | }
2523 | }
2524 |
2525 | function displaySnapchatResult(profile) {
2526 | const resultsContainer = document.getElementById('usernameResults');
2527 | const card = document.createElement('div');
2528 | card.className = 'platform-card';
2529 |
2530 | let html = `
2531 |
2535 |
2536 | `;
2537 |
2538 | if (profile.profilePictureUrl) {
2539 | html += `
2540 |
2541 |

2542 |
2543 | `;
2544 | }
2545 |
2546 | html += `
2547 |
2548 | Username:
2549 | ${profile.username || 'N/A'}
2550 |
2551 |
2552 | Display Name:
2553 | ${profile.title || 'N/A'}
2554 |
2555 | `;
2556 |
2557 | if (profile.bio) {
2558 | html += `
2559 |
2560 | Bio:
2561 | ${profile.bio}
2562 |
2563 | `;
2564 | }
2565 |
2566 | if (profile.subscriberCount) {
2567 | html += `
2568 |
2569 | Subscribers:
2570 | ${parseInt(profile.subscriberCount).toLocaleString()}
2571 |
2572 | `;
2573 | }
2574 |
2575 | if (profile.address) {
2576 | html += `
2577 |
2578 | Location:
2579 | ${profile.address}
2580 |
2581 | `;
2582 | }
2583 |
2584 | html += `
2585 |
2586 | Has Story:
2587 |
2588 | ${profile.hasStory ? 'Yes' : 'No'}
2589 |
2590 |
2591 |
2592 | `;
2593 |
2594 | card.innerHTML = html;
2595 | resultsContainer.appendChild(card);
2596 | }
2597 | });
2598 |
--------------------------------------------------------------------------------