Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-09-25 20:12:42 +02:00
parent aed681dfa6
commit 078890d050
3 changed files with 60 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import type { Dataleak } from "$src/lib/types"; import type { Dataleak } from "$src/lib/types";
import { Replace, Search } from "@lucide/svelte"; import { Database, Replace, Search } from "@lucide/svelte";
let { let {
dataleaks, dataleaks,
@@ -42,6 +42,16 @@
} }
}); });
function getDomain(dataleakName: string) {
const firstPart = dataleakName.split(" ")[0].toLowerCase();
const domainRegex =
/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/;
if (domainRegex.test(firstPart)) {
return firstPart;
}
return null;
}
function previousPage() { function previousPage() {
if (page > 1) { if (page > 1) {
page--; page--;
@@ -66,6 +76,7 @@
<!-- head --> <!-- head -->
<thead> <thead>
<tr> <tr>
<th></th>
<th>Name</th> <th>Name</th>
<th>Number of rows</th> <th>Number of rows</th>
{#if showColumns} {#if showColumns}
@@ -77,6 +88,25 @@
{#if paginatedDataleaks.length > 0} {#if paginatedDataleaks.length > 0}
{#each paginatedDataleaks as item} {#each paginatedDataleaks as item}
<tr class="hover:bg-base-300"> <tr class="hover:bg-base-300">
<th>
<div>
{#if getDomain(item.Name)}
<img
src="https://icons.duckduckgo.com/ip3/{getDomain(
item.Name,
)}.ico"
class="size-8 rounded-xl bg-neutral"
alt="Favicon de {getDomain(item.Name)}"
/>
{:else}
<div
class="size-8 rounded-xl bg-neutral items-center justify-center flex"
>
<Database class="text-neutral-content" />
</div>
{/if}
</div>
</th>
<th> <th>
{item.Name} {item.Name}
</th> </th>
@@ -90,7 +120,7 @@
{/each} {/each}
{:else} {:else}
<tr class="hover:bg-base-300"> <tr class="hover:bg-base-300">
<td colspan={3} class="text-center leading-9" <td colspan={100} class="text-center leading-9"
><span class="text-3xl">(·.·)</span><br />No data wells found</td ><span class="text-3xl">(·.·)</span><br />No data wells found</td
> >
</tr> </tr>

View File

@@ -63,19 +63,19 @@
<div <div
class="size-10 rounded-box bg-neutral items-center justify-center flex" class="size-10 rounded-box bg-neutral items-center justify-center flex"
> >
<Key /> <Key class="text-neutral-content" />
</div> </div>
{:else if row["email"] !== null} {:else if row["email"] !== null}
<div <div
class="size-10 rounded-box bg-neutral items-center justify-center flex" class="size-10 rounded-box bg-neutral items-center justify-center flex"
> >
<Mail /> <Mail class="text-neutral-content" />
</div> </div>
{:else} {:else}
<div <div
class="size-10 rounded-box bg-neutral items-center justify-center flex" class="size-10 rounded-box bg-neutral items-center justify-center flex"
> >
<Database /> <Database class="text-neutral-content" />
</div> </div>
{/if} {/if}
</div> </div>

View File

@@ -43,7 +43,14 @@
axios axios
.post( .post(
`${$serverUrl}/search`, `${$serverUrl}/search`,
{ Text: query, Column: activeFilter, ExactMatch: exactMatch, Datawells: datawells, GithubRecon: githubRecon, GravatarRecon: gravatarRecon }, {
Text: query,
Column: activeFilter,
ExactMatch: exactMatch,
Datawells: datawells,
GithubRecon: githubRecon,
GravatarRecon: gravatarRecon,
},
{ {
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@@ -84,10 +91,13 @@
{/each} {/each}
</div> </div>
<details class="dropdown dropdown-end"> <div class="dropdown dropdown-end">
<summary class="btn btn-square m-1"><Settings size={16} /></summary> <div tabindex="0" role="button" class="btn m-1 btn-square btn-soft">
<Settings size={16} />
</div>
<ul <ul
class="menu dropdown-content bg-base-200 rounded-box z-1 w-52 p-2 shadow-sm" tabindex="-1"
class="dropdown-content menu bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm"
> >
<li> <li>
<label class="label"> <label class="label">
@@ -97,18 +107,26 @@
</li> </li>
<li> <li>
<label class="label"> <label class="label">
<input type="checkbox" bind:checked={githubRecon} class="checkbox" /> <input
type="checkbox"
bind:checked={githubRecon}
class="checkbox"
/>
Github Recon Github Recon
</label> </label>
</li> </li>
<li> <li>
<label class="label"> <label class="label">
<input type="checkbox" bind:checked={gravatarRecon} class="checkbox" /> <input
type="checkbox"
bind:checked={gravatarRecon}
class="checkbox"
/>
Gravatar Recon Gravatar Recon
</label> </label>
</li> </li>
</ul> </ul>
</details> </div>
</div> </div>
<form <form