From 7536d13190020b89d94c58edb9970b847486b7d5 Mon Sep 17 00:00:00 2001 From: Mahmoud Galal Date: Thu, 29 Feb 2024 10:03:00 +0200 Subject: [PATCH] feat: params resutls --- .../views/project/results/params-resutls.tsx | 43 +++++++++++++++++++ .../views/project/results/recon-results.tsx | 3 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/renderer/views/project/results/params-resutls.tsx diff --git a/src/renderer/views/project/results/params-resutls.tsx b/src/renderer/views/project/results/params-resutls.tsx new file mode 100644 index 0000000..b35527d --- /dev/null +++ b/src/renderer/views/project/results/params-resutls.tsx @@ -0,0 +1,43 @@ +/* eslint-disable react/self-closing-comp */ +/* eslint-disable prettier/prettier */ +/* eslint-disable react/no-danger */ +/* eslint-disable react-hooks/exhaustive-deps */ +import { useEffect, useState } from 'react'; +import { useParams } from 'react-router-dom'; +import { textToArray } from './lib/utils'; +import { columns, subDomains } from './tables/columns'; +import { DataTable } from './tables/data-table'; +import { Button } from '../../../components/ui/button'; + +/* eslint-disable import/prefer-default-export */ +export function ParamsResults() { + const { projectSlug } = useParams(); + const [data, setData] = useState(); + + const getHtmlFile = async (location: string = "waybackurls_archive.txt") => { + const res = await window.electron.ipcRenderer.invoke('api-call', { + projectName: projectSlug, + type: 'text/utf-8', + location, + }); + const formAsArray = textToArray(res.body) + setData(formAsArray); + }; + + const handleClick = (loc:string) =>{ + getHtmlFile(loc) + } + useEffect(() => { + getHtmlFile(); + }, []); + return ( +
+
+ + + +
+ {data && } +
+ ); +} diff --git a/src/renderer/views/project/results/recon-results.tsx b/src/renderer/views/project/results/recon-results.tsx index 030a04f..ec37ddf 100644 --- a/src/renderer/views/project/results/recon-results.tsx +++ b/src/renderer/views/project/results/recon-results.tsx @@ -2,13 +2,14 @@ import ReconTabs from '../../../components/ui/tabs'; import { ScreenResults } from './screen-results'; import { LivedomainResults } from './live-results'; import { SubdomainResults } from './sub-domains'; +import { ParamsResults } from './params-resutls'; /* eslint-disable import/prefer-default-export */ export function ReconResults() { return ( } - ParamsComponent={undefined} + ParamsComponent={} SubComponent={} LiveComponent={} />