-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hunters-org:main' into main
- Loading branch information
Showing
9 changed files
with
170 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { execSync } from 'child_process'; | ||
import path from 'path'; | ||
import { CurrentOS, toolPath } from '../util'; | ||
import { PROJECT_DIR } from '../api/project'; | ||
import { connectJson } from '../db/connect'; | ||
import { countLines } from '../results/countResults'; | ||
|
||
export async function findSecret(outputDir: string = PROJECT_DIR): Promise<{ | ||
message: string; | ||
success: boolean; | ||
error: any; | ||
}> { | ||
const jsleak = toolPath('jsleak'); | ||
const command = `${CurrentOS() === 'win32' ? 'type' : 'cat'} ${path.join(outputDir, 'httpx_live_domains.txt')} | ${jsleak} -s | ||
>> ${path.join(outputDir, 'secrets.txt')}`; | ||
try { | ||
execSync(command); | ||
const numberOfUrls = await countLines(path.join(outputDir, 'secrets.txt')); | ||
const db = connectJson(path.join(`${outputDir}/details.json`)); | ||
await db.update({ | ||
findSecrets: { | ||
result: numberOfUrls, | ||
run: true, | ||
filePath: '', | ||
date: new Date(Date.now()).toUTCString(), | ||
}, | ||
}); | ||
return { message: 'Done', success: true, error: null }; | ||
} catch (error) { | ||
console.error('Error occurred:', error); | ||
return { message: 'Error', success: false, error }; | ||
} | ||
} | ||
|
||
export async function extraLinks(outputDir: string = PROJECT_DIR): Promise<{ | ||
message: string; | ||
success: boolean; | ||
error: any; | ||
}> { | ||
const jsleak = toolPath('jsleak'); | ||
const command = `${CurrentOS() === 'win32' ? 'type' : 'cat'} ${path.join(outputDir, 'httpx_live_domains.txt')} | ${jsleak} -l | findstr ".js" | ||
>> ${path.join(outputDir, 'extra_links.txt')}`; | ||
try { | ||
execSync(command); | ||
const numberOfUrls = await countLines( | ||
path.join(outputDir, 'extra_links.txt'), | ||
); | ||
const db = connectJson(path.join(`${outputDir}/details.json`)); | ||
await db.update({ | ||
extraLinks: { | ||
result: numberOfUrls, | ||
run: true, | ||
filePath: '', | ||
date: new Date(Date.now()).toUTCString(), | ||
}, | ||
}); | ||
return { message: 'Done', success: true, error: null }; | ||
} catch (error) { | ||
console.error('Error occurred:', error); | ||
return { message: 'Error', success: false, error }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { | ||
Card, | ||
CardContent, | ||
CardDescription, | ||
CardHeader, | ||
CardTitle, | ||
} from '../../components/ui/card'; | ||
import Secrets from './JsLeaks Jobs/secrets'; | ||
import EndPoints from './JsLeaks Jobs/EndPoints'; | ||
|
||
export default function JsLeaks() { | ||
return ( | ||
<div className="flex flex-col gap-4"> | ||
<h1 className="font-bold text-3xl">Initiate Recon Attacks</h1> | ||
<div> | ||
<div className="grid grid-flow-row grid-cols-2 gap-4"> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle>Find Secrets</CardTitle> | ||
<CardDescription>wanna find secrets ?</CardDescription> | ||
</CardHeader> | ||
<CardContent className="flex justify-between"> | ||
<Secrets /> | ||
</CardContent> | ||
</Card> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle>Find EndPoints</CardTitle> | ||
<CardDescription> | ||
Unveiling extra and hidden endpoints | ||
</CardDescription> | ||
</CardHeader> | ||
<CardContent className="flex justify-between"> | ||
<EndPoints /> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Loader2 } from 'lucide-react'; | ||
import { useState } from 'react'; | ||
import { Button } from '../../../components/ui/button'; | ||
|
||
export default function EndPoints() { | ||
const [Loading, setLoading] = useState<boolean>(false); | ||
const RunEndPoints = async () => { | ||
setLoading(true); | ||
}; | ||
return ( | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
<> | ||
{!Loading ? ( | ||
<Button onClick={RunEndPoints}>Process</Button> | ||
) : ( | ||
<Button disabled> | ||
<Loader2 className="mr-2 h-4 w-4 animate-spin" /> | ||
Please wait | ||
</Button> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Loader2 } from 'lucide-react'; | ||
import { useState } from 'react'; | ||
import { Button } from '../../../components/ui/button'; | ||
|
||
export default function Secrets() { | ||
const [Loading, setLoading] = useState<boolean>(false); | ||
const RunSecrets = async () => { | ||
setLoading(true); | ||
}; | ||
return ( | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
<> | ||
{!Loading ? ( | ||
<Button onClick={RunSecrets}>Process</Button> | ||
) : ( | ||
<Button disabled> | ||
<Loader2 className="mr-2 h-4 w-4 animate-spin" /> | ||
Please wait | ||
</Button> | ||
)} | ||
</> | ||
); | ||
} |