Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #Yazan #8

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/recon/httpx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function screenwin(outputDir: string = PROJECT_DIR): {

const command = `${httpxPath} -ss -l ${path.join(
outputDir,
'recon_subdomins.txt',
'httpx_live_domains.txt',
)} -srd ${path.join(outputDir, 'httpx_screen')}`;
try {
execSync(command);
Expand Down
6 changes: 3 additions & 3 deletions src/main/recon/waybackurls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function wwayback(outputDir: string = PROJECT_DIR): {
const wwaybackPath = toolPath('waybackurls');
const command = `cat "${path.join(
outputDir,
'recon_subdomins.txt',
'httpx_live_domains.txt',
)}" | ${wwaybackPath} >> ${path.join(outputDir, 'waybackurls_archive.txt')}`;

// 'type "D:\\recon_result\\domains.txt" | D:\\05-Haitham\\Projects\\hunter\\bin\\waybackurls >> "D:\\recon_result\\archive.txt"';
Expand All @@ -31,7 +31,7 @@ export function fetchJs(outputDir: string = PROJECT_DIR): {
const wwaybackPath = toolPath('waybackurls');
const command = `cat "${path.join(
outputDir,
'recon_subdomins.txt',
'waybackurls_archive.txt',
)}" | ${wwaybackPath} | findstr ".js" >> ${path.join(outputDir, 'waybackurls_js.txt')}`;
try {
execSync(command);
Expand All @@ -49,7 +49,7 @@ export function parameter(outputDir: string = PROJECT_DIR): {

const command = `cat "${path.join(
outputDir,
'recon_subdomins.txt',
'waybackurls_archive.txt',
)}" | ${wwaybackPath} | findstr "=" >> ${path.join(
outputDir,
'waybackurls_parameter.txt',
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ThemeProvider } from '@primer/react-brand';
import { Banner } from './components/Banner';
import { Dashboard } from './views/Dashboard';
import { Toaster } from './components/ui/toaster';
import Results from './views/project/result';
import Results from './views/project/Results';
import { ProjectLayout } from './layout/projectLayout';
import Status from './views/project/status';
import Recon from './views/project/recon';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/createProject.form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function CreateProjectForm() {
<FormItem>
<FormLabel>Domain</FormLabel>
<FormControl>
<Input placeholder="tesla.com" {...field} />
<Input placeholder="ex:tesla.com" {...field} />
</FormControl>
<FormMessage />
</FormItem>
Expand Down
1 change: 0 additions & 1 deletion src/renderer/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ReactNode } from 'react';


export type DashboardMenu = {
href: string;
title: string;
Expand Down
137 changes: 137 additions & 0 deletions src/renderer/views/project/Results.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import { useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '../../components/ui/card';
import SubDomainsResults from './jobs/Results/SubDomainsResults';
import { ProjectDetails } from '../../types';

export default function Results() {
const [details, setDetails] = useState<ProjectDetails>();
const { projectSlug } = useParams();
// eslint-disable-next-line react-hooks/exhaustive-deps
const getDetails = async () => {
const res = await window.electron.ipcRenderer.invoke(
'get-project-detailss',
projectSlug,
);
setDetails(res);
};
useEffect(() => {
getDetails();
}, [getDetails]);
return (
<div className="flex flex-col gap-4">
<h1 className="font-bold text-3xl">Results</h1>
<div>
<div className="grid grid-flow-row grid-cols-2 gap-4">
<Card>
<CardHeader>
<CardTitle>Subdomains</CardTitle>
<CardDescription>all subdomains of your target.</CardDescription>
</CardHeader>
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x">
<h1 className="flex flex-col font-semibold">
Last Run <span>{details.recon?.subfinder?.date}</span>
</h1>
<h1 className="flex flex-col font-semibold">
No. of Subdomains found:
<span>{details.recon?.subfinder?.result || '0'}</span>
</h1>
</div>
)}
<SubDomainsResults />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Live Subdomains</CardTitle>
<CardDescription>all subdomains of your target.</CardDescription>
</CardHeader>
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">
Last Run
<span>{details.recon?.liveDomains?.date ?? ''}</span>
</h1>
</div>
)}
<SubDomainsResults />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Screenshots</CardTitle>
<CardDescription>what is your target look like.</CardDescription>
</CardHeader>
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">
Last Run <span>{details.recon?.screens?.date ?? ''}</span>
</h1>
</div>
)}
<SubDomainsResults />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Archive</CardTitle>
<CardDescription>Archive of your target.</CardDescription>
</CardHeader>
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">Last Run</h1>
</div>
)}
<SubDomainsResults />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Js Files</CardTitle>
<CardDescription>
all the js files of your target.
</CardDescription>
</CardHeader>
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">Last Run</h1>
</div>
)}
<SubDomainsResults />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Parameters</CardTitle>
<CardDescription>
all the Parameters of your target.
</CardDescription>
</CardHeader>
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">
Last Run <span>{details.recon?.params?.date ?? ''}</span>
</h1>
</div>
)}
<SubDomainsResults />
</CardContent>
</Card>
</div>
</div>
</div>
);
}
13 changes: 13 additions & 0 deletions src/renderer/views/project/jobs/Results/SubDomainsResults.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as button from '../../../../components/ui/button';

export default function SubDomainsResults() {
const redirectToSubDomains = () => {
// Find Subdomains file Functionality
};
return (
// eslint-disable-next-line react/jsx-no-useless-fragment
<>
<button.Button onClick={redirectToSubDomains}>Find</button.Button>
</>
);
}
72 changes: 49 additions & 23 deletions src/renderer/views/project/recon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';
import {
Card,
CardContent,
Expand All @@ -16,16 +17,18 @@ import { ProjectDetails } from '../../types';

export default function Recon() {
const [details, setDetails] = useState<ProjectDetails>();
const { projectSlug } = useParams();
// eslint-disable-next-line react-hooks/exhaustive-deps
const getDetails = async () => {
const res = await window.electron.ipcRenderer.invoke(
'get-project-detailss',
'onboardbase',
projectSlug,
);
setDetails(res);
};
useEffect(() => {
getDetails();
}, []);
}, [getDetails]);
return (
<div className="flex flex-col gap-4">
<h1 className="font-bold text-3xl">Initiate Recon Attacks</h1>
Expand All @@ -35,15 +38,14 @@ export default function Recon() {
<CardHeader>
<CardTitle>Find Subdomains</CardTitle>
<CardDescription>
This will run a job to get all sub-domians for this project
domain
Enumurate all subdomains of your target.
</CardDescription>
</CardHeader>
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">
Last Run <span>{details.recon?.subfinder?.date}</span>
Last Run <span>{details.recon?.subfinder?.date ?? ''}</span>
</h1>
</div>
)}
Expand All @@ -54,58 +56,82 @@ export default function Recon() {
<CardHeader>
<CardTitle>Find live Subdomains</CardTitle>
<CardDescription>
This will run a job to get all live sub-domians for this project
domain
Check which subdomains are live ?
</CardDescription>
</CardHeader>
<CardContent className="flex justify-end">
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">
Last Run
<span>{details.recon?.liveDomains?.date ?? ''}</span>
</h1>
</div>
)}
<LiveSubdomainsJob />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Get Screenshots</CardTitle>
<CardDescription>
This will run a job to get screenshots for all sub-domians for
this project domain
See what is your target look like ?
</CardDescription>
</CardHeader>
<CardContent className="flex justify-end">
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">
Last Run <span>{details.recon?.screens?.date ?? ''}</span>
</h1>
</div>
)}
<HttpxScreensJob />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Get Archive</CardTitle>
<CardDescription>
This will run a job to get Archive for this project domain
Crawl all the URLs of your target from the wayback machine.
</CardDescription>
</CardHeader>
<CardContent className="flex justify-end">
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">Last Run</h1>
</div>
)}
<WaybackurlsArchiveJob />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Get Js Files</CardTitle>
<CardDescription>
This will run a job to get Js Fils for all sub-domians for this
this project domain
</CardDescription>
<CardDescription>Get all the js.</CardDescription>
</CardHeader>
<CardContent className="flex justify-end">
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">Last Run</h1>
</div>
)}
<WaybackurlsJsJob />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Get Parameters</CardTitle>
<CardDescription>
This will run a job to get Parameters for this this project this
this project domain
</CardDescription>
<CardDescription>Get all the Parameters.</CardDescription>
</CardHeader>
<CardContent className="flex justify-end">
<CardContent className="flex justify-between">
{details && (
<div className="flex flex-col space-x-2">
<h1 className="flex flex-col font-semibold">
Last Run <span>{details.recon?.params?.date ?? ''}</span>
</h1>
</div>
)}
<WaybackurlsParameterJob />
</CardContent>
</Card>
Expand Down
3 changes: 0 additions & 3 deletions src/renderer/views/project/result.tsx

This file was deleted.

Loading
Loading