Skip to content

Commit

Permalink
feat: params resutls
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoudgalalz committed May 20, 2024
1 parent 4ed16dd commit 7536d13
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
43 changes: 43 additions & 0 deletions src/renderer/views/project/results/params-resutls.tsx
Original file line number Diff line number Diff line change
@@ -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<subDomains[]>();

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 (
<div>
<div className="flex space-x-2">
<Button onClick={()=> handleClick('waybackurls_js.txt')}>All JS</Button>
<Button onClick={()=> handleClick('waybackurls_parameter.txt')}>searchParams</Button>
<Button onClick={()=> handleClick('waybackurls_archive.txt')}>All</Button>
</div>
{data && <DataTable data={data} columns={columns}/>}
</div>
);
}
3 changes: 2 additions & 1 deletion src/renderer/views/project/results/recon-results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<ReconTabs
ScreensComponent={<ScreenResults />}
ParamsComponent={undefined}
ParamsComponent={<ParamsResults />}
SubComponent={<SubdomainResults />}
LiveComponent={<LivedomainResults />}
/>
Expand Down

0 comments on commit 7536d13

Please sign in to comment.