2022-01-17 19:59:44 +01:00
|
|
|
import React from 'react';
|
|
|
|
import { RequestCluster } from '../request-cluster';
|
|
|
|
import { Classifications, Sources } from '../stolen-data-entry';
|
2021-11-08 20:14:28 +01:00
|
|
|
|
|
|
|
const emailClassifications: Record<keyof typeof Classifications, string> = {
|
2022-01-17 19:59:44 +01:00
|
|
|
id: 'mój identyfikator internetowy',
|
|
|
|
history: 'część mojej historii przeglądania',
|
|
|
|
location: 'informacje na temat mojej lokalizacji geograficznej',
|
2021-11-08 20:14:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const emailSources: Record<Sources, string> = {
|
2022-01-17 19:59:44 +01:00
|
|
|
header: 'w nagłówku HTTP',
|
|
|
|
cookie: 'z pliku Cookie',
|
|
|
|
pathname: 'jako części adresu URL',
|
|
|
|
queryparams: 'jako część adresu URL (query-params)',
|
|
|
|
request_body: 'w body zapytania POST',
|
2021-11-08 20:14:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export default function DomainSummary({
|
2022-01-17 19:59:44 +01:00
|
|
|
cluster,
|
2021-11-08 20:14:28 +01:00
|
|
|
}: {
|
2022-01-17 19:59:44 +01:00
|
|
|
cluster: RequestCluster;
|
2021-11-08 20:14:28 +01:00
|
|
|
}) {
|
2022-01-17 19:59:44 +01:00
|
|
|
return (
|
|
|
|
<li>
|
|
|
|
Właścicielowi domeny <strong>{cluster.id}</strong> zostały
|
|
|
|
ujawnione:{' '}
|
|
|
|
<ul>
|
|
|
|
{cluster.representativeStolenData
|
|
|
|
.filter((entry) => entry.isMarked)
|
|
|
|
.map((entry) => (
|
|
|
|
<li key={entry.id}>
|
|
|
|
{emailClassifications[entry.classification]}{' '}
|
|
|
|
{emailSources[entry.source]} (nazwa:{' '}
|
|
|
|
<code>{entry.name}</code>, wartość:{' '}
|
|
|
|
<code>{entry.getValuePreview()}</code>)
|
|
|
|
</li>
|
|
|
|
))}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
);
|
2021-11-08 20:14:28 +01:00
|
|
|
}
|